Пример #1
0
        protected override void OnNodeInspectorGUI()
        {
            repeatType = (RepeatTypes)UnityEditor.EditorGUILayout.EnumPopup("Repeat Type", repeatType);

            if (repeatType == RepeatTypes.RepeatTimes)
            {
                repeatTimes = (BBInt)EditorUtils.BBVariableField("Repeat Times", repeatTimes);
            }
            else if (repeatType == RepeatTypes.RepeatUntil)
            {
                repeatUntil = (RepeatUntil)UnityEditor.EditorGUILayout.EnumPopup("Repeat Until", repeatUntil);
            }
        }
Пример #2
0
        public override void DrawNodeInspectorGUI()
        {
            base.DrawNodeInspectorGUI();
            this.Type = (RepeatTypes)UnityEditor.EditorGUILayout.EnumPopup("Type", Type);
            switch (this.Type)
            {
            case RepeatTypes.RepeatTimes:
                this.Times = UnityEditor.EditorGUILayout.IntField("Times", this.Times);
                this.Times = this.Times < 1 ? 1 : this.Times;
                break;

            case RepeatTypes.RepeatUntil:
                this.Until = (RepeatUntil)UnityEditor.EditorGUILayout.EnumPopup("Until", this.Until);
                break;
            }
        }