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 override void Enter(FSM fsm, FSMActor owner) { base.Enter(fsm, owner); FSM_GameSystem curFsm = fsm as FSM_GameSystem; curFsm._testTimer = 5.0f; }
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); } }
public override void Update(FSM fsm, FSMActor owner) { base.Enter(fsm, owner); //Wait for Block Down //Change State //owner.ChangeState((int)GameSystemState_ID.JudgeEliminate); //Test FSM_GameSystem curFsm = fsm as FSM_GameSystem; if (curFsm._testTimer > 0) { curFsm._testTimer -= Time.deltaTime; } if (curFsm._testTimer < 0) { curFsm._testTimer = 0.0f; owner.ChangeState((int)GameSystemState_ID.SpawnNewBlock); } }