コード例 #1
0
 public bool ActivateWallJump()
 {
     if (energyComponent == null)
     {
         energyComponent = GetComponentInParent <EnergyComponent>();
     }
     if (energyComponent.SpendEnergy(ActivationCost))
     {
         this.enabled = true;
         movementComponent.CanWallStick = true;
         return(true);
     }
     return(false);
 }
コード例 #2
0
ファイル: MovementComponent.cs プロジェクト: erebuswolf/LD44
 public bool ActivateSprint()
 {
     if (energyComponent.SpendEnergy(ActivationCost))
     {
         CanSprint = true;
         return(true);
     }
     return(false);
 }