コード例 #1
0
ファイル: IntroState.cs プロジェクト: ErkrodC/Footsies
        public override void Tick()
        {
            InputData p1Input = battleCore.GetP1InputData();
            InputData p2Input = battleCore.GetP2InputData();

            battleCore.RecordInput(p1Input, p2Input);
            battleCore.Fighter1.UpdateInput(p1Input);
            battleCore.Fighter2.UpdateInput(p2Input);

            foreach (Fighter fighter in battleCore.Fighters)
            {
                fighter.IncrementActionFrame();
                fighter.UpdateIntroAction();
                fighter.UpdateMovement();
                fighter.UpdateBoxes();
            }

            battleCore.UpdatePushCharacterVsCharacter();
            battleCore.UpdatePushCharacterVsBackground();

            battleCore.Timer -= Time.deltaTime;
            if (battleCore.Timer <= 0f)
            {
                StateMachine.SetState <FightState>();
            }

            if (battleCore.debugPlayLastRoundInput &&
                !battleCore.IsReplayingLastRoundInput)
            {
                StartPlayLastRoundInput();
            }
        }
コード例 #2
0
        private void UpdateEndState()
        {
            foreach (Fighter fighter in battleCore.Fighters)
            {
                fighter.IncrementActionFrame();
                fighter.UpdateActionRequest();
                fighter.UpdateMovement();
                fighter.UpdateBoxes();
            }

            battleCore.UpdatePushCharacterVsCharacter();
            battleCore.UpdatePushCharacterVsBackground();
        }
コード例 #3
0
        private void UpdateFightState()
        {
            InputData p1Input = battleCore.GetP1InputData();
            InputData p2Input = battleCore.GetP2InputData();

            battleCore.RecordInput(p1Input, p2Input);
            battleCore.Fighter1.UpdateInput(p1Input);
            battleCore.Fighter2.UpdateInput(p2Input);

            foreach (Fighter fighter in battleCore.Fighters)
            {
                fighter.IncrementActionFrame();
                fighter.UpdateActionRequest();
                fighter.UpdateMovement();
                fighter.UpdateBoxes();
            }

            battleCore.UpdatePushCharacterVsCharacter();
            battleCore.UpdatePushCharacterVsBackground();
            UpdateHitboxHurtboxCollision();
        }