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

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

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

        if (punchableObject != null)
        {
            PunchableObjectHit(collider, punchableObject);
        }
    }
示例#6
0
 public abstract void Punch(IPunchable other);
示例#7
0
 public void RemovePunchable(IPunchable punchable)
 {
     this.punchables.Remove(punchable);
     GenerateMap();
 }
示例#8
0
 public void AddPunchable(IPunchable punchable)
 {
     this.punchables.Add(punchable);
     GenerateMap();
 }
示例#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));
    }