Exemple #1
0
        public void Load(string file, GraphicsDevice graphicsDevice)
        {
            map = LoadMap(file, graphicsDevice);
            DebugRenderer.SetMap(map);
            var npcGroups = map.ObjectGroups.Where(g => g.Name.StartsWith("NPC")).ToList();

            foreach (var npc in npcGroups)
            {
                string type = npc.Name.Split(' ')[1];
                LoadNPC(type, npc.Objects);
                DebugRenderer.AddDebugObjectWorld(new DebugNPC(npcs.Last(), Color.Blue)
                {
                    ShowVelocity     = Color.CornflowerBlue,
                    ShowAcceleration = Color.IndianRed,
                });
            }
        }