Ejemplo n.º 1
0
//============================================================================//
#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);
        }
Ejemplo n.º 2
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);
        }
Ejemplo n.º 3
0
//============================================================================//
#if UNITY_EDITOR
        // INITIALIZE //
        //
        override public void Initialize(BaseStack theOwnerStack, AmpsBlueprint theOwnerBlueprint)
        {
            base.Initialize(theOwnerStack, theOwnerBlueprint);

            type = "Basic setup";

            emitterDuration = ScriptableObject.CreateInstance <ScalarProperty>();
            emitterDuration.Initialize("Emitter duration", 5, theOwnerBlueprint);
            emitterDuration.SetDataModes(true, false, false, false, false, true);
            AddProperty(emitterDuration, false);
            isLooping = ScriptableObject.CreateInstance <BoolProperty>();
            isLooping.SetDataModes(true, false, false, false, false, false);
            isLooping.Initialize("Looping?", true, theOwnerBlueprint);
            AddProperty(isLooping, false);
            maxParticles = ScriptableObject.CreateInstance <ScalarProperty>();
            maxParticles.Initialize("Particle limit", 10, theOwnerBlueprint);
            maxParticles.SetDataModes(true, true, false, false, false, false);
            maxParticles.isInteger = true;
            AddProperty(maxParticles, false);
            updateRate = ScriptableObject.CreateInstance <ScalarProperty>();
            updateRate.Initialize("Updates per second", 30, theOwnerBlueprint);
            updateRate.SetDataModes(true, false, false, false, false, false);
            AddProperty(updateRate, false);
            timeScale = ScriptableObject.CreateInstance <ScalarProperty>();
            timeScale.Initialize("Time scale", 1, theOwnerBlueprint);
            timeScale.SetDataModes(true, false, false, false, false, false);
            AddProperty(timeScale, false);
            accelerationNoiseSmoothing = ScriptableObject.CreateInstance <ScalarProperty>();
            accelerationNoiseSmoothing.Initialize("Accel. noise smoothing", 0.5f, theOwnerBlueprint);
            accelerationNoiseSmoothing.SetDataModes(true, false, false, false, false, false);
            AddProperty(accelerationNoiseSmoothing, false);
            playOnAwake = ScriptableObject.CreateInstance <BoolProperty>();
            playOnAwake.SetDataModes(true, false, false, false, false, false);
            playOnAwake.Initialize("Plays on start?", true, theOwnerBlueprint);
            AddProperty(playOnAwake, false);
            pauseWhenUnseenDuration = ScriptableObject.CreateInstance <ScalarProperty>();
            pauseWhenUnseenDuration.Initialize("Pause when unseen duration", 1, theOwnerBlueprint);
            pauseWhenUnseenDuration.SetDataModes(true, false, false, false, false, false);
            AddProperty(pauseWhenUnseenDuration, false);
            //canParentControlPlayback = ScriptableObject.CreateInstance<BoolProperty>();
            //canParentControlPlayback.SetDataModes(true, false, false, false, false, false);
            //canParentControlPlayback.Initialize("Can parent control playback?", true, theOwnerBlueprint);
            //AddProperty(canParentControlPlayback, false);
        }
Ejemplo n.º 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        = "Info";
            SetDefaultName();

            label = ScriptableObject.CreateInstance <StringProperty>();
            label.Initialize("=", theOwnerBlueprint);
            label.value = "n.a.";
            AddProperty(label, false);

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

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