//:::::::::::::::::::::::::::: Publicly available Interface :::::::::::::::::::::::::::::::::::::::: public void hurt(float value, DamageType type) { switch (type) { case DamageType.blunt: health -= value * damageResistance [0]; break; case DamageType.pirsing: health -= value * damageResistance [1]; break; case DamageType.fire: health -= value * damageResistance [2]; break; case DamageType.electric: health -= value * damageResistance [3]; break; case DamageType.corrosive: health -= value * damageResistance [4]; break; } if (health <= 0) { health = 0; HiveMind.imDead(this, imGood); Destroy(this.gameObject); } }
//:::::::::::::::::::::::::::: Publicly available Interface :::::::::::::::::::::::::::::::::::::::: public void hurt(float value, DamageType type) { switch (type) { case DamageType.blunt: health -= value * damageResistance [0]; break; case DamageType.pirsing: health -= value * damageResistance [1]; break; case DamageType.fire: health -= value * damageResistance [2]; break; case DamageType.electric: health -= value * damageResistance [3]; break; case DamageType.corrosive: health -= value * damageResistance [4]; break; } if (health <= 0) { health = 0; HiveMind.imDead(this, true); animator.SetBool("Dead", true); ui.showDead(); } ui.hpUpdate((int)health); }