Beispiel #1
0
//============================================================================//
#if UNITY_EDITOR
        // INITALIZE //
        //
        override public void Initialize(BaseStack theOwnerStack, AmpsBlueprint theOwnerBlueprint)
        {
            base.Initialize(theOwnerStack, theOwnerBlueprint);

            subMenuName = AmpsHelpers.formatEnumString(eCategories.Basic.ToString());
            type        = "Scalar condition";
            SetDefaultName();

            useStackValue = ScriptableObject.CreateInstance <BoolProperty>();
            useStackValue.Initialize("Use stack value?", true, theOwnerBlueprint);
            AddProperty(useStackValue, true);

            valueA = ScriptableObject.CreateInstance <ScalarProperty>();
            valueA.Initialize("Value A", 0f, theOwnerBlueprint);
            AddProperty(valueA, true);

            condition = ScriptableObject.CreateInstance <DropdownProperty>();
            condition.Initialize("Condition", 0, theOwnerBlueprint);
            condition.SetDataModes(true, false, false, false, false, false);
            AddProperty(condition, false);

            valueB = ScriptableObject.CreateInstance <ScalarProperty>();
            valueB.Initialize("Value B", 1f, theOwnerBlueprint);
            AddProperty(valueB, true);

            valueFalse = ScriptableObject.CreateInstance <ScalarProperty>();
            valueFalse.Initialize("Output for FALSE", 1f, theOwnerBlueprint);
            AddProperty(valueFalse, true);

            valueTrue = ScriptableObject.CreateInstance <ScalarProperty>();
            valueTrue.Initialize("Output for TRUE", 1f, theOwnerBlueprint);
            AddProperty(valueTrue, true);
        }
//============================================================================//
#if UNITY_EDITOR
        // INITIALIZE //
        //
        override public void Initialize(BaseStack theOwnerStack, AmpsBlueprint theOwnerBlueprint)
        {
            base.Initialize(theOwnerStack, theOwnerBlueprint);

            weight = ScriptableObject.CreateInstance <ScalarProperty>();
            weight.Initialize("Weight", 1, theOwnerBlueprint);
            weight.SetDataModes(true, true, true, true, false, true);
            AddProperty(weight, false);
            blendMode = ScriptableObject.CreateInstance <DropdownProperty>();
            blendMode.Initialize("Blend mode", 0, theOwnerBlueprint);
            blendMode.SetDataModes(true, false, false, false, false, false);
            AddProperty(blendMode, false);
        }
//============================================================================//
#if UNITY_EDITOR
        // INITIALIZE //
        //
        override public void Initialize(BaseStack theOwnerStack, AmpsBlueprint theOwnerBlueprint)
        {
            base.Initialize(theOwnerStack, theOwnerBlueprint);

            subMenuName = AmpsHelpers.formatEnumString(eCategories.Misc.ToString());
            type        = "Event listener";
            SetDefaultName();

            eventName = ScriptableObject.CreateInstance <StringProperty>();
            eventName.Initialize("Event name", theOwnerBlueprint);
            eventName.value = "event";
            eventName.SetDataModes(true, false, false, false, false, false);
            AddProperty(eventName, false);

            untriggeredValue = ScriptableObject.CreateInstance <VectorProperty>();
            untriggeredValue.Initialize("Untriggered value", theOwnerBlueprint);
            AddProperty(untriggeredValue, false);

            triggeredCustomValue = ScriptableObject.CreateInstance <VectorProperty>();
            triggeredCustomValue.Initialize("Triggered value", theOwnerBlueprint);
            triggeredCustomValue.constant = new Vector4(1, 0, 0, 0);
            AddProperty(triggeredCustomValue, false);

            triggerDataMode = ScriptableObject.CreateInstance <DropdownProperty>();
            triggerDataMode.Initialize("Trigger data mode", 0, theOwnerBlueprint);
            triggerDataMode.SetDataModes(true, false, false, false, false, false);
            AddProperty(triggerDataMode, false);

            infiniteTriggerCount = ScriptableObject.CreateInstance <BoolProperty>();
            infiniteTriggerCount.Initialize("Infinite trigger count?", theOwnerBlueprint);
            infiniteTriggerCount.value = true;
            infiniteTriggerCount.SetDataModes(true, false, false, false, false, false);
            AddProperty(infiniteTriggerCount, false);

            maxTriggerCount = ScriptableObject.CreateInstance <ScalarProperty>();
            maxTriggerCount.Initialize("Max trigger count per loop", 1f, theOwnerBlueprint);
            maxTriggerCount.SetDataModes(true, false, false, false, false, false);
            maxTriggerCount.isInteger = true;
            AddProperty(maxTriggerCount, false);

            triggerToggle = ScriptableObject.CreateInstance <BoolProperty>();
            triggerToggle.Initialize("Does an event toggle?", theOwnerBlueprint);
            triggerToggle.value = true;
            triggerToggle.SetDataModes(true, false, false, false, false, false);
            AddProperty(triggerToggle, false);

            triggerDuration = ScriptableObject.CreateInstance <ScalarProperty>();
            triggerDuration.Initialize("Trigger duration", 1f, theOwnerBlueprint);
            triggerDuration.SetDataModes(true, true, false, false, false, false);
            AddProperty(triggerDuration, false);
        }
Beispiel #4
0
//============================================================================//
#if UNITY_EDITOR
        // INITIALIZE //
        //
        override public void Initialize(BaseStack theOwnerStack, AmpsBlueprint theOwnerBlueprint)
        {
            base.Initialize(theOwnerStack, theOwnerBlueprint);

            subMenuName = AmpsHelpers.formatEnumString(eCategories.Misc.ToString());
            type        = "Child control";
            SetDefaultName();

            value = ScriptableObject.CreateInstance <ScalarProperty>();
            value.Initialize("Value", 0f, theOwnerBlueprint);
            value.SetDataModes(true, false, false, false, false, false);
            AddProperty(value, false);

            condition = ScriptableObject.CreateInstance <DropdownProperty>();
            condition.Initialize("Condition", 0, theOwnerBlueprint);
            condition.SetDataModes(true, false, false, false, false, false);
            AddProperty(condition, false);

            useCurrentStack = ScriptableObject.CreateInstance <BoolProperty>();
            useCurrentStack.Initialize("Current stack?", theOwnerBlueprint);
            useCurrentStack.value = true;
            useCurrentStack.SetDataModes(true, false, false, false, false, false);
            AddProperty(useCurrentStack, false);

            property = ScriptableObject.CreateInstance <DropdownProperty>();
            property.Initialize("Property", 0, theOwnerBlueprint);
            property.SetDataModes(true, false, false, false, false, false);
            AddProperty(property, false);

            propertyVectorComponent = ScriptableObject.CreateInstance <DropdownProperty>();
            propertyVectorComponent.Initialize("Component", 0, theOwnerBlueprint);
            propertyVectorComponent.SetDataModes(true, false, false, false, false, false);
            AddProperty(propertyVectorComponent, false);

            action = ScriptableObject.CreateInstance <DropdownProperty>();
            action.Initialize("Action", 0, theOwnerBlueprint);
            action.SetDataModes(true, false, false, false, false, false);
            AddProperty(action, false);

            maxEventCount = ScriptableObject.CreateInstance <ScalarProperty>();
            maxEventCount.Initialize("Max event count per loop", 1f, theOwnerBlueprint);
            maxEventCount.SetDataModes(true, false, false, false, false, false);
            maxEventCount.isInteger = true;
            AddProperty(maxEventCount, false);

            minEventDelay = ScriptableObject.CreateInstance <ScalarProperty>();
            minEventDelay.Initialize("Min event delay", 0.1f, theOwnerBlueprint);
            minEventDelay.SetDataModes(true, false, false, false, false, false);
            AddProperty(minEventDelay, false);
        }