public override void Enter(FSM fsm, FSMActor owner) { base.Enter(fsm, owner); FSM_Block curFsm = fsm as FSM_Block; FSMActor_Block curOwner = owner as FSMActor_Block; //Judge if (curOwner.JudgeDirectFunction(SquareFSM.MoveDirection.Down)) { curOwner.DoMoveFunction(SquareFSM.MoveDirection.Down); //change state curOwner.ChangeState((int)BlockState_ID.UpdateDownTimer); } else { //change state curOwner.ChangeState((int)BlockState_ID.Wait); } }
public override void Update(FSM fsm, FSMActor owner) { base.Update(fsm, owner); FSMActor_Block curOwner = owner as FSMActor_Block; if (curOwner.UpdateDownTimer()) { curOwner.ChangeState((int)BlockState_ID.JudgeDown); } }