本文整理汇总了C#中StateMachine.setState方法的典型用法代码示例。如果您正苦于以下问题:C# StateMachine.setState方法的具体用法?C# StateMachine.setState怎么用?C# StateMachine.setState使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类StateMachine
的用法示例。
在下文中一共展示了StateMachine.setState方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Start
// Use this for initialization
void Start () {
navAgent = GetComponent<NavMeshAgent> ();
home = GameObject.Find ("Home");
fsm = new StateMachine<GhostAI> (this);
fsm.setState (new ScatterState ());
}
示例2: Start
// Use this for initialization
void Start () {
battleManager = FindObjectOfType<BattleManager>();
fsm = new StateMachine<GameManager>(this);
fsm.setState(new IntroState());
battleManager.battleEndedEvent += OnBattleEnded;
battleManager.playerDefeatedEvent += OnPlayerDefeated;
timer = 3.0f;
enemy = GameObject.FindGameObjectWithTag("Enemy");
battleManager.StartBattle();
}
示例3: Start
void Start()
{
_fsm = new StateMachine<SlotMachineAI>(this);
_fsm.setState(new InsertCoinState());
wheelsArray[0] = GameObject.Find("Wheel0").GetComponent<Wheel>();
wheelsArray[1] = GameObject.Find("Wheel1").GetComponent<Wheel>();
wheelsArray[2] = GameObject.Find("Wheel2").GetComponent<Wheel>();
buttonsArray[0] = GameObject.Find("Button0").GetComponent<Button>();
buttonsArray[1] = GameObject.Find("Button1").GetComponent<Button>();
buttonsArray[2] = GameObject.Find("Button2").GetComponent<Button>();
lever = GameObject.Find("Lever").GetComponent<Lever>();
mouth = GameObject.Find("CatMouth").GetComponent<CatMouth>();
cookieDispenser = GameObject.Find("CookieDispenser").GetComponent<Dispenser>();
particles = GameObject.Find("Particles").GetComponent<ParticleSystem>();
}
示例4: Start
void Start(){
_stateMachine = new StateMachine<GameManager>(this);
_stateMachine.setState(new RaceStartState());
}
示例5: Start
void Start()
{
_fsm = new StateMachine<GhostAI>(this);
_fsm.setState(new ScatterState());
}