本文整理汇总了C#中StateManager.getTransform方法的典型用法代码示例。如果您正苦于以下问题:C# StateManager.getTransform方法的具体用法?C# StateManager.getTransform怎么用?C# StateManager.getTransform使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类StateManager
的用法示例。
在下文中一共展示了StateManager.getTransform方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ChaseState
public ChaseState(StateManager manager, Transform playerUnit)
{
this.manager = manager;
tank = manager.getTransform();
playerTransform = playerUnit;
turret = tank.transform.GetChild(1).GetChild(0).GetChild(0).transform;
bulletSpawnPoint = turret.GetChild(0).GetChild(0).transform;
}
示例2: PatrolState
public PatrolState(StateManager manager)
{
this.manager = manager;
//find all necessary waypoints - possibly only need to this once within stateManager
waypoints = GameObject.FindGameObjectsWithTag("WanderPoint");
tank = manager.getTransform();
GameObject objPlayer = GameObject.FindGameObjectWithTag("Player");
playerTransform = objPlayer.transform;
}
示例3: AttackState
public AttackState(StateManager manager, Transform playerTransform)
{
this.manager = manager;
this.playerTransform = playerTransform;
tank = manager.getTransform();
turret = tank.transform.GetChild(1).GetChild(0).GetChild(0).transform;
bulletSpawnPoint = turret.GetChild(0).GetChild(0).transform;
elapsedTime = 0.0f;
shootRate = 3.0f;
}