Exemplo n.º 1
0
    void GiveMovementBonus()
    {
        PlayerMovement movementScript = (PlayerMovement)FindObjectOfType(typeof(PlayerMovement));

        if (movementScript)
        {
            Debug.Log("I've found the movement script");
            movementScript.AddSpeed();
        }
    }
Exemplo n.º 2
0
 void OnTriggerEnter(Collider other)
 {
     if (other.gameObject.CompareTag("BWB"))
     {
         if (deltaTime <= 50)
         {
             float i = Map(deltaTime, 50f, 5f, 0.5f, 4f);
             Debug.Log(i);
             pm.AddSpeed(i);
         }
     }
 }
Exemplo n.º 3
0
 public void ShopSpeed()
 {
     player.DestroyMoney(coinForSpeed);
     player.AddSpeed(addSpeed);
 }