public static void ActivateDamageAStep(int index, BattleAnimation battleAnimation, ActivateDamageAStep baseStep) { baseStep.fold = EditorGUILayout.Foldout(baseStep.fold, "Step "+index+": Activate Damage"); if(baseStep.fold) { BattleAnimationTabs.AnimationStep(index, battleAnimation, baseStep); baseStep.show3 = EditorGUILayout.Toggle("On prefab", baseStep.show3, GUILayout.Width(mWidth)); if(baseStep.show3) { baseStep.prefabID = EditorGUILayout.IntField("Prefab ID", baseStep.prefabID, GUILayout.Width(mWidth)); } EditorGUILayout.Separator(); baseStep.show = EditorGUILayout.Toggle("Active/Inactive", baseStep.show, GUILayout.Width(mWidth)); if(baseStep.show) { EditorGUILayout.Separator(); EditorGUILayout.BeginHorizontal(); baseStep.show2 = EditorGUILayout.Toggle("Add audio", baseStep.show2, GUILayout.Width(mWidth)); if(baseStep.show2) { baseStep.show4 = EditorGUILayout.Toggle("Use index clip", baseStep.show4, GUILayout.Width(mWidth)); if(baseStep.show4) { baseStep.audioID = EditorGUILayout.IntField(baseStep.audioID, GUILayout.Width(mWidth2)); if(baseStep.audioID < 0) baseStep.audioID = 0; else if(baseStep.audioID >= 20) baseStep.audioID = 19; } else baseStep.audioID = EditorGUILayout.Popup(baseStep.audioID, battleAnimation.GetAudioClipList(), GUILayout.Width(mWidth2)); } GUILayout.FlexibleSpace(); EditorGUILayout.EndHorizontal(); if(baseStep.show2) { baseStep.volume = EditorGUILayout.FloatField("Volume", baseStep.volume, GUILayout.Width(mWidth)); EditorGUILayout.BeginHorizontal(); baseStep.float1 = EditorGUILayout.FloatField("Min. distance", baseStep.float1, GUILayout.Width(mWidth2)); baseStep.float2 = EditorGUILayout.FloatField("Max. distance", baseStep.float2, GUILayout.Width(mWidth2)); GUILayout.FlexibleSpace(); EditorGUILayout.EndHorizontal(); baseStep.audioRolloffMode = (AudioRolloffMode)EditorGUILayout.EnumPopup("Rolloff mode", baseStep.audioRolloffMode, GUILayout.Width(mWidth)); baseStep.speed = EditorGUILayout.FloatField("Pitch", baseStep.speed, GUILayout.Width(mWidth)); if(baseStep.speed < 1) baseStep.speed = 1; } EditorGUILayout.Separator(); EditorGUILayout.BeginHorizontal(); baseStep.show5 = EditorGUILayout.Toggle("Add prefab", baseStep.show5, GUILayout.Width(mWidth)); if(baseStep.show5) { baseStep.prefabID2 = EditorGUILayout.Popup(baseStep.prefabID2, battleAnimation.GetPrefabList(), GUILayout.Width(mWidth2)); baseStep.float3 = EditorGUILayout.FloatField("Destroy after", baseStep.float3, GUILayout.Width(mWidth)); } GUILayout.FlexibleSpace(); EditorGUILayout.EndHorizontal(); } EditorGUILayout.Separator(); } }
// spawn steps public static void SpawnPrefabAStep(int index, BattleAnimation battleAnimation, SpawnPrefabAStep baseStep) { baseStep.fold = EditorGUILayout.Foldout(baseStep.fold, "Step "+index+": Spawn Prefab"); if(baseStep.fold) { BattleAnimationTabs.AnimationStep(index, battleAnimation, baseStep); baseStep.prefabID = EditorGUILayout.Popup("Prefab", baseStep.prefabID, battleAnimation.GetPrefabList(), GUILayout.Width(mWidth)); baseStep.number = EditorGUILayout.IntField("Prefab ID", baseStep.number, GUILayout.Width(mWidth)); baseStep.animationObject = (BattleAnimationObject)EditorGUILayout.EnumPopup("On object", baseStep.animationObject, GUILayout.Width(mWidth)); if(BattleAnimationObject.PREFAB.Equals(baseStep.animationObject)) { baseStep.prefabID2 = EditorGUILayout.IntField("Prefab ID", baseStep.prefabID2, GUILayout.Width(mWidth)); } baseStep.pathToChild = EditorGUILayout.TextField("Path to child", baseStep.pathToChild, GUILayout.Width(mWidth*1.2f)); EditorGUILayout.Separator(); baseStep.v3 = EditorGUILayout.Vector3Field("Spawn offset", baseStep.v3, GUILayout.Width(mWidth)); baseStep.show3 = EditorGUILayout.Toggle("Align rotation", baseStep.show3, GUILayout.Width(mWidth)); baseStep.show2 = EditorGUILayout.Toggle("Mount prefab", baseStep.show2, GUILayout.Width(mWidth)); EditorGUILayout.Separator(); } }