ObjectManager.GetObjects C# (CSharp) 메소드

GetObjects() 공개 정적인 메소드

public static GetObjects ( ) : GameObject>.Dictionary
리턴 GameObject>.Dictionary
    public static Dictionary<string, GameObject> GetObjects()
    {
        return objects;
    }

Usage Example

        public void UpdateObjectTree()
        {
            MainWindow.mainWindow.ObjectTree.Children.Clear();

            foreach (GameObject obj in objectManager.GetObjects())
            {
                MapGameObject mapObject = obj as MapGameObject;

                if (mapObject != null)
                {
                    CheckBoxPair checkPair = new CheckBoxPair();
                    string       name      = "";

                    foreach (KeyValuePair <string, GameObjectProperty> property in mapObject.Properties)
                    {
                        if (property.Key == "Name")
                        {
                            name = property.Value.CurrentValue;
                        }
                    }

                    checkPair.MainLabel.Text = name;

                    checkPair.MainCheckBox.IsChecked = mapObject.Visible;

                    checkPair.MainCheckBox.Click += (sender, e) =>
                    {
                        mapObject.Visible = (bool)checkPair.MainCheckBox.IsChecked;
                    };

                    MainWindow.mainWindow.ObjectTree.Children.Add(checkPair);
                }
            }
        }
All Usage Examples Of ObjectManager::GetObjects