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(); } }
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(); }