本文整理汇总了C#中PlayerManager.activateCharacter方法的典型用法代码示例。如果您正苦于以下问题:C# PlayerManager.activateCharacter方法的具体用法?C# PlayerManager.activateCharacter怎么用?C# PlayerManager.activateCharacter使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PlayerManager
的用法示例。
在下文中一共展示了PlayerManager.activateCharacter方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: setUniverse
// Called in Bridge.cs
public void setUniverse(int num)
{
Debug.Log("Universe Sent " + num);
universeNum = num;
// Get the origin of the set Universe
Vector3 origin = GameObject.Find("Universe" + num + "/Managers/OriginManager").GetComponent<Universe>().origin;
Debug.Log(num + "Universe " + origin);
// Set camPos to bgPos + 1000 to z
Vector3 camPos = new Vector3(origin.x, origin.y, origin.z + 0.1f);
Debug.Log("camera positons " + camPos);
Camera = (Transform)Instantiate(camPrefab, camPos, new Quaternion(0, 0, 0, 0));
Camera.name = "Camera " + num;
// It is the first time this function has been called
if (characterNum == 99)
{
characterNum = universeNum;
Log.Note("Activate initial");
playerMovement = GameObject.Find("Character" + num).GetComponent<PlayerMovement>();
playerMovement.activateCharacter(num, num);
playerManager = GameObject.Find("Character" + num).GetComponent<PlayerManager>();
playerManager.activateCharacter(num);
FiringHandler fireHandler = GameObject.Find("Character" + num).GetComponent<FiringHandler>();
fireHandler.activateCharacter(num);
}
playerManager.universeNumber = num;
}