public void loadObjects(string corePath, SimplexProjectStructure sps) { currentProject = sps; Dictionary <Type, SimplexProjectItem> fList = new Dictionary <Type, SimplexProjectItem>(); SimplexIdeApi.GetResourceClasses(corePath, "Objects", ref fList, sps.Objects); SimplexIdeApi.TreeParseNodes(objects, "Objects", fList); SimplexIdeApi.RegisterColliderTypes(fList, ref reflectedTypes); CollisionsTree.ComputeActiveColliders(); fList.Clear(); SimplexIdeApi.RegisterSimple(corePath, "Rooms", ref fList, sps.Rooms); foreach (var t in fList) { rooms.Nodes[0].Nodes.Add(new DarkTreeNode(t.Key.Name) { Icon = Properties.Resources.MapTileLayer_16x }); reflectedTypes.Add(t.Key); } activeRoom = null; sr.drawTest1.InitializeNodes(objects.Nodes); }
public static void DrawEnd() { CollisionsTree.DrawPairsDebug(); int n = 0; if (currentRoom != null) { foreach (RoomLayer rl in currentRoom.Layers) { if (rl is ObjectLayer) { n += (rl as ObjectLayer).Objects.Count; } } } draw_text(new Vector2(200, 200), n.ToString()); }