Пример #1
0
 private void Bleed(float speed)
 {
     if (bunny.getHealth() > 0)
     {
         bunny.reduceHealth(speed);
     }
 }
Пример #2
0
 public void DamagePlayer(float damage, DamageType aDamageType = DamageType.Normal)
 {
     if (bunny.getHealth() <= 0)
     {
         return;
     }
     bunny.reduceHealth(damage);
 }
Пример #3
0
    public void Boosting()
    {
        boostSystem.Play();

        float bloodPower = 100f - bunny.getHealth();

        bunny.reduceHealth(10f * Time.deltaTime);

//		Debug.Log("boostSystem.transform.forward: " + boostSystem.transform.forward);
//
//		Debug.Log("LookRotation: " + Quaternion.LookRotation(boostSystem.transform.forward));
//		Debug.Log("rotation * Vector3.forward: " + boostSystem.transform.rotation * Vector3.forward);
//		Debug.Log("rotation * Vector3.up: " + boostSystem.transform.rotation * Vector3.up);
//		Debug.Log("rotation * Vector3.right: " + boostSystem.transform.rotation * Vector3.right);
        SpawnBloodBall(boostSystem.transform.rotation * Vector3.right, 9f, bloodPower);
    }