public override void Punch(IPunchable other) { if (other is MarvelHero) { base.Punch(other); } }
private void PunchableObjectHit(Collider collider, IPunchable punchableObject) { float velocity = CalculateVelocity(); punchableObject.Hit(new PunchInfo(transform.position, velocity, charge.runTimeValue)); Vibrate(); audioSource.PlayOneShot(punchSounds.GetRandom()); Instantiate(punchParticle, particleSpawnPoint.position, Quaternion.identity); }
public override void Punch(IPunchable other) { double damage = Motivation / 1.5; if (Motivation >= 1) { other.BePunched(damage); } }
public void RemoveBandint(IPunchable bandit) { this.bandits.Remove(bandit); if (this.bandits.Count == 0) { this.IsFinished = true; } this.town.RefreshQuest(this); }
private void OnTriggerEnter(Collider collider) { if (!isEnabled) { return; } IPunchable punchableObject = collider.gameObject.GetInterface <IPunchable>(); if (punchableObject != null) { PunchableObjectHit(collider, punchableObject); } }
public abstract void Punch(IPunchable other);
public void RemovePunchable(IPunchable punchable) { this.punchables.Remove(punchable); GenerateMap(); }
public void AddPunchable(IPunchable punchable) { this.punchables.Add(punchable); GenerateMap(); }
private void PunchableObjectHit(Collider collider, IPunchable punchableObject) { float velocity = CalculateVelocity(transform.position, positionPrevFrame); punchableObject.Hit(new PunchInfo(collider, transform.position, velocity, charge.runTimeValue)); }