示例#1
0
        public static void Init(string _variableName, VariableLocation _location, VariableType _variableType, Action _actionFor)
        {
            AutoCreateVariableWindow window = (AutoCreateVariableWindow)EditorWindow.GetWindow(typeof(AutoCreateVariableWindow));

            window.titleContent.text = "Auto-create Variable";
            window.position          = new Rect(300, 200, 320, 100);

            window.location     = _location;
            window.variableName = _variableName;
            window.variableType = _variableType;
            window.actionFor    = _actionFor;
        }
        public static void Init(string _variableName, VariableLocation _location, VariableType _variableType, Action _actionFor)
        {
            AutoCreateVariableWindow window = (AutoCreateVariableWindow)EditorWindow.GetWindow(typeof(AutoCreateVariableWindow));

            UnityVersionHandler.SetWindowTitle(window, "Auto-create Variable");
            window.position = new Rect(300, 200, 320, 100);

            window.location     = _location;
            window.variableName = _variableName;
            window.variableType = _variableType;
            window.actionFor    = _actionFor;
        }
示例#3
0
        private void Callback(object obj)
        {
            switch (obj.ToString())
            {
            case "AutoCreate":
                AutoCreateVariableWindow.Init("Sequence/New integer", location, VariableType.Integer, this);
                break;

            case "Show":
                if (AdvGame.GetReferences() != null && AdvGame.GetReferences().variablesManager != null)
                {
                    AdvGame.GetReferences().variablesManager.ShowVariable(variableID, location);
                }
                break;
            }
        }