Beispiel #1
0
        public void processEvents(Tile cur)
        {
            if(Game1.DEBUG)
                Console.WriteLine("Processing Events!");

            Event[] ce = cur.getEvents();

            if(Game1.DEBUG)
            Console.WriteLine("Found " + ce.Length + " events!");

            for (int i = 0; i < ce.Length; i++)
            {
                Game1.addToEventQueue(ce[i]);
            }

            for(int i = 0; i < monstertiles.Count; i++)
                if(cur.getMapX() == monstertiles[i].getMapX() && cur.getMapY() == monstertiles[i].getMapY())
                {
                    Event e = new Event();
                    e.setEventType(EventType.BATTLE_TILE);
                    e.addProperty("battlemap", battlemap.GetFilePath());
                    e.addProperty("enemytexture", monstertiles[i].getTexture().Name);
                    e.addProperty("index", Convert.ToString(i));
                    Game1.addToEventQueue(e);
                }
        }