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 Update(FSM fsm, FSMActor owner) { if (Input.GetMouseButtonDown(0)) { owner.ChangeState((int)GameFlowState_ID.ShowScore); } }
public override void Update(FSM fsm, FSMActor owner) { if (((FSM_GameFlow)fsm).IsGameOver) { //changeState owner.ChangeState((int)GameFlowState_ID.GameOver); } }
public override void Update(FSM fsm, FSMActor owner) { if (((FSM_GameFlow)fsm).GetDifficulty() != -1) { //changeState owner.ChangeState((int)GameFlowState_ID.GamePlaying); } }
public override void Update(FSM fsm, FSMActor owner) { if (Input.anyKeyDown) { //changeState owner.ChangeState((int)GameFlowState_ID.SelectDiff); } }
public override void Update(FSM fsm, FSMActor owner) { FSM_GameFlow curFsm = fsm as FSM_GameFlow; if (curFsm.IsBackMenu) { owner.ChangeState((int)GameFlowState_ID.MainMenu); } }
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 Enter(FSM fsm, FSMActor owner) { base.Enter(fsm, owner); //SpawnNewBlock BlockManager.One.SpawnNewBlock(0); //UpdateNextBlockUI //Change State owner.ChangeState((int)GameSystemState_ID.Wait); }
public override void Enter(FSM fsm, FSMActor owner) { base.Enter(fsm, owner); //Open UI GameFlow_GamePlaying GameObject GamePlayUIObj = UIManager.One.GetUIObject(UIManager.UIModule.GameFlow_GamePlaying); if (GamePlayUIObj != null) { GamePlayUIObj.gameObject.SetActive(true); } else { UIManager.One.OpenUI(UIManager.UIModule.GameFlow_GamePlaying); } //Change State owner.ChangeState((int)GameSystemState_ID.Ready); }
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); } }
public override void Enter(FSM fsm, FSMActor owner) { base.Enter(fsm, owner); //changeState owner.ChangeState((int)GameFlowState_ID.MainMenu); }