public override void Enter(FSM fsm, FSMActor owner) { base.Enter(fsm, owner); FSM_GameSystem curFsm = fsm as FSM_GameSystem; FSMActor_GameSystemController curOwner = owner as FSMActor_GameSystemController; //Judge GameOver if (curOwner.JudgeGameOverFunction()) { curFsm.IsGameOver = true; return; } //Do Judge Eliminate curOwner.JudgeEliminateFunction(); if (curOwner.GetEliminateRowList.Count > 0) { //Change State owner.ChangeState((int)GameSystemState_ID.Eliminate); } else { //Change State owner.ChangeState((int)GameSystemState_ID.SpawnNewBlock); } }
public void Awake() { _singleton = this; //SetFSM SetFSM(FSMManager.One.GetFSM((int)FSM_ID.GameSystemFSMState)); InitGridList(); }
public override void Enter(FSM fsm, FSMActor owner) { base.Enter(fsm, owner); FSM_GameSystem curFsm = fsm as FSM_GameSystem; FSMActor_GameSystemController curOwner = owner as FSMActor_GameSystemController; curOwner.GameTimer = FSMActor_GameSystemController.ReadyTime; //Open UI GamePlay_Ready UIManager.One.OpenUI(UIManager.UIModule.GamePlay_Ready); }
public override void Enter(FSM fsm, FSMActor owner) { base.Enter(fsm, owner); FSM_GameSystem curFsm = fsm as FSM_GameSystem; FSMActor_GameSystemController curOwner = owner as FSMActor_GameSystemController; //Do Eliminate curOwner.DoEliminate(); //Change State owner.ChangeState((int)GameSystemState_ID.SpawnNewBlock); }
public override void Update(FSM fsm, FSMActor owner) { base.Update(fsm, owner); FSM_GameSystem curFsm = fsm as FSM_GameSystem; FSMActor_GameSystemController curOwner = owner as FSMActor_GameSystemController; if (curOwner.GameTimer > 0) { curOwner.GameTimer -= Time.deltaTime; } if (curOwner.GameTimer < 0) { curOwner.GameTimer = 0; //Change State owner.ChangeState((int)GameSystemState_ID.SpawnNewBlock); } }
void Start() { _thisGameSystem = FSMManager.One.GetFSM((int)FSM_ID.GameSystemFSMState).GetActorFirst() as FSMActor_GameSystemController; UpdateText(); }