コード例 #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 void Awake()
 {
     _singleton = this;
     //SetFSM
     SetFSM(FSMManager.One.GetFSM((int)FSM_ID.GameSystemFSMState));
     InitGridList();
 }
コード例 #3
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;

            curOwner.GameTimer = FSMActor_GameSystemController.ReadyTime;
            //Open UI GamePlay_Ready
            UIManager.One.OpenUI(UIManager.UIModule.GamePlay_Ready);
        }
コード例 #4
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);
        }
コード例 #5
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);
            }
        }
コード例 #6
0
 void Start()
 {
     _thisGameSystem = FSMManager.One.GetFSM((int)FSM_ID.GameSystemFSMState).GetActorFirst() as FSMActor_GameSystemController;
     UpdateText();
 }