예제 #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 creator";
            SetDefaultName();

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

            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);

            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);

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

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

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

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