private void MakeFSM() { mFSMSystem = new BotanyFSMSytem(); BotanyIdleState idleState = new BotanyIdleState(mFSMSystem, this); idleState.AddTransition(BotanyTransition.SeeEnemy, BotanyStateID.Attack); BotanyAttackState attackState = new BotanyAttackState(mFSMSystem, this); attackState.AddTransition(BotanyTransition.NoEnmey, BotanyStateID.Idle); mFSMSystem.AddState(idleState, attackState); }
public IBotanyState(BotanyFSMSytem fsm, ICharacter character) { mFSM = fsm; mCharacter = character; }
public BotanyAttackState(BotanyFSMSytem fsm, ICharacter c) : base(fsm, c) { mStateID = BotanyStateID.Attack; mAttackTimer = mAttackTime; }
public BotanyIdleState(BotanyFSMSytem fsm, ICharacter c) : base(fsm, c) { mStateID = BotanyStateID.Idle; }