Ejemplo n.º 1
0
 public void insertNPC(NPC npc, int y, int x, int height, int width)
 {
     fillRectangle(true, y, x, height, width);
     for (int i = y; i < height + y; i++)
     {
         for (int j = x; j < width + x; j++)
         {
             insertNPCAtLocation(npc, i, j);
         }
     }
 }
Ejemplo n.º 2
0
 private void fillLevel1TrafficMap()
 {
     NPC testNPC = new NPC(this, new Point(300, 1200), 0); // need to move creation of NPCS somewhere else
     NPC testNPC2 = new NPC(this, new Point(350, 1200), 0);
     NPC testNPC3 = new NPC(this, new Point(750, 750), 0);
     testNPC.setStationaryImage(Image.FromFile("../../../Images/NPCs/TestZones/TestZone/TestNPC/StationaryImage.png"));
     testNPC2.setStationaryImage(Image.FromFile("../../../Images/NPCs/TestZones/TestZone/TestNPC/LargeStationaryImage.png"));
     testNPC3.setStationaryImage(Image.FromFile("../../../Images/NPCs/TestZones/TestZone/TestNPC/LargeTallStationaryImage.png"));
     level1TrafficMap.insertNPC(testNPC, 1200, 300, 30, 30); //use npc height and width etc.
     level1TrafficMap.insertNPC(testNPC2, 1200, 350, 30, 30);
     level1TrafficMap.insertNPC(testNPC3, 750, 750, 30, 60);
     npcList.Add(testNPC);
     npcList.Add(testNPC2);
     npcList.Add(testNPC3);
 }
Ejemplo n.º 3
0
 public void removeNPCfromList(NPC npc)
 {
     npcList.Remove(npc);
 }
Ejemplo n.º 4
0
 public void addNPCtoList(NPC npc)
 {
     npcList.Add(npc);
 }
Ejemplo n.º 5
0
 public void insertNPCAtLocation(NPC npc, int y, int x)
 {
     npcMap[y, x] = npc;
 }