コード例 #1
0
 void DisplayDetectZones()
 {
     if (triggerType.enumValueIndex == (int)EngineEventTriggerManager.TriggerType.DetectZones)
     {
         EditorExtensions.LabelFieldCustom("Add/Remove Detect Zones", FontStyle.Bold);
         detectZones.ArrayFieldButtons("Detect Zone", true, true, true, true, DetectZoneField);
     }
 }
コード例 #2
0
 void DisplayPreTriggers()
 {
     if (triggerType.enumValueIndex == (int)EngineEventTriggerManager.TriggerType.PreTrigger)
     {
         EditorExtensions.LabelFieldCustom("Add/Remove PreTriggers", FontStyle.Bold);
         preTriggers.ArrayFieldButtons("Pre Trigger", true, true, true, true, PreTriggerField);
     }
 }
コード例 #3
0
    public static void LayoutSyncSelectionArrayField
        (this SerializedProperty _layoutSyncSelectionArray,
        SerializedProperty _valueSelections,
        SerializedProperty _layoutMaster)
    {
        layoutMaster = _layoutMaster;
        var master  = new SerializedObject(layoutMaster.objectReferenceValue);
        var layouts = master.FindProperty("layouts");

        layoutNames     = layouts.GetDisplayNames();
        valueSelections = _valueSelections;
        _layoutSyncSelectionArray.ArrayFieldButtons("Value Sync", true, true, false, false, LayoutSyncSelectionField, true);
        master.Dispose();
    }
コード例 #4
0
 void SetProperties()
 {
     EditorGUILayout.Space();
     EditorGUILayout.PropertyField(brain);
     EditorExtensions.LabelFieldCustom("Add/Remove Switches", FontStyle.Bold);
     if (cinemachineSwitches.arraySize > 1)
     {
         defaultSwitch.intValue = EditorGUILayout.Popup("Default", defaultSwitch.intValue, source.GetSwitchNames());
     }
     else
     {
         defaultSwitch.intValue = 0;
     }
     cinemachineSwitches.ArrayFieldButtons("Switch", true, true, true, true, CinemachineSwitchEditorExtensions.CinemachineCameraSwitchField);
 }
コード例 #5
0
    protected virtual void DisplayUIProperties()
    {
        EditorGUILayout.LabelField("UI Properties", boldStyle);
        EditorGUILayout.PropertyField(spawnUI);

        if (spawnUI.boolValue)
        {
            UIToSpawn.PrefabFieldWithComponent(typeof(UIEngineValueEntity));
            EditorGUILayout.PropertyField(childOptions);
        }
        EditorGUILayout.PropertyField(syncValuesToUI);
        if (syncValuesToUI.boolValue)
        {
            entityLayoutSyncs.ArrayFieldButtons("Layout Sync", true, true, true, true, LayoutSyncField);
        }
    }
コード例 #6
0
    public virtual void SetProperties()
    {
        EditorGUILayout.Space();
        if (Application.isPlaying)
        {
            EditorGUILayout.PropertyField(viewStats);
            if (viewStats.boolValue)
            {
                DisplayStats();
            }
        }

        spawnables.ArrayFieldButtons("Spawn", false, false, true, false, DisplaySpawnables);
        spawnLocations.ArrayFieldButtons("Location", true, false, true, true, DisplaySpawnLocations);
        EditorGUILayout.LabelField("--------------");
        waves.ArrayFieldButtons("Wave", false, false, false, false, DisplayWaves);
    }
コード例 #7
0
 static void DisplayActivation()
 {
     EditorExtensions.LabelFieldCustom("Activation Options", FontStyle.Bold);
     EditorGUILayout.PropertyField(activationAmount);
     if (activationAmount.enumValueIndex == (int)EngineEventTrigger.ActivationAmountType.Finite)
     {
         EditorGUILayout.PropertyField(maxActivations);
     }
     EditorGUILayout.PropertyField(activationType);
     if (activationType.enumValueIndex == (int)EngineEventTrigger.ActivationType.Solo || activationType.enumValueIndex == (int)EngineEventTrigger.ActivationType.Both)
     {
         EditorExtensions.LabelFieldCustom("Add/Remove Events", FontStyle.Bold);
         engineEvents.ArrayFieldButtons("Event", true, true, true, true, EngineEventExtensions.EngineEventField);
     }
     if (activationType.enumValueIndex == (int)EngineEventTrigger.ActivationType.Broadcast || activationType.enumValueIndex == (int)EngineEventTrigger.ActivationType.Both)
     {
         EditorExtensions.LabelFieldCustom("Add/Remove Receivers", FontStyle.Bold);
         receivers.ArrayFieldButtons("Receiver", true, true, true, true, EngineEventReceiverExtensions.TriggerEngineReceiverField);
     }
 }
コード例 #8
0
 void DisplayEvents()
 {
     if (triggerMask.intValue == (triggerMask.intValue | (1 << (int)Interactable.TriggerType.OnHoverEnter)))
     {
         EditorExtensions.LabelFieldCustom("On Hover Enter:", FontStyle.Bold);
         hoverEnterEvents.ArrayFieldButtons("Enter Event", true, true, true, true, EngineEventExtensions.EngineEventField);
     }
     if (triggerMask.intValue == (triggerMask.intValue | (1 << (int)Interactable.TriggerType.OnHoverStay)))
     {
         EditorExtensions.LabelFieldCustom("On Hover Stay:", FontStyle.Bold);
         hoverStayEvents.ArrayFieldButtons("Stay Event", true, true, true, true, EngineEventExtensions.EngineEventField);
     }
     if (triggerMask.intValue == (triggerMask.intValue | (1 << (int)Interactable.TriggerType.OnHoverExit)))
     {
         EditorExtensions.LabelFieldCustom("On Hover Exit:", FontStyle.Bold);
         hoverExitEvents.ArrayFieldButtons("Exit Event", true, true, true, true, EngineEventExtensions.EngineEventField);
     }
     if (triggerMask.intValue == (triggerMask.intValue | (1 << (int)Interactable.TriggerType.OnInteract)))
     {
         EditorExtensions.LabelFieldCustom("On Interact:", FontStyle.Bold);
         interactEvents.ArrayFieldButtons("Interact Event", true, true, true, true, EngineEventExtensions.EngineEventField);
     }
 }
コード例 #9
0
    void SetProperties()
    {
        EditorGUILayout.LabelField("------------------------");
        EditorGUILayout.LabelField("CheckPoint Options");
        EditorGUILayout.LabelField("------------------------");
        EditorGUILayout.PropertyField(overrideCheckPoint);
        if (overrideCheckPoint.boolValue)
        {
            EditorGUILayout.PropertyField(checkPoint);
        }
        EditorGUILayout.PropertyField(detectMask);
        checkPoints.arraySize = Mathf.Clamp(checkPoints.arraySize, 2, int.MaxValue);
        checkPoints.ArrayFieldButtons("Checkpoint", true, false, true, true, DisplayCheckPoints);

        //playerstuff
        EditorGUILayout.LabelField("------------------------");
        EditorGUILayout.LabelField("Player Options");
        EditorGUILayout.LabelField("------------------------");
        EditorGUILayout.PropertyField(playerSpawn);
        //saving
        EditorGUILayout.LabelField("------------------------");
        EditorGUILayout.LabelField("Data Options");
        EditorGUILayout.LabelField("------------------------");
        EditorGUILayout.PropertyField(progressOnly);
        EditorGUILayout.PropertyField(saveProgressToDisc);
        EditorGUILayout.PropertyField(resetProgressOnQuit);
        //level finish
        EditorGUILayout.LabelField("------------------------");
        EditorGUILayout.LabelField("On Level Finish");
        EditorGUILayout.LabelField("------------------------");
        EditorGUILayout.PropertyField(sceneUnlocked);
        EditorGUILayout.PropertyField(nextSceneToPlay);
        EditorGUILayout.PropertyField(freezeGame);
        EditorGUILayout.PropertyField(freezePlayer);
        EditorGUILayout.PropertyField(endTime);
    }
コード例 #10
0
 void SetProperties()
 {
     engineValueCategories.ArrayFieldButtons("Category", true, true, true, true, DisplayEngineValueCategories);
 }
コード例 #11
0
 public static void EngineValueSelectionArrayField(this SerializedProperty _valueSelectionArrayProperty, SerializedProperty _engineValueManager)
 {
     engineValueManager = _engineValueManager;
     _valueSelectionArrayProperty.ArrayFieldButtons("Engine Value", true, true, true, true, EngineValueSelectionField);
 }
コード例 #12
0
 public static void EngineValueEventArray(this SerializedProperty _property, SerializedProperty _engineEventManager)
 {
     engineEventManager = _engineEventManager;
     _property.ArrayFieldButtons("Event", true, true, true, true, EngineValueEventField);
 }
コード例 #13
0
    public static void EngineEventField(SerializedProperty _property, int _index)
    {
        eventName            = _property.FindPropertyRelative("eventName");
        affectedObjectOption = _property.FindPropertyRelative("affectedObjectOption");
        sceneObject          = _property.FindPropertyRelative("sceneObject");
        sceneObjectType      = sceneObject.FindPropertyRelative("sceneObjectType");
        startType            = _property.FindPropertyRelative("startType");
        inputButton          = _property.FindPropertyRelative("inputButton");

        //event type
        eventTypeMask = _property.FindPropertyRelative("eventTypeMask");

        //anim
        anims   = _property.FindPropertyRelative("anims");
        commons = _property.FindPropertyRelative("commons");
        //method
        methods = _property.FindPropertyRelative("methods");
        //interacts
        interacts         = _property.FindPropertyRelative("interacts");
        eventOptions      = _property.FindPropertyRelative("eventOptions");
        valueDeltaOptions = _property.FindPropertyRelative("valueDeltaOptions");

        //common stuff
        delay      = _property.FindPropertyRelative("delay");
        repeat     = _property.FindPropertyRelative("repeat");
        repeatTime = _property.FindPropertyRelative("repeatTime");
        finishType = _property.FindPropertyRelative("finishType");
        totalTime  = _property.FindPropertyRelative("totalTime");
        finished   = _property.FindPropertyRelative("finished");
        active     = _property.FindPropertyRelative("active");

        //GetSources(_property);

        string label = "Event " + (_index + 1).ToString();

        if (repeat.boolValue)
        {
            label += " (Repeating) ";
        }
        if (active.boolValue)
        {
            label += " (Active) ";
        }
        if (finished.boolValue)
        {
            label += " (Finished) ";
        }
        eventName.stringValue = label;


        EditorGUILayout.PropertyField(sceneObject);

        //start and trigger
        EditorGUILayout.PropertyField(startType);
        if (startType.enumValueIndex == (int)EngineEvent.StartType.OnInputAfterPreviousFinished)
        {
            EditorGUILayout.PropertyField(inputButton);
        }

        //event Type
        eventTypeMask.intValue = EditorGUILayout.MaskField("Event Mask", eventTypeMask.intValue, System.Enum.GetNames(typeof(EngineEvent.EventType)));

        //anim events
        if (eventTypeMask.intValue == (eventTypeMask.intValue | (1 << (int)EngineEvent.EventType.Common)))
        {
            EditorExtensions.LabelFieldCustom("Common Options", FontStyle.Bold);
            commons.ArrayFieldButtons("Common Event", true, true, true, true, EventOptionCommonField);
        }

        //anim events
        if (eventTypeMask.intValue == (eventTypeMask.intValue | (1 << (int)EngineEvent.EventType.Animator)))
        {
            EditorExtensions.LabelFieldCustom("Animator Options", FontStyle.Bold);
            anims.ArrayFieldButtons("Animator State", true, true, true, true, EventOptionAnimatorField);
        }

        //method events
        if (eventTypeMask.intValue == (eventTypeMask.intValue | (1 << (int)EngineEvent.EventType.CallMethod)))
        {
            EditorExtensions.LabelFieldCustom("Call Method Options", FontStyle.Bold);
            methods.ArrayFieldButtons("Method", true, true, true, true, EventOptionCallMethodField);
        }

        //interactFX
        if (eventTypeMask.intValue == (eventTypeMask.intValue | (1 << (int)EngineEvent.EventType.InteractFX)))
        {
            EditorExtensions.LabelFieldCustom("InteractFX Options", FontStyle.Bold);
            interacts.ArrayFieldButtons("InteractFX", true, true, true, true, EventOptionInteractFXField);
        }

        //Events
        if (eventTypeMask.intValue == (eventTypeMask.intValue | (1 << (int)EngineEvent.EventType.ValueDelta)))
        {
            EditorExtensions.LabelFieldCustom("Event Options", FontStyle.Bold);
            valueDeltaOptions.ArrayFieldButtons("ValueOption", true, true, true, true, EventOptionValueDeltaField);
        }

        //Events
        if (eventTypeMask.intValue == (eventTypeMask.intValue | (1 << (int)EngineEvent.EventType.Event)))
        {
            EditorExtensions.LabelFieldCustom("Event Options", FontStyle.Bold);
            eventOptions.ArrayFieldButtons("EventOption", true, true, true, true, EventOptionEventField);
        }

        EditorExtensions.LabelFieldCustom("Time Options", FontStyle.Bold);

        //delay
        EditorGUILayout.PropertyField(delay);

        //repeat
        EditorGUILayout.PropertyField(repeat);

        //repeat delay
        if (repeat.boolValue)
        {
            EditorGUILayout.PropertyField(repeatTime);
        }

        //finishtype
        EditorGUILayout.PropertyField(finishType);

        //totalTime
        if (finishType.enumValueIndex == 1)
        {
            EditorGUILayout.PropertyField(totalTime);
        }
    }
コード例 #14
0
 public virtual void SetProperties()
 {
     EditorGUILayout.Space();
     detectZones.ArrayFieldButtons("Detect Zone", true, true, true, true, DisplayDetectZone);
     unitAITriggers.ArrayFieldButtons("AI Event Trigger", true, true, true, true, DisplayAITriggers);
 }
コード例 #15
0
 public static void EngineValueEntityArrayField(this SerializedProperty _valueUnitArrayProperty, SerializedProperty _engineValueManager, SerializedProperty _engineEventManager)
 {
     engineEventManager = _engineEventManager;
     engineValueManager = _engineValueManager;
     _valueUnitArrayProperty.ArrayFieldButtons("Entity Value", true, true, true, true, EngineValueEntityField);
 }
コード例 #16
0
 void DisplayTriggers()
 {
     EditorExtensions.LabelFieldCustom("Add/Remove Triggers", FontStyle.Bold);
     triggers.ArrayFieldButtons("Trigger", true, true, true, true, TriggerField);
 }
コード例 #17
0
 protected virtual void SetProperties()
 {
     EditorGUILayout.Space();
     engineEvents.ArrayFieldButtons("Event Container", true, true, true, true, EngineEventField);
 }
コード例 #18
0
 void SetProperties()
 {
     pools.ArrayFieldButtons("Pool Object", true, true, true, true, DisplayPoolList);
 }
コード例 #19
0
 public virtual void SetProperties()
 {
     EditorGUILayout.Space();
     EditorGUILayout.PropertyField(avatarImage);
     UILayouts.ArrayFieldButtons("UI Layouts", true, true, true, true, EngineValueUIField);
 }