Beispiel #1
0
        public override void OnInspectorGUI()
        {
            LogicMap logicMap = target as LogicMap;

            if (eUtils.isPrefab(logicMap))
            {
                GUILayout.Label("---Для редактирования вынесите на сцену!!!---");
                GUILayout.Space(5);
            }
            else
            {
                if (GUILayout.Button("Edit"))
                {
                    LogicMapEditor.logicMap = logicMap;
                    if (LogicMapEditor.editor == null)
                    {
                        LogicMapEditor.ShowEditor();
                    }
                    else
                    {
                        LogicMapEditor.editor.LoadLogicMap();
                    }
                }
            }
            base.OnInspectorGUI();
        }
Beispiel #2
0
        public bool GetResult()
        {
            if (!checkNode)
            {
                checkNode = true;
            }
            LogicMap logicMap = transform.GetComponentInParent <LogicMap>();

            if (logicMap.curOwner != null)
            {
                result = condition.isFulfilled(((iConditionContainer)logicMap.curOwner).GetQuest());
            }
            else if (transform.GetComponentInParent <Quest>() != null)
            {
                result = condition.isFulfilled(transform.GetComponentInParent <Quest>());
            }
            else if (transform.GetComponentInParent <Dialog.Dialog>() != null)
            {
                result = condition.isFulfilled(transform.GetComponentInParent <Dialog.Dialog>().questOwner);
            }
            return(result);
        }