예제 #1
0
 protected override void collect(Megaman megaman)
 {
     megaman.Points += pointValue;
     megaman.Points += 200;
     megaman.LargeTransition();
     if (megaman.MaxHealth - megaman.Health < 5)
     {
         megaman.Health = megaman.MaxHealth;
     }
     else
     {
         megaman.Health += 5;
     }
 }
예제 #2
0
        public override void Collide(ICollidable otherObject)
        {
            if (otherObject is Megaman && active)
            {
                sound.Play();

                megaman = otherObject as Megaman;
                megaman.LargeTransition();
                megaman.Points += 1000;
                megaman.Points += 200;
                if (megaman.MaxHealth - megaman.Health < 5)
                {
                    megaman.Health = megaman.MaxHealth;
                }
                else
                {
                    megaman.Health += 5;
                }
                active = false;
            }
        }