示例#1
0
 private void Update()
 {
     if (!GamePauser.IsPaused)
     {
         var deltaTime = Time.deltaTime;
         characterState.Update(GetMovementInput(), deltaTime);
         HandleCollisions(Move());
     }
     DrawAxes();
 }
示例#2
0
    public void ChangeCharacterState(CharacterStateSwitch3D stateSwitch)
    {
        PrintStateSwitch(stateSwitch);

        characterState.Exit();
        characterState = stateSwitch.NewState;
        characterState.Enter();
        if (stateSwitch.RunImmediately)
        {
            characterState.Update(stateSwitch.MovementInput, stateSwitch.DeltaTime);
        }
    }