public void Hit(WeaponHit weaponHit) { if (isMinion || isFodder) { currentHP -= weaponHit.damage; } else { this.gameObject.SendMessage("GotHit", weaponHit); } lastHitFreq = weaponHit.frequency; lastHitType = weaponHit.type; lastHitColor = weaponHit.color; }
public virtual void SetProperties(float speed, Rect bounds, Vector3 velocity, int damage, int frequency, WeaponHit.WeaponType type, WeaponHit.WeaponColor color, GameObject effect) { mySpeed = speed; myBounds = bounds; myVelocity = velocity; hit.damage = damage; hit.frequency = frequency; hit.type = type; hit.color = color; hitEffect = effect; }
// Called by other objects when they hit this minion public virtual void Hit(int damage, int freq, WeaponHit.WeaponType type) { }