Exemplo n.º 1
0
 public void runTrigger(List<int> items, Trigger temp)
 {
     switch (items[0])
     {
         case 0:
             changeMap(items[1], items[2]);
             break;
         case 1:
             killEnemy(items[1], temp);
             break;
     }
 }
Exemplo n.º 2
0
 public void killEnemy(int i, Trigger temp)
 {
     if (!temp.enemyKilled)
     {
         temp.enemyKilled = true;
         enemies.RemoveAt(i);
     }
 }
Exemplo n.º 3
0
 public void constructTriggers(int counter, Maps maps)
 {
     triggers = new List<Trigger>();
     for (int i = 0; i < maps.maps[counter].Triggers.Count; i++)
     {
         List<int> tempList = new List<int>();
         for (int j = 0; j < maps.maps[counter].Triggers[i].InfoItems.Count; j++)
         {
             int tempint = maps.maps[counter].Triggers[i].InfoItems[j].Item;
             tempList.Add(tempint);
         }
         Trigger temp = new Trigger(maps.maps[counter].Triggers[i].id,
             "Trigger", maps.maps[counter].Triggers[i].XLoc, maps.maps[counter].Triggers[i].YLoc,
             maps.maps[counter].Triggers[i].Width, maps.maps[counter].Triggers[i].Height,
             tempList);
         temp._collider = false;
         triggers.Add(temp);
     }
 }