Esempio n. 1
0
 public void TakeDamage(PlayerClass attacker)
 {
     this.Percentage += attacker.GetAttack() - this.Defense;
     int multipler = attacker.Rigidbody.transform.position.x < this.Rigidbody.transform.position.x ? 1 : -1;
     this.Rigidbody.AddForce(new Vector3(multipler * 400 * this.Percentage / 300,
                                         multipler * 400 * this.Percentage / 3000,
                                         0));
 }