コード例 #1
0
 public override void FrameFeed()
 {
     if (staminaComponent == null)
     {
         staminaComponent = agent.RequestComponent <CharacterStaminaComponent>();
     }
     agent.navMeshAgent.speed = AgentSpeed();
     MoveAgent();
 }
コード例 #2
0
        public override void FrameFeed()
        {
            if (moveComponent == null || staminaComponent == null)
            {
                moveComponent    = agent.RequestComponent <CharacterMovementComponent>();
                staminaComponent = agent.RequestComponent <CharacterStaminaComponent>();
                return;
            }

            if (InputConfig.Dash() && CanDash && moveComponent.isMoving)
            {
                staminaComponent.ConsumeStamina(agent.dashStaminaCost);
                agent.ChangeState <CharacterDashState>();
            }
        }