public static void BuildField(HeroActionParams actionParams) { HeroAction heroAction = actionParams.heroAction; //----------------------------------------- // create the action fields if they don't exist //----------------------------------------- ActionCommon.CreateActionFieldsOnHeroObject(heroAction, 10); //----------------------------------------- // create the fields for this action //----------------------------------------- SimpleLayout.BeginVertical(SimpleGUI.Fields.Box.StyleB); HeroObject targetHeroObject = GetHeroObjectField.BuildFieldE("Move a different object?", actionParams, heroAction.actionFields[0], heroAction.actionFields[1]); SimpleLayout.EndVertical(); SimpleLayout.BeginVertical(SimpleGUI.Fields.Box.StyleB); GetIntegerField.BuildFieldA("Movement Speed:", actionParams, heroAction.actionFields[2]); SimpleLayout.EndVertical(); SimpleLayout.BeginVertical(SimpleGUI.Fields.Box.StyleB); string[] items = { "Object has animatior controller", "Object has animation component" }; int animationType = GetDropDownField.BuildField("Animation system:", actionParams, heroAction.actionFields[3], new GenericListField(items)); SimpleLayout.EndVertical(); SimpleLayout.BeginVertical(SimpleGUI.Fields.Box.StyleB); if (animationType <= 1) { ActionCommon.GetAnimation("Walk Animation:", actionParams, heroAction.actionFields[4], heroAction.actionFields[5], heroAction.actionFields[6], AnimatorControllerParameterType.Bool, targetHeroObject); } else { ActionCommon.GetAnimation_Legacy("Walk Animation:", actionParams, heroAction.actionFields[4], heroAction.actionFields[5], heroAction.actionFields[6], targetHeroObject); ActionCommon.GetAnimation_Legacy("Idle Animation:", actionParams, heroAction.actionFields[7], heroAction.actionFields[8], heroAction.actionFields[9], targetHeroObject); } SimpleLayout.EndVertical(); }
public static void BuildField(HeroActionParams actionParams) { HeroAction heroAction = actionParams.heroAction; //----------------------------------------- // create the action fields if they don't exist //----------------------------------------- ActionCommon.CreateActionFieldsOnHeroObject(heroAction, 5); //----------------------------------------- // create the fields for this action //----------------------------------------- SimpleLayout.BeginVertical(SimpleGUI.Fields.Box.StyleB); HeroObject targetObject = GetHeroObjectField.BuildFieldE("Animate a different object?", actionParams, heroAction.actionFields[0], heroAction.actionFields[1]); SimpleLayout.EndVertical(); if (targetObject != null) { ActionCommon.GetAnimation("", actionParams, heroAction.actionFields[2], heroAction.actionFields[3], heroAction.actionFields[4], AnimatorControllerParameterType.Bool, targetObject); } }
public static void BuildField(HeroActionParams actionParams) { HeroAction heroAction = actionParams.heroAction; //----------------------------------------- // create the action fields if they don't exist //----------------------------------------- ActionCommon.CreateActionFieldsOnHeroObject(heroAction, 4); //----------------------------------------- // create the fields for this action //----------------------------------------- SimpleLayout.BeginVertical(SimpleGUI.Fields.Box.StyleB); GetDropDownField.BuildField("Operation:", actionParams, heroAction.actionFields[0], new HeroObjectOperatorField()); SimpleLayout.EndVertical(); SimpleLayout.BeginVertical(SimpleGUI.Fields.Box.StyleB); GetHeroObjectField.BuildFieldB("Save the hero objects here:", actionParams, heroAction.actionFields[1]); GetIntegerField.BuildFieldA("Maximum number of hero objects to save:", actionParams, heroAction.actionFields[2]); SimpleLayout.EndVertical(); }
public static void BuildField(HeroActionParams actionParams) { HeroAction heroAction = actionParams.heroAction; //----------------------------------------- // create the action fields if they don't exist //----------------------------------------- ActionCommon.CreateActionFieldsOnHeroObject(heroAction, 21); //----------------------------------------- // create the fields for this action //----------------------------------------- SimpleLayout.BeginVertical(SimpleGUI.Fields.Box.StyleB); GetHeroObjectField.BuildFieldE("Attach the script as a component on a different object?", actionParams, heroAction.actionFields[0], heroAction.actionFields[1]); SimpleLayout.EndVertical(); SimpleLayout.BeginVertical(SimpleGUI.Fields.Box.StyleB); MonoScript script = GetUnityObjectField.BuildFieldA <MonoScript>("The script:", actionParams, heroAction.actionFields[2]); SimpleLayout.EndVertical(); SimpleLayout.BeginVertical(SimpleGUI.Fields.Box.StyleB); GetBoolField.BuildFieldA("Enable the component?", actionParams, heroAction.actionFields[3]); SimpleLayout.EndVertical(); // add method if (script != null) { SimpleLayout.BeginVertical(SimpleGUI.Fields.Box.StyleB); bool result = GetBoolValue.BuildField("Update properties for this script component?", actionParams, heroAction.actionFields[4], true); if (result) { GetPropertyField.BuildFieldA("", actionParams, heroAction.actionFields[5], 6, 20, script, heroAction); } SimpleLayout.EndVertical(); } }
public static void BuildField(HeroActionParams actionParams) { HeroAction heroAction = actionParams.heroAction; //----------------------------------------- // create the action fields if they don't exist //----------------------------------------- ActionCommon.CreateActionFieldsOnHeroObject(heroAction, 8); //----------------------------------------- // create the fields for this action //----------------------------------------- SimpleLayout.BeginVertical(SimpleGUI.Fields.Box.StyleB); GetHeroObjectField.BuildFieldE("Move a different object?", actionParams, heroAction.actionFields[0], heroAction.actionFields[1]); SimpleLayout.EndVertical(); SimpleLayout.BeginVertical(SimpleGUI.Fields.Box.StyleB); GetCoordinatesField.BuildField("", actionParams, heroAction.actionFields[2], heroAction.actionFields[3], heroAction.actionFields[4], heroAction.actionFields[5], heroAction.actionFields[6], heroAction.actionFields[7]); SimpleLayout.EndVertical(); }
public static void BuildField(HeroActionParams actionParams) { HeroAction heroAction = actionParams.heroAction; //----------------------------------------- // create the action fields if they don't exist //----------------------------------------- ActionCommon.CreateActionFieldsOnHeroObject(heroAction, 3); //----------------------------------------- // create the fields for this action //----------------------------------------- SimpleLayout.BeginVertical(SimpleGUI.Fields.Box.StyleB); HeroObject targetHeroObject = GetHeroObjectField.BuildFieldE("Change a different object?", actionParams, heroAction.actionFields[0], heroAction.actionFields[1]); SimpleLayout.EndVertical(); if (targetHeroObject == null) { SimpleLayout.BeginVertical(SimpleGUI.Fields.Box.StyleB); SimpleLayout.Label("This field does not have a hero object type assigned to it."); SimpleLayout.EndVertical(); return; } if (targetHeroObject.states.states == null || targetHeroObject.states.states.Count == 0) { SimpleLayout.BeginVertical(SimpleGUI.Fields.Box.StyleB); SimpleLayout.Label("This hero object has no states."); SimpleLayout.EndVertical(); return; } SimpleLayout.BeginVertical(SimpleGUI.Fields.Box.StyleB); GetDropDownBField.BuildField("Change hero object to this state:", actionParams, heroAction.actionFields[2], new HeroField.StateListField(), targetHeroObject.states.states); SimpleLayout.EndVertical(); }
public static void BuildField(HeroActionParams actionParams) { HeroAction heroAction = actionParams.heroAction; //----------------------------------------- // create the action fields if they don't exist //----------------------------------------- ActionCommon.CreateActionFieldsOnHeroObject(heroAction, 5); //----------------------------------------- // create the fields for this action //----------------------------------------- SimpleLayout.BeginVertical(SimpleGUI.Fields.Box.StyleB); GetHeroObjectField.BuildFieldE("Move a different object?", actionParams, heroAction.actionFields[0], heroAction.actionFields[1]); SimpleLayout.EndVertical(); SimpleLayout.BeginVertical(SimpleGUI.Fields.Box.StyleB); GetFloatField.BuildFieldA("Jump height:", actionParams, heroAction.actionFields[2]); SimpleLayout.EndVertical(); SimpleLayout.BeginVertical(SimpleGUI.Fields.Box.StyleB); GetBoolValue.BuildField("Play next action before this action completes?", actionParams, heroAction.actionFields[4], true); SimpleLayout.EndVertical(); }
public static void BuildField(HeroActionParams actionParams) { HeroAction heroAction = actionParams.heroAction; //----------------------------------------- // create the action fields if they don't exist //----------------------------------------- ActionCommon.CreateActionFieldsOnHeroObject(heroAction, 9); //----------------------------------------- // create the fields for this action //----------------------------------------- SimpleLayout.BeginVertical(SimpleGUI.Fields.Box.StyleB); SimpleLayout.Label("Get the hero objects to filter here:"); GetHeroObjectField.BuildFieldB("", actionParams, heroAction.actionFields[4]); SimpleLayout.Line(); GetHeroObjectField.BuildFieldA("The hero object which has the field of view:", actionParams, heroAction.actionFields[3]); GetChildObjectField.BuildField("Is field of view coming from a child object?", actionParams, heroAction.actionFields[5], heroAction.actionFields[6], false, -20); SimpleLayout.Line(); GetDropDownField.BuildField("Side of the hero object which has the field of view:", actionParams, heroAction.actionFields[7], new RayDirectionTypeField()); GetIntegerField.BuildFieldA("Size of the field of view (in degrees):", actionParams, heroAction.actionFields[8]); SimpleLayout.EndVertical(); SimpleLayout.BeginVertical(SimpleGUI.Fields.Box.StyleB); SimpleLayout.Label("Operation:"); GetDropDownField.BuildField("", actionParams, heroAction.actionFields[0], new HeroObjectOperatorField()); SimpleLayout.EndVertical(); SimpleLayout.BeginVertical(SimpleGUI.Fields.Box.StyleB); SimpleLayout.Label("Save the hero objects here:"); GetHeroObjectField.BuildFieldB("", actionParams, heroAction.actionFields[1]); SimpleLayout.Label("Maximum number of hero objects to save:"); GetIntegerField.BuildFieldA("", actionParams, heroAction.actionFields[2]); SimpleLayout.EndVertical(); }
public static void BuildField(HeroActionParams actionParams) { HeroAction heroAction = actionParams.heroAction; //----------------------------------------- // create the action fields if they don't exist //----------------------------------------- ActionCommon.CreateActionFieldsOnHeroObject(heroAction, 4); //----------------------------------------- // create the fields for this action //----------------------------------------- SimpleLayout.BeginVertical(SimpleGUI.Fields.Box.StyleB); GetHeroObjectField.BuildFieldE("Move a different object?", actionParams, heroAction.actionFields[0], heroAction.actionFields[1]); SimpleLayout.EndVertical(); SimpleLayout.BeginVertical(SimpleGUI.Fields.Box.StyleB); GetIntegerField.BuildFieldA("Movement Speed:", actionParams, heroAction.actionFields[2]); SimpleLayout.EndVertical(); SimpleLayout.BeginVertical(SimpleGUI.Fields.Box.StyleB); GetIntegerField.BuildFieldA("Jump Height:", actionParams, heroAction.actionFields[3]); SimpleLayout.EndVertical(); }
public static void BuildField(HeroActionParams actionParams) { HeroAction heroAction = actionParams.heroAction; //----------------------------------------- // create the action fields if they don't exist //----------------------------------------- ActionCommon.CreateActionFieldsOnHeroObject(heroAction, 23); //----------------------------------------- // create the fields for this action //----------------------------------------- SimpleLayout.BeginVertical(SimpleGUI.Fields.Box.StyleB); GetHeroObjectField.BuildFieldE("Change move settings for a different object?", actionParams, heroAction.actionFields[0], heroAction.actionFields[1]); SimpleLayout.EndVertical(); SimpleLayout.BeginVertical(SimpleGUI.Fields.Box.StyleB); bool changeAnims = GetBoolValue.BuildField("Change Movement Animation?", actionParams, heroAction.actionFields[1], true); if (changeAnims) { SimpleLayout.Line(); SimpleLayout.Label("Enter the name of the bool for each animation you want to change. The bools are stored in the " + "animator controller that is assigned to the hero object. " + "If you leave a field blank, the animation won't be changed for that field.", true); SimpleLayout.Line(); GetStringField.BuildFieldA("Move Default", actionParams, heroAction.actionFields[5]); GetStringField.BuildFieldA("Move Left", actionParams, heroAction.actionFields[6]); GetStringField.BuildFieldA("Move Right", actionParams, heroAction.actionFields[7]); GetStringField.BuildFieldA("Move Up", actionParams, heroAction.actionFields[8]); GetStringField.BuildFieldA("Move Down", actionParams, heroAction.actionFields[9]); GetStringField.BuildFieldA("Move Up Left", actionParams, heroAction.actionFields[10]); GetStringField.BuildFieldA("Move Up Right", actionParams, heroAction.actionFields[11]); GetStringField.BuildFieldA("Move Down Left", actionParams, heroAction.actionFields[12]); GetStringField.BuildFieldA("Move Down Right", actionParams, heroAction.actionFields[13]); } SimpleLayout.EndVertical(); SimpleLayout.BeginVertical(SimpleGUI.Fields.Box.StyleB); bool changeFace = GetBoolValue.BuildField("Change Face Direction Animation?", actionParams, heroAction.actionFields[2], true); if (changeFace) { SimpleLayout.Line(); SimpleLayout.Label("Enter the name of the bool for each animation you want to change. The bools are stored in the " + "animator controller that is assigned to the hero object. " + "If you leave a field blank, the animation won't be changed for that field.", true); SimpleLayout.Line(); GetStringField.BuildFieldA("Face Default", actionParams, heroAction.actionFields[14]); GetStringField.BuildFieldA("Face Left", actionParams, heroAction.actionFields[15]); GetStringField.BuildFieldA("Face Right", actionParams, heroAction.actionFields[16]); GetStringField.BuildFieldA("Face Up", actionParams, heroAction.actionFields[17]); GetStringField.BuildFieldA("Face Down", actionParams, heroAction.actionFields[18]); GetStringField.BuildFieldA("Face Up Left", actionParams, heroAction.actionFields[19]); GetStringField.BuildFieldA("Face Up Right", actionParams, heroAction.actionFields[20]); GetStringField.BuildFieldA("Face Down Left", actionParams, heroAction.actionFields[21]); GetStringField.BuildFieldA("Face Down Right", actionParams, heroAction.actionFields[22]); } SimpleLayout.EndVertical(); }
public static void BuildField(HeroActionParams actionParams) { HeroAction heroAction = actionParams.heroAction; //----------------------------------------- // create the action fields if they don't exist //----------------------------------------- ActionCommon.CreateActionFieldsOnHeroObject(heroAction, 20); //----------------------------------------- // create the fields for this action //----------------------------------------- // spawn object from a pool? SimpleLayout.BeginVertical(SimpleGUI.Fields.Box.StyleB); bool usePool = GetBoolValue.BuildField("Spawn from pool? (Yes=True, No=False)", actionParams, heroAction.actionFields[1], true); if (usePool) { GetStringField.BuildFieldA("", actionParams, heroAction.actionFields[2]); } SimpleLayout.EndVertical(); // spawn from hero object (1) or prefab (2) SimpleLayout.BeginVertical(SimpleGUI.Fields.Box.StyleB); string[] items = { "Spawn object from Hero Object", "Spawn object from Prefab" }; int result = GetDropDownField.BuildField("Spawn the object from:", actionParams, heroAction.actionFields[0], new GenericListField(items)); if (result == 1) { GetHeroObjectField.BuildFieldC("Hero Object:", actionParams, heroAction.actionFields[3]); GetBoolValue.BuildField("Debug this Hero Object?", actionParams, heroAction.actionFields[4], true); GetBoolValue.BuildField("Don't save this Hero Object?", actionParams, heroAction.actionFields[5], true); } else if (result == 2) { if (!usePool) { GetPrefabValue.BuildField("Prefab:", actionParams, heroAction.actionFields[5]); } } SimpleLayout.EndVertical(); // change position? SimpleLayout.BeginVertical(SimpleGUI.Fields.Box.StyleB); bool changePos = GetBoolValue.BuildField("Change position?", actionParams, heroAction.actionFields[6], true); if (changePos) { GetCoordinatesField.BuildField("", actionParams, heroAction.actionFields[7], heroAction.actionFields[8], heroAction.actionFields[9], heroAction.actionFields[10], heroAction.actionFields[11], heroAction.actionFields[12]); } SimpleLayout.EndVertical(); // change rotation? SimpleLayout.BeginVertical(SimpleGUI.Fields.Box.StyleB); bool changeRotation = GetBoolValue.BuildField("Change rotation?", actionParams, heroAction.actionFields[13], true); if (changeRotation) { GetCoordinatesField.BuildField("", actionParams, heroAction.actionFields[14], heroAction.actionFields[15], heroAction.actionFields[16], heroAction.actionFields[17], heroAction.actionFields[18], heroAction.actionFields[19]); } SimpleLayout.EndVertical(); }