//============================================================================// #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); }
//============================================================================// #if UNITY_EDITOR // INITIALIZE // // virtual public void Initialize(BaseStack theOwnerStack, AmpsBlueprint theOwnerBlueprint) { type = ""; subMenuName = ""; ownerBlueprint = theOwnerBlueprint; ownerStack = theOwnerStack; shouldSelectThis = false; exampleInput = Vector4.zero; properties = new List <BaseProperty>(); sharedProperties = new List <BaseProperty>(); moduleName = ScriptableObject.CreateInstance <StringProperty>(); moduleName.Initialize("Description", ""); AddProperty(moduleName, false); selectedProperty = moduleName; }
//============================================================================// #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); }
//============================================================================// #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); }