예제 #1
0
        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);
            }
        }
예제 #2
0
 public override void Update(FSM fsm, FSMActor owner)
 {
     if (Input.GetMouseButtonDown(0))
     {
         owner.ChangeState((int)GameFlowState_ID.ShowScore);
     }
 }
예제 #3
0
 public override void Update(FSM fsm, FSMActor owner)
 {
     if (((FSM_GameFlow)fsm).IsGameOver)
     {
         //changeState
         owner.ChangeState((int)GameFlowState_ID.GameOver);
     }
 }
예제 #4
0
 public override void Update(FSM fsm, FSMActor owner)
 {
     if (((FSM_GameFlow)fsm).GetDifficulty() != -1)
     {
         //changeState
         owner.ChangeState((int)GameFlowState_ID.GamePlaying);
     }
 }
예제 #5
0
 public override void Update(FSM fsm, FSMActor owner)
 {
     if (Input.anyKeyDown)
     {
         //changeState
         owner.ChangeState((int)GameFlowState_ID.SelectDiff);
     }
 }
예제 #6
0
        public override void Update(FSM fsm, FSMActor owner)
        {
            FSM_GameFlow curFsm = fsm as FSM_GameFlow;

            if (curFsm.IsBackMenu)
            {
                owner.ChangeState((int)GameFlowState_ID.MainMenu);
            }
        }
예제 #7
0
        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);
        }
예제 #8
0
        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);
        }
예제 #9
0
        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);
        }
예제 #10
0
        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);
            }
        }
예제 #11
0
        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);
            }
        }
예제 #12
0
 public override void Enter(FSM fsm, FSMActor owner)
 {
     base.Enter(fsm, owner);
     //changeState
     owner.ChangeState((int)GameFlowState_ID.MainMenu);
 }