Пример #1
0
 // Use this for initialization
 void Start()
 {
     characterController = GetComponent <PlayerPlatformerControllerB>();
     rb            = GetComponent <Rigidbody2D>();
     isDashing     = false;
     dashTimer     = maxDashDuration;
     cooldownTimer = 0.0f;
     Debug.Log("Reducing cooldown");
 }
 override public void PerformAbility(PhysicsObject obj)
 {
     if (!characterController)
     {
         characterController = obj.GetComponent <PlayerPlatformerControllerB>();
     }
     obj.gravityModifier *= -1;
     characterController.spriteRenderer.flipY = !characterController.spriteRenderer.flipY;
 }
Пример #3
0
 override public void PerformAbility(PhysicsObject obj)
 {
     if (!characterController)
     {
         characterController = obj.GetComponent <PlayerPlatformerControllerB>();
     }
     if (cooldownTimer > 0.0f)
     {
         Debug.Log("COOLDOWN");
         return;
     }
     isDashing = true;
 }
 // Use this for initialization
 void Start()
 {
     characterController = GetComponent <PlayerPlatformerControllerB>();
 }