Example #1
0
 public void DetectCollision()
 {
     foreach (WorldMapMonster monster in monsters)
     {
         //check if monster is Alive and start combat only if it is Alive
         if (monster.isAlive && playerParty.partySprite.location == monster.location)
         {
             //
             monsterInCombat   = monster;
             inCombat          = true;
             combatGUI         = new CombatGUI();
             combatGUI.Visible = true;
             combatGUI.StartCombat(playerParty, monsterInCombat.member);
         }
     }
     foreach (WorldMapSprite fr in friendlyHeroes)
     {
         if (playerParty.partySprite.location == fr.location)
         {
             playerParty.partySprite.location.X += 40;
             if (fr.textFileName != "")
             {
                 textBoxReader.OpenText(fr.textFileName, fr);
             }
         }
     }
 }
Example #2
0
 void KillMonsterInList(WorldMapMonster monsterToBeKilled)
 {
     foreach (WorldMapMonster monster in monsters)
     {
         if (monster == monsterToBeKilled)
         {
             monster.isAlive = false;
         }
     }
 }
Example #3
0
        public void DetectCollision()
        {
            foreach (WorldMapMonster monster in monsters)
            {
                //check if monster is Alive and start combat only if it is Alive
                if (monster.isAlive && playerParty.partySprite.location == monster.location)
                {
                    //
                    monsterInCombat = monster;
                    inCombat = true;
                    combatGUI = new CombatGUI();
                    combatGUI.Visible = true;
                    combatGUI.StartCombat(playerParty, monsterInCombat.member);
                }
            }
            foreach (WorldMapSprite fr in friendlyHeroes)
            {
                if (playerParty.partySprite.location == fr.location)
                {
                    playerParty.partySprite.location.X += 40;
                    if (fr.textFileName != "")
                    {
                        textBoxReader.OpenText(fr.textFileName, fr);
                    }
                }

            }
        }
Example #4
0
 void KillMonsterInList(WorldMapMonster monsterToBeKilled)
 {
     foreach (WorldMapMonster monster in monsters)
     {
         if (monster == monsterToBeKilled)
         {
             monster.isAlive = false;
         }
     }
 }