public override void Enter(FSM fsm, FSMActor owner) { base.Enter(fsm, owner); FSMActor_Square curOwner = owner as FSMActor_Square; curOwner.InitDisappearFunction(_squareDisappearTime); }
protected void InitSquare() { for (int i = 0; i < SquareList.Count; i++) { FSMActor_Square s = SquareList[i].GetComponent <FSMActor_Square>(); s.SetBlock(this); s.UpdateCoordinateFunction(_blockDataList[_currentRotationIndex].SquareDataList[i].SquareDefalutCoordinate); s.SetNeedToJudgeDirection(_blockDataList[_currentRotationIndex].SquareDataList[i].SquareNeedToJudgeDirection); _squareList.Add(s); } }
public override void Update(FSM fsm, FSMActor owner) { base.Update(fsm, owner); FSMActor_Square curOwner = owner as FSMActor_Square; curOwner.DisappearFunction(); if (!curOwner.IsAlife) { //change state curOwner.ChangeState((int)SquareState_ID.Wait); } }