Example #1
0
 public override void Punch(IPunchable other)
 {
     if (other is MarvelHero)
     {
         base.Punch(other);
     }
 }
Example #2
0
    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);
    }
Example #3
0
        public override void Punch(IPunchable other)
        {
            double damage = Motivation / 1.5;

            if (Motivation >= 1)
            {
                other.BePunched(damage);
            }
        }
Example #4
0
 public void RemoveBandint(IPunchable bandit)
 {
     this.bandits.Remove(bandit);
     if (this.bandits.Count == 0)
     {
         this.IsFinished = true;
     }
     this.town.RefreshQuest(this);
 }
Example #5
0
    private void OnTriggerEnter(Collider collider)
    {
        if (!isEnabled)
        {
            return;
        }

        IPunchable punchableObject = collider.gameObject.GetInterface <IPunchable>();

        if (punchableObject != null)
        {
            PunchableObjectHit(collider, punchableObject);
        }
    }
Example #6
0
 public abstract void Punch(IPunchable other);
Example #7
0
 public void RemovePunchable(IPunchable punchable)
 {
     this.punchables.Remove(punchable);
     GenerateMap();
 }
Example #8
0
 public void AddPunchable(IPunchable punchable)
 {
     this.punchables.Add(punchable);
     GenerateMap();
 }
Example #9
0
    private void PunchableObjectHit(Collider collider, IPunchable punchableObject)
    {
        float velocity = CalculateVelocity(transform.position, positionPrevFrame);

        punchableObject.Hit(new PunchInfo(collider, transform.position, velocity, charge.runTimeValue));
    }