diff --git a/Assets/CAF/CAF.asmdef b/Assets/CAF/CAF.asmdef index bec8138d..2a9c4707 100644 --- a/Assets/CAF/CAF.asmdef +++ b/Assets/CAF/CAF.asmdef @@ -1,7 +1,9 @@ { "name": "CAF", "references": [ - "GUID:b8e24fd1eb19b4226afebb2810e3c19b" + "GUID:b8e24fd1eb19b4226afebb2810e3c19b", + "GUID:d178ac4b10764814c8ae876ce6354d19", + "GUID:466d4cb32fd66ef4f99747d4eb7191d9" ], "includePlatforms": [], "excludePlatforms": [], diff --git a/Assets/CAF/Editor/Combat/Attack/AttackDefinitionEditorWindow.cs b/Assets/CAF/Editor/Combat/Attack/AttackDefinitionEditorWindow.cs index 881be1f9..adf56973 100644 --- a/Assets/CAF/Editor/Combat/Attack/AttackDefinitionEditorWindow.cs +++ b/Assets/CAF/Editor/Combat/Attack/AttackDefinitionEditorWindow.cs @@ -526,8 +526,17 @@ protected virtual void ShowEventInfo(int eventSelected) EditorGUI.indentLevel++; if(attack.events[eventSelected].inputCheckTiming != AttackEventInputCheckTiming.NONE) { + SerializedObject serializedObject = new UnityEditor.SerializedObject(attack); + serializedObject.Update(); attack.events[eventSelected].inputCheckStartFrame = (uint)EditorGUILayout.IntField("Start Frame", (int)attack.events[eventSelected].inputCheckStartFrame); attack.events[eventSelected].inputCheckEndFrame = (uint)EditorGUILayout.IntField("End Frame", (int)attack.events[eventSelected].inputCheckEndFrame); + EditorGUILayout.Space(); + EditorGUILayout.LabelField("Input"); + attack.events[eventSelected].input.DrawInspector( + serializedObject.FindProperty("events").GetArrayElementAtIndex(eventSelected).FindPropertyRelative("input").FindPropertyRelative("executeInputs"), + serializedObject.FindProperty("events").GetArrayElementAtIndex(eventSelected).FindPropertyRelative("input").FindPropertyRelative("sequenceInputs") + ); + serializedObject.ApplyModifiedProperties(); } EditorGUI.indentLevel--; diff --git a/Assets/CAF/Entities/Managers/EntityCombatManager.cs b/Assets/CAF/Entities/Managers/EntityCombatManager.cs index b22cf56d..88cd2b58 100644 --- a/Assets/CAF/Entities/Managers/EntityCombatManager.cs +++ b/Assets/CAF/Entities/Managers/EntityCombatManager.cs @@ -195,7 +195,7 @@ protected virtual MovesetAttackNode CheckAttackNode(MovesetAttackNode node) return null; } - public virtual bool CheckForInputSequence(InputSequence sequence) + public virtual bool CheckForInputSequence(InputSequence sequence, bool processSequenceButtons = false, bool holdInput = false) { int currentOffset = 0; // Check execute button(s) @@ -228,7 +228,11 @@ public virtual bool CheckForInputSequence(InputSequence sequence) if (sequence.executeInputs.Count <= 0) { - pressedExecuteInputs = false; + currentOffset++; + if (!processSequenceButtons) + { + pressedExecuteInputs = false; + } } // We did not press the buttons required for this move. if (!pressedExecuteInputs) @@ -241,8 +245,6 @@ public virtual bool CheckForInputSequence(InputSequence sequence) { manager.InputManager.ClearBuffer(sequence.executeInputs[a].buttonID); } - - currentOffset++; // Check sequence button(s). bool pressedSequenceButtons = true; for (int s = 0; s < sequence.sequenceInputs.Count; s++) @@ -270,7 +272,8 @@ public virtual bool CheckForInputSequence(InputSequence sequence) bool foundButton = false; for (int f = currentOffset; f < currentOffset + sequence.sequenceWindow; f++) { - if (manager.InputManager.GetButton(sequence.sequenceInputs[s].buttonID, out int gotOffset, f, false).firstPress) + if ( (!holdInput && manager.InputManager.GetButton(sequence.sequenceInputs[s].buttonID, out int gotOffset, f, false).firstPress) + || (holdInput && manager.InputManager.GetButton(sequence.sequenceInputs[s].buttonID, out int gotOffsetTwo, f, false).isDown) ) { foundButton = true; currentOffset = f; diff --git a/Assets/CAF/Input/InputDefinition.cs b/Assets/CAF/Input/InputDefinition.cs index 7c6fb36e..c37abe43 100644 --- a/Assets/CAF/Input/InputDefinition.cs +++ b/Assets/CAF/Input/InputDefinition.cs @@ -1,4 +1,7 @@ using UnityEngine; +#if UNITY_EDITOR +using UnityEditor; +#endif namespace CAF.Input { @@ -11,6 +14,28 @@ public class InputDefinition //Stick public Vector2 stickDirection; public float directionDeviation = 0.9f; // Directions are compared using dot product. + + public virtual void DrawInspector() + { +#if UNITY_EDITOR + inputType = (InputDefinitionType)EditorGUILayout.EnumPopup(inputType); + switch (inputType) + { + case InputDefinitionType.Button: + buttonID = EditorGUILayout.IntField("ID", buttonID); + break; + case InputDefinitionType.Stick: + EditorGUILayout.BeginHorizontal(); + EditorGUILayout.LabelField("X"); + stickDirection.x = EditorGUILayout.FloatField(stickDirection.x); + EditorGUILayout.LabelField("Y"); + stickDirection.y = EditorGUILayout.FloatField(stickDirection.y); + EditorGUILayout.EndHorizontal(); + directionDeviation = EditorGUILayout.FloatField("Deviation", directionDeviation); + break; + } +#endif + } } public enum InputDefinitionType diff --git a/Assets/CAF/Input/InputSequence.cs b/Assets/CAF/Input/InputSequence.cs index ebc33dc9..93e4a102 100644 --- a/Assets/CAF/Input/InputSequence.cs +++ b/Assets/CAF/Input/InputSequence.cs @@ -1,4 +1,10 @@ -using System.Collections.Generic; +using System; +using System.Collections.Generic; +using UnityEngine; +#if UNITY_EDITOR +using UnityEditor; +#endif +using Malee.List; namespace CAF.Input { @@ -6,8 +12,66 @@ namespace CAF.Input public class InputSequence { public int executeWindow = 3; - public List executeInputs = new List(); + [SerializeField]public List executeInputs = new List(); public int sequenceWindow = 8; - public List sequenceInputs = new List(); + [SerializeField]public List sequenceInputs = new List(); + +#if UNITY_EDITOR + [NonSerialized] private bool executeWindowFoldout = false; + [NonSerialized] private bool sequenceWindowFoldout = false; +#endif + + public virtual void DrawInspector(SerializedProperty executeInputsProperty, SerializedProperty sequenceInputsProperty) + { +#if UNITY_EDITOR + executeWindow = EditorGUILayout.IntField("Execute Window", executeWindow); + DrawInputDefinitionList(ref executeWindowFoldout, "Execute Buttons", ref executeInputs); + EditorGUILayout.Space(); + sequenceWindow = EditorGUILayout.IntField("Sequence Window", sequenceWindow); + DrawInputDefinitionList(ref sequenceWindowFoldout, "Sequence Buttons", ref sequenceInputs); +#endif + } + +#if UNITY_EDITOR + public virtual void DrawInputDefinitionList(ref bool foldout, string foldoutName, ref List inputs) + { + foldout = EditorGUILayout.Foldout(foldout, foldoutName); + if (foldout) + { + EditorGUI.indentLevel++; + + EditorGUILayout.BeginHorizontal(); + GUILayout.Space(EditorGUI.indentLevel * 15); + if(GUILayout.Button("Add Input")) + { + inputs.Add(new InputDefinition()); + } + EditorGUILayout.EndHorizontal(); + + for(int i = 0; i < inputs.Count; i++) + { + EditorGUILayout.BeginHorizontal(); + GUILayout.Space(EditorGUI.indentLevel * 15); + if (GUILayout.Button("X", GUILayout.Width(20))) + { + inputs.RemoveAt(i); + continue; + } + EditorGUILayout.EndHorizontal(); + inputs[i].inputType = (InputDefinitionType)EditorGUILayout.EnumPopup("Input Type", inputs[i].inputType); + switch (inputs[i].inputType) + { + case InputDefinitionType.Button: + inputs[i].buttonID = EditorGUILayout.IntField("Button ID", inputs[i].buttonID); + break; + case InputDefinitionType.Stick: + break; + } + } + + EditorGUI.indentLevel--; + } + } +#endif } } \ No newline at end of file diff --git a/Assets/CAF/Samples/TDAction/Characters/Boxer/BoxerMoveset.asset b/Assets/CAF/Samples/TDAction/Characters/Boxer/BoxerMoveset.asset index d59764d1..73823c54 100644 --- a/Assets/CAF/Samples/TDAction/Characters/Boxer/BoxerMoveset.asset +++ b/Assets/CAF/Samples/TDAction/Characters/Boxer/BoxerMoveset.asset @@ -1,5 +1,58 @@ %YAML 1.1 %TAG !u! tag:unity3d.com,2011: +--- !u!114 &-7301761618268684859 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 5cf4d5189da6b334e93745642899b7ca, type: 3} + m_Name: Combo A (AAAA) + m_EditorClassIdentifier: + graph: {fileID: 11400000} + position: {x: 616, y: -72} + ports: + keys: + - lastNode + - nextNode + values: + - _fieldName: lastNode + _node: {fileID: -7301761618268684859} + _typeQualifiedName: CAF.Combat.MovesetAttackNode, CAF, Version=0.0.0.0, Culture=neutral, + PublicKeyToken=null + connections: + - fieldName: nextNode 0 + node: {fileID: 7879068164077439251} + reroutePoints: [] + _direction: 0 + _connectionType: 0 + _typeConstraint: 0 + _dynamic: 0 + - _fieldName: nextNode + _node: {fileID: -7301761618268684859} + _typeQualifiedName: System.Collections.Generic.List`1[[CAF.Combat.MovesetAttackNode+nextNodeDefinition, + CAF, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null]], mscorlib, Version=4.0.0.0, + Culture=neutral, PublicKeyToken=b77a5c561934e089 + connections: [] + _direction: 1 + _connectionType: 0 + _typeConstraint: 0 + _dynamic: 0 + lastNode: {fileID: 7879068164077439251} + inputSequence: + executeWindow: 3 + executeInputs: + - inputType: 0 + buttonID: 3 + stickDirection: {x: 0, y: 0} + directionDeviation: 0.9 + sequenceWindow: 8 + sequenceInputs: [] + attackDefinition: {fileID: 11400000, guid: 6576094d7b5a1674499fa2f6f0a9990b, type: 2} + nextNode: [] --- !u!114 &-3053810752503418589 MonoBehaviour: m_ObjectHideFlags: 0 @@ -10,7 +63,7 @@ MonoBehaviour: m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: 11500000, guid: 5cf4d5189da6b334e93745642899b7ca, type: 3} - m_Name: Ground_A + m_Name: Combo A (A) m_EditorClassIdentifier: graph: {fileID: 11400000} position: {x: -170.5, y: -75.5} @@ -58,7 +111,7 @@ MonoBehaviour: - inputType: 0 buttonID: 3 stickDirection: {x: 0, y: 0} - directionDeviation: 0 + directionDeviation: 0.9 sequenceWindow: 8 sequenceInputs: [] attackDefinition: {fileID: 11400000, guid: e7782add1c595bb4fa111a9e95eee407, type: 2} @@ -78,7 +131,7 @@ MonoBehaviour: m_Name: Air_AA m_EditorClassIdentifier: graph: {fileID: 11400000} - position: {x: 104, y: 472} + position: {x: 88, y: 712} ports: keys: - lastNode @@ -126,7 +179,7 @@ MonoBehaviour: - inputType: 0 buttonID: 3 stickDirection: {x: 0, y: 0} - directionDeviation: 0 + directionDeviation: 0.9 sequenceWindow: 8 sequenceInputs: [] attackDefinition: {fileID: 11400000, guid: ed10805aadc96f34fa790986ded89a03, type: 2} @@ -153,7 +206,10 @@ MonoBehaviour: - {fileID: 509854845894301865} - {fileID: -2480016657355686588} - {fileID: 6984970888826348028} - groundAttackCommandNormals: [] + - {fileID: -7301761618268684859} + - {fileID: 3231258674586516776} + groundAttackCommandNormals: + - {fileID: 8357619711189707542} groundAttackStartNodes: - {fileID: -3053810752503418589} airAttackCommandNormals: [] @@ -172,7 +228,7 @@ MonoBehaviour: m_Name: Air_A m_EditorClassIdentifier: graph: {fileID: 11400000} - position: {x: -152, y: 472} + position: {x: -168, y: 712} ports: keys: - lastNode @@ -217,13 +273,59 @@ MonoBehaviour: - inputType: 0 buttonID: 3 stickDirection: {x: 0, y: 0} - directionDeviation: 0 + directionDeviation: 0.9 sequenceWindow: 8 sequenceInputs: [] attackDefinition: {fileID: 11400000, guid: bcad4f9de9756054483693c781c2415f, type: 2} nextNode: - cancelWindow: {x: 10, y: 60} node: {fileID: -2480016657355686588} +--- !u!114 &3231258674586516776 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 5cf4d5189da6b334e93745642899b7ca, type: 3} + m_Name: Launcher B + m_EditorClassIdentifier: + graph: {fileID: 11400000} + position: {x: 88, y: -520} + ports: + keys: + - lastNode + - nextNode + values: + - _fieldName: lastNode + _node: {fileID: 3231258674586516776} + _typeQualifiedName: CAF.Combat.MovesetAttackNode, CAF, Version=0.0.0.0, Culture=neutral, + PublicKeyToken=null + connections: [] + _direction: 0 + _connectionType: 0 + _typeConstraint: 0 + _dynamic: 0 + - _fieldName: nextNode + _node: {fileID: 3231258674586516776} + _typeQualifiedName: System.Collections.Generic.List`1[[CAF.Combat.MovesetAttackNode+nextNodeDefinition, + CAF, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null]], mscorlib, Version=4.0.0.0, + Culture=neutral, PublicKeyToken=b77a5c561934e089 + connections: [] + _direction: 1 + _connectionType: 0 + _typeConstraint: 0 + _dynamic: 0 + lastNode: {fileID: 0} + inputSequence: + executeWindow: 3 + executeInputs: [] + sequenceWindow: 8 + sequenceInputs: [] + attackDefinition: {fileID: 11400000, guid: 3b414d9b9b56e9841b1e9378e0767686, type: 2} + nextNode: [] --- !u!114 &6984970888826348028 MonoBehaviour: m_ObjectHideFlags: 0 @@ -237,7 +339,7 @@ MonoBehaviour: m_Name: Moveset Attack m_EditorClassIdentifier: graph: {fileID: 11400000} - position: {x: 360, y: 472} + position: {x: 344, y: 712} ports: keys: - lastNode @@ -272,7 +374,7 @@ MonoBehaviour: - inputType: 0 buttonID: 3 stickDirection: {x: 0, y: 0} - directionDeviation: 0 + directionDeviation: 0.9 sequenceWindow: 8 sequenceInputs: [] attackDefinition: {fileID: 11400000, guid: 3769cdcf98e521b4ea509fdf35d3b9a5, type: 2} @@ -287,7 +389,7 @@ MonoBehaviour: m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: 11500000, guid: 5cf4d5189da6b334e93745642899b7ca, type: 3} - m_Name: Ground_AA + m_Name: Combo A (AA) m_EditorClassIdentifier: graph: {fileID: 11400000} position: {x: 88, y: -72} @@ -338,10 +440,10 @@ MonoBehaviour: - inputType: 0 buttonID: 3 stickDirection: {x: 0, y: 0} - directionDeviation: 0 + directionDeviation: 0.9 sequenceWindow: 8 sequenceInputs: [] - attackDefinition: {fileID: 11400000, guid: 2e0abd68fbe37d246b9fe3a7446475be, type: 2} + attackDefinition: {fileID: 11400000, guid: b9cf44b696c953b40a7ed6d1e516910b, type: 2} nextNode: - cancelWindow: {x: 10, y: 60} node: {fileID: 7879068164077439251} @@ -355,7 +457,7 @@ MonoBehaviour: m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: 11500000, guid: 5cf4d5189da6b334e93745642899b7ca, type: 3} - m_Name: Grond_AAA + m_Name: Combo A (AAA) m_EditorClassIdentifier: graph: {fileID: 11400000} position: {x: 344, y: -72} @@ -363,6 +465,7 @@ MonoBehaviour: keys: - lastNode - nextNode + - nextNode 0 values: - _fieldName: lastNode _node: {fileID: 7879068164077439251} @@ -386,6 +489,18 @@ MonoBehaviour: _connectionType: 0 _typeConstraint: 0 _dynamic: 0 + - _fieldName: nextNode 0 + _node: {fileID: 7879068164077439251} + _typeQualifiedName: CAF.Combat.MovesetAttackNode+nextNodeDefinition, CAF, Version=0.0.0.0, + Culture=neutral, PublicKeyToken=null + connections: + - fieldName: lastNode + node: {fileID: -7301761618268684859} + reroutePoints: [] + _direction: 1 + _connectionType: 0 + _typeConstraint: 0 + _dynamic: 1 lastNode: {fileID: 7489305346470690819} inputSequence: executeWindow: 3 @@ -393,11 +508,13 @@ MonoBehaviour: - inputType: 0 buttonID: 3 stickDirection: {x: 0, y: 0} - directionDeviation: 0 + directionDeviation: 0.9 sequenceWindow: 8 sequenceInputs: [] - attackDefinition: {fileID: 11400000, guid: 70e3e4c4a9abb8a4fac77a6ca3d3dc29, type: 2} - nextNode: [] + attackDefinition: {fileID: 11400000, guid: eb883a81e54b5374a884a11fbf12647f, type: 2} + nextNode: + - cancelWindow: {x: 9, y: 60} + node: {fileID: -7301761618268684859} --- !u!114 &8357619711189707542 MonoBehaviour: m_ObjectHideFlags: 0 @@ -408,7 +525,7 @@ MonoBehaviour: m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: 11500000, guid: 5cf4d5189da6b334e93745642899b7ca, type: 3} - m_Name: Ground_Up+A + m_Name: Launcher A m_EditorClassIdentifier: graph: {fileID: 11400000} position: {x: -168, y: -520} @@ -443,12 +560,12 @@ MonoBehaviour: - inputType: 0 buttonID: 3 stickDirection: {x: 0, y: 0} - directionDeviation: 0 + directionDeviation: 0.9 sequenceWindow: 8 sequenceInputs: - inputType: 1 buttonID: 0 stickDirection: {x: 0, y: 1} - directionDeviation: 0.85 - attackDefinition: {fileID: 0} + directionDeviation: 0.9 + attackDefinition: {fileID: 11400000, guid: b14ced946c397f744adeb1815ddcaedc, type: 2} nextNode: [] diff --git a/Assets/CAF/Samples/TDAction/Characters/Boxer/Moveset/Ground/Ground A.asset b/Assets/CAF/Samples/TDAction/Characters/Boxer/Moveset/Ground/Combo A (A).asset similarity index 98% rename from Assets/CAF/Samples/TDAction/Characters/Boxer/Moveset/Ground/Ground A.asset rename to Assets/CAF/Samples/TDAction/Characters/Boxer/Moveset/Ground/Combo A (A).asset index ca257b77..bb446e58 100644 --- a/Assets/CAF/Samples/TDAction/Characters/Boxer/Moveset/Ground/Ground A.asset +++ b/Assets/CAF/Samples/TDAction/Characters/Boxer/Moveset/Ground/Combo A (A).asset @@ -10,7 +10,7 @@ MonoBehaviour: m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: 11500000, guid: b727ab7513f07da4ab8ca7d2f6d52cc9, type: 3} - m_Name: Ground A + m_Name: Combo A (A) m_EditorClassIdentifier: attackName: Ground A description: @@ -140,7 +140,7 @@ MonoBehaviour: damageOnHit: 0 damageOnBlock: 0 causesTumble: 0 - opponentForceMagnitude: 0.1 + opponentForceMagnitude: 0.05 opponentForceDir: {x: 1, y: 0, z: 0} forceIncludeYForce: 0 opponentMaxMagnitude: 1 diff --git a/Assets/CAF/Samples/TDAction/Characters/Boxer/Moveset/Ground/Ground A.asset.meta b/Assets/CAF/Samples/TDAction/Characters/Boxer/Moveset/Ground/Combo A (A).asset.meta similarity index 100% rename from Assets/CAF/Samples/TDAction/Characters/Boxer/Moveset/Ground/Ground A.asset.meta rename to Assets/CAF/Samples/TDAction/Characters/Boxer/Moveset/Ground/Combo A (A).asset.meta diff --git a/Assets/CAF/Samples/TDAction/Characters/Boxer/Moveset/Ground/Combo A (AA).asset b/Assets/CAF/Samples/TDAction/Characters/Boxer/Moveset/Ground/Combo A (AA).asset new file mode 100644 index 00000000..16e1122a --- /dev/null +++ b/Assets/CAF/Samples/TDAction/Characters/Boxer/Moveset/Ground/Combo A (AA).asset @@ -0,0 +1,158 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &11400000 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: b727ab7513f07da4ab8ca7d2f6d52cc9, type: 3} + m_Name: Combo A (AA) + m_EditorClassIdentifier: + attackName: Ground AA + description: + stateOverride: -1 + length: 25 + animationGround: {fileID: 0} + animationAir: {fileID: 0} + wrapMode: 0 + jumpCancelWindows: + - {x: 6, y: 100} + enemyStepWindows: [] + landCancelWindows: [] + commandAttackCancelWindows: [] + chargeWindows: + - id: 0 + boxGroups: + - id: 1 + events: + - id: 2 + - id: 3 + references: + version: 1 + 00000000: + type: {class: ChargeDefinition, ns: CAF.Combat, asm: CAF} + data: + frame: 4 + releaseOnCompletion: 0 + chargeLevels: + - maxChargeFrames: 30 + 00000001: + type: {class: BoxGroup, ns: CAF.Combat, asm: CAF} + data: + ID: 0 + activeFramesStart: 5 + activeFramesEnd: 13 + hitGroupType: 0 + boxes: + - id: 4 + attachToEntity: 1 + chargeLevelNeeded: -1 + chargeLevelMax: 1 + hitboxHitInfo: + id: 5 + 00000002: + type: {class: AttackEventDefinition, ns: CAF.Combat, asm: CAF} + data: + nickname: High.Friction + active: 1 + onHit: 0 + onHitHitboxGroup: 0 + startFrame: 1 + endFrame: 4 + attackEvent: + id: 6 + variables: + intVars: + floatVars: + - 0.013 + objectVars: [] + curveVars: [] + inputCheckTiming: 0 + inputCheckStartFrame: 1 + inputCheckEndFrame: 1 + input: + executeWindow: 3 + executeInputs: [] + sequenceWindow: 8 + sequenceInputs: [] + inputCheckProcessed: 0 + 00000003: + type: {class: AttackEventDefinition, ns: CAF.Combat, asm: CAF} + data: + nickname: Friction + active: 1 + onHit: 0 + onHitHitboxGroup: 0 + startFrame: 5 + endFrame: 35 + attackEvent: + id: 7 + variables: + intVars: + floatVars: + - 0.005 + objectVars: [] + curveVars: [] + inputCheckTiming: 0 + inputCheckStartFrame: 1 + inputCheckEndFrame: 1 + input: + executeWindow: 3 + executeInputs: [] + sequenceWindow: 8 + sequenceInputs: [] + inputCheckProcessed: 0 + 00000004: + type: {class: BoxDefinition, ns: CAF.Combat, asm: CAF} + data: + shape: 0 + offset: {x: 1, y: 0.5, z: 0} + size: {x: 3, y: 3, z: 0} + rotation: {x: 0, y: 0, z: 0} + radius: 0 + height: 0 + 00000005: + type: {class: HitInfo, ns: CAF.Combat, asm: CAF} + data: + airOnly: 0 + groundOnly: 0 + hitKills: 1 + continuousHit: 0 + spaceBetweenHits: 0 + opponentResetXForce: 1 + opponentResetYForce: 1 + attackerHitstop: 4 + hitstop: 4 + hitstun: 30 + forceType: 0 + forceRelation: 0 + breakArmor: 0 + unblockable: 0 + knockdown: 0 + groundBounces: 0 + groundBounceForce: 0 + wallBounces: 0 + wallBounceForce: 0 + damageOnHit: 0 + damageOnBlock: 0 + causesTumble: 0 + opponentForceMagnitude: 0.05 + opponentForceDir: {x: 1, y: 0, z: 0} + forceIncludeYForce: 0 + opponentMaxMagnitude: 1 + opponentMinMagnitude: 1 + throwConfirm: {fileID: 0} + 00000006: + type: {class: ApplyFriction, ns: TDAction.Combat.Events, asm: TDAction_CSharp} + data: + xFriction: 1 + yFriction: 0 + 00000007: + type: {class: ApplyFriction, ns: TDAction.Combat.Events, asm: TDAction_CSharp} + data: + xFriction: 1 + yFriction: 0 diff --git a/Assets/CAF/Samples/TDAction/Characters/Boxer/Moveset/Ground/Combo A (AA).asset.meta b/Assets/CAF/Samples/TDAction/Characters/Boxer/Moveset/Ground/Combo A (AA).asset.meta new file mode 100644 index 00000000..5bbb93b1 --- /dev/null +++ b/Assets/CAF/Samples/TDAction/Characters/Boxer/Moveset/Ground/Combo A (AA).asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: b9cf44b696c953b40a7ed6d1e516910b +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/CAF/Samples/TDAction/Characters/Boxer/Moveset/Ground/Combo A (AAA).asset b/Assets/CAF/Samples/TDAction/Characters/Boxer/Moveset/Ground/Combo A (AAA).asset new file mode 100644 index 00000000..16b98b92 --- /dev/null +++ b/Assets/CAF/Samples/TDAction/Characters/Boxer/Moveset/Ground/Combo A (AAA).asset @@ -0,0 +1,213 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &11400000 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: b727ab7513f07da4ab8ca7d2f6d52cc9, type: 3} + m_Name: Combo A (AAA) + m_EditorClassIdentifier: + attackName: Ground AAA + description: + stateOverride: -1 + length: 25 + animationGround: {fileID: 0} + animationAir: {fileID: 0} + wrapMode: 0 + jumpCancelWindows: + - {x: 6, y: 100} + enemyStepWindows: [] + landCancelWindows: [] + commandAttackCancelWindows: [] + chargeWindows: + - id: 0 + boxGroups: + - id: 1 + - id: 2 + events: + - id: 3 + - id: 4 + references: + version: 1 + 00000000: + type: {class: ChargeDefinition, ns: CAF.Combat, asm: CAF} + data: + frame: 4 + releaseOnCompletion: 0 + chargeLevels: + - maxChargeFrames: 30 + 00000001: + type: {class: BoxGroup, ns: CAF.Combat, asm: CAF} + data: + ID: 0 + activeFramesStart: 5 + activeFramesEnd: 8 + hitGroupType: 0 + boxes: + - id: 5 + attachToEntity: 1 + chargeLevelNeeded: -1 + chargeLevelMax: 1 + hitboxHitInfo: + id: 6 + 00000002: + type: {class: BoxGroup, ns: CAF.Combat, asm: CAF} + data: + ID: 1 + activeFramesStart: 10 + activeFramesEnd: 13 + hitGroupType: 0 + boxes: + - id: 7 + attachToEntity: 1 + chargeLevelNeeded: -1 + chargeLevelMax: 1 + hitboxHitInfo: + id: 8 + 00000003: + type: {class: AttackEventDefinition, ns: CAF.Combat, asm: CAF} + data: + nickname: High.Friction + active: 1 + onHit: 0 + onHitHitboxGroup: 0 + startFrame: 1 + endFrame: 4 + attackEvent: + id: 9 + variables: + intVars: + floatVars: + - 0.013 + objectVars: [] + curveVars: [] + inputCheckTiming: 0 + inputCheckStartFrame: 1 + inputCheckEndFrame: 1 + input: + executeWindow: 3 + executeInputs: [] + sequenceWindow: 8 + sequenceInputs: [] + inputCheckProcessed: 0 + 00000004: + type: {class: AttackEventDefinition, ns: CAF.Combat, asm: CAF} + data: + nickname: Friction + active: 1 + onHit: 0 + onHitHitboxGroup: 0 + startFrame: 5 + endFrame: 35 + attackEvent: + id: 10 + variables: + intVars: + floatVars: + - 0.005 + objectVars: [] + curveVars: [] + inputCheckTiming: 0 + inputCheckStartFrame: 1 + inputCheckEndFrame: 1 + input: + executeWindow: 3 + executeInputs: [] + sequenceWindow: 8 + sequenceInputs: [] + inputCheckProcessed: 0 + 00000005: + type: {class: BoxDefinition, ns: CAF.Combat, asm: CAF} + data: + shape: 0 + offset: {x: 1, y: 0, z: 0} + size: {x: 2, y: 1.5, z: 0} + rotation: {x: 0, y: 0, z: 0} + radius: 0 + height: 0 + 00000006: + type: {class: HitInfo, ns: CAF.Combat, asm: CAF} + data: + airOnly: 0 + groundOnly: 0 + hitKills: 1 + continuousHit: 0 + spaceBetweenHits: 0 + opponentResetXForce: 1 + opponentResetYForce: 1 + attackerHitstop: 4 + hitstop: 4 + hitstun: 30 + forceType: 0 + forceRelation: 0 + breakArmor: 0 + unblockable: 0 + knockdown: 0 + groundBounces: 0 + groundBounceForce: 0 + wallBounces: 0 + wallBounceForce: 0 + damageOnHit: 0 + damageOnBlock: 0 + causesTumble: 0 + opponentForceMagnitude: 0.05 + opponentForceDir: {x: 1, y: 0, z: 0} + forceIncludeYForce: 0 + opponentMaxMagnitude: 1 + opponentMinMagnitude: 1 + throwConfirm: {fileID: 0} + 00000007: + type: {class: BoxDefinition, ns: CAF.Combat, asm: CAF} + data: + shape: 0 + offset: {x: 1, y: 0, z: 0} + size: {x: 2, y: 1.5, z: 0} + rotation: {x: 0, y: 0, z: 0} + radius: 0 + height: 0 + 00000008: + type: {class: HitInfo, ns: CAF.Combat, asm: CAF} + data: + airOnly: 0 + groundOnly: 0 + hitKills: 1 + continuousHit: 0 + spaceBetweenHits: 0 + opponentResetXForce: 1 + opponentResetYForce: 1 + attackerHitstop: 4 + hitstop: 4 + hitstun: 30 + forceType: 0 + forceRelation: 0 + breakArmor: 0 + unblockable: 0 + knockdown: 0 + groundBounces: 0 + groundBounceForce: 0 + wallBounces: 0 + wallBounceForce: 0 + damageOnHit: 0 + damageOnBlock: 0 + causesTumble: 0 + opponentForceMagnitude: 0.05 + opponentForceDir: {x: 1, y: 0, z: 0} + forceIncludeYForce: 0 + opponentMaxMagnitude: 1 + opponentMinMagnitude: 1 + throwConfirm: {fileID: 0} + 00000009: + type: {class: ApplyFriction, ns: TDAction.Combat.Events, asm: TDAction_CSharp} + data: + xFriction: 1 + yFriction: 0 + 0000000A: + type: {class: ApplyFriction, ns: TDAction.Combat.Events, asm: TDAction_CSharp} + data: + xFriction: 1 + yFriction: 0 diff --git a/Assets/CAF/Samples/TDAction/Characters/Boxer/Moveset/Ground/Combo A (AAA).asset.meta b/Assets/CAF/Samples/TDAction/Characters/Boxer/Moveset/Ground/Combo A (AAA).asset.meta new file mode 100644 index 00000000..e0d87f7d --- /dev/null +++ b/Assets/CAF/Samples/TDAction/Characters/Boxer/Moveset/Ground/Combo A (AAA).asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: eb883a81e54b5374a884a11fbf12647f +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/CAF/Samples/TDAction/Characters/Boxer/Moveset/Ground/Combo A (AAAA).asset b/Assets/CAF/Samples/TDAction/Characters/Boxer/Moveset/Ground/Combo A (AAAA).asset new file mode 100644 index 00000000..d6e9552a --- /dev/null +++ b/Assets/CAF/Samples/TDAction/Characters/Boxer/Moveset/Ground/Combo A (AAAA).asset @@ -0,0 +1,158 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &11400000 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: b727ab7513f07da4ab8ca7d2f6d52cc9, type: 3} + m_Name: Combo A (AAAA) + m_EditorClassIdentifier: + attackName: Ground AAA + description: + stateOverride: -1 + length: 25 + animationGround: {fileID: 0} + animationAir: {fileID: 0} + wrapMode: 0 + jumpCancelWindows: + - {x: 6, y: 100} + enemyStepWindows: [] + landCancelWindows: [] + commandAttackCancelWindows: [] + chargeWindows: + - id: 0 + boxGroups: + - id: 1 + events: + - id: 2 + - id: 3 + references: + version: 1 + 00000000: + type: {class: ChargeDefinition, ns: CAF.Combat, asm: CAF} + data: + frame: 4 + releaseOnCompletion: 0 + chargeLevels: + - maxChargeFrames: 30 + 00000001: + type: {class: BoxGroup, ns: CAF.Combat, asm: CAF} + data: + ID: 0 + activeFramesStart: 8 + activeFramesEnd: 11 + hitGroupType: 0 + boxes: + - id: 4 + attachToEntity: 1 + chargeLevelNeeded: -1 + chargeLevelMax: 1 + hitboxHitInfo: + id: 5 + 00000002: + type: {class: AttackEventDefinition, ns: CAF.Combat, asm: CAF} + data: + nickname: High.Friction + active: 1 + onHit: 0 + onHitHitboxGroup: 0 + startFrame: 1 + endFrame: 4 + attackEvent: + id: 6 + variables: + intVars: + floatVars: + - 0.013 + objectVars: [] + curveVars: [] + inputCheckTiming: 0 + inputCheckStartFrame: 1 + inputCheckEndFrame: 1 + input: + executeWindow: 3 + executeInputs: [] + sequenceWindow: 8 + sequenceInputs: [] + inputCheckProcessed: 0 + 00000003: + type: {class: AttackEventDefinition, ns: CAF.Combat, asm: CAF} + data: + nickname: Friction + active: 1 + onHit: 0 + onHitHitboxGroup: 0 + startFrame: 5 + endFrame: 35 + attackEvent: + id: 7 + variables: + intVars: + floatVars: + - 0.005 + objectVars: [] + curveVars: [] + inputCheckTiming: 0 + inputCheckStartFrame: 1 + inputCheckEndFrame: 1 + input: + executeWindow: 3 + executeInputs: [] + sequenceWindow: 8 + sequenceInputs: [] + inputCheckProcessed: 0 + 00000004: + type: {class: BoxDefinition, ns: CAF.Combat, asm: CAF} + data: + shape: 0 + offset: {x: 0.5, y: 0, z: 0} + size: {x: 1.5, y: 2.25, z: 0} + rotation: {x: 0, y: 0, z: 0} + radius: 0 + height: 0 + 00000005: + type: {class: HitInfo, ns: CAF.Combat, asm: CAF} + data: + airOnly: 0 + groundOnly: 0 + hitKills: 1 + continuousHit: 0 + spaceBetweenHits: 0 + opponentResetXForce: 1 + opponentResetYForce: 1 + attackerHitstop: 4 + hitstop: 4 + hitstun: 30 + forceType: 0 + forceRelation: 0 + breakArmor: 0 + unblockable: 0 + knockdown: 0 + groundBounces: 1 + groundBounceForce: 0 + wallBounces: 0 + wallBounceForce: 0 + damageOnHit: 0 + damageOnBlock: 0 + causesTumble: 0 + opponentForceMagnitude: 0.1 + opponentForceDir: {x: 0, y: -1, z: 0} + forceIncludeYForce: 0 + opponentMaxMagnitude: 1 + opponentMinMagnitude: 1 + throwConfirm: {fileID: 0} + 00000006: + type: {class: ApplyFriction, ns: TDAction.Combat.Events, asm: TDAction_CSharp} + data: + xFriction: 1 + yFriction: 0 + 00000007: + type: {class: ApplyFriction, ns: TDAction.Combat.Events, asm: TDAction_CSharp} + data: + xFriction: 1 + yFriction: 0 diff --git a/Assets/CAF/Samples/TDAction/Characters/Boxer/Moveset/Ground/Combo A (AAAA).asset.meta b/Assets/CAF/Samples/TDAction/Characters/Boxer/Moveset/Ground/Combo A (AAAA).asset.meta new file mode 100644 index 00000000..516c109e --- /dev/null +++ b/Assets/CAF/Samples/TDAction/Characters/Boxer/Moveset/Ground/Combo A (AAAA).asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 6576094d7b5a1674499fa2f6f0a9990b +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/CAF/Samples/TDAction/Characters/Boxer/Moveset/Ground/Launcher A.asset b/Assets/CAF/Samples/TDAction/Characters/Boxer/Moveset/Ground/Launcher A.asset new file mode 100644 index 00000000..cf1c3f53 --- /dev/null +++ b/Assets/CAF/Samples/TDAction/Characters/Boxer/Moveset/Ground/Launcher A.asset @@ -0,0 +1,186 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &11400000 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: b727ab7513f07da4ab8ca7d2f6d52cc9, type: 3} + m_Name: Launcher A + m_EditorClassIdentifier: + attackName: Launcher A + description: + stateOverride: -1 + length: 25 + animationGround: {fileID: 0} + animationAir: {fileID: 0} + wrapMode: 0 + jumpCancelWindows: + - {x: 6, y: 100} + enemyStepWindows: [] + landCancelWindows: [] + commandAttackCancelWindows: [] + chargeWindows: [] + boxGroups: + - id: 0 + events: + - id: 1 + - id: 2 + - id: 3 + references: + version: 1 + 00000000: + type: {class: BoxGroup, ns: CAF.Combat, asm: CAF} + data: + ID: 0 + activeFramesStart: 5 + activeFramesEnd: 9 + hitGroupType: 0 + boxes: + - id: 4 + attachToEntity: 1 + chargeLevelNeeded: -1 + chargeLevelMax: 1 + hitboxHitInfo: + id: 5 + 00000001: + type: {class: AttackEventDefinition, ns: CAF.Combat, asm: CAF} + data: + nickname: High.Friction + active: 1 + onHit: 0 + onHitHitboxGroup: 0 + startFrame: 1 + endFrame: 4 + attackEvent: + id: 6 + variables: + intVars: + floatVars: + - 0.013 + objectVars: [] + curveVars: [] + inputCheckTiming: 0 + inputCheckStartFrame: 1 + inputCheckEndFrame: 1 + input: + executeWindow: 3 + executeInputs: [] + sequenceWindow: 8 + sequenceInputs: [] + inputCheckProcessed: 0 + 00000002: + type: {class: AttackEventDefinition, ns: CAF.Combat, asm: CAF} + data: + nickname: Friction + active: 1 + onHit: 0 + onHitHitboxGroup: 0 + startFrame: 5 + endFrame: 35 + attackEvent: + id: 7 + variables: + intVars: + floatVars: + - 0.005 + objectVars: [] + curveVars: [] + inputCheckTiming: 0 + inputCheckStartFrame: 1 + inputCheckEndFrame: 1 + input: + executeWindow: 3 + executeInputs: [] + sequenceWindow: 8 + sequenceInputs: [] + inputCheckProcessed: 0 + 00000003: + type: {class: AttackEventDefinition, ns: CAF.Combat, asm: CAF} + data: + nickname: Hold Transition + active: 1 + onHit: 0 + onHitHitboxGroup: 0 + startFrame: 1 + endFrame: 4 + attackEvent: + id: 8 + variables: + intVars: 01000000 + floatVars: [] + objectVars: + - {fileID: 3231258674586516776, guid: 5058445f560812b4495278084c0e8945, type: 2} + curveVars: [] + inputCheckTiming: 2 + inputCheckStartFrame: 0 + inputCheckEndFrame: 4 + input: + executeWindow: 0 + executeInputs: [] + sequenceWindow: 1 + sequenceInputs: + - inputType: 0 + buttonID: 3 + stickDirection: {x: 0, y: 0} + directionDeviation: 0.9 + inputCheckProcessed: 1 + 00000004: + type: {class: BoxDefinition, ns: CAF.Combat, asm: CAF} + data: + shape: 0 + offset: {x: 0, y: 0.5, z: 0} + size: {x: 2.5, y: 2.5, z: 0} + rotation: {x: 0, y: 0, z: 0} + radius: 0 + height: 0 + 00000005: + type: {class: HitInfo, ns: CAF.Combat, asm: CAF} + data: + airOnly: 0 + groundOnly: 0 + hitKills: 1 + continuousHit: 0 + spaceBetweenHits: 0 + opponentResetXForce: 1 + opponentResetYForce: 1 + attackerHitstop: 4 + hitstop: 4 + hitstun: 30 + forceType: 0 + forceRelation: 0 + breakArmor: 0 + unblockable: 0 + knockdown: 0 + groundBounces: 0 + groundBounceForce: 0 + wallBounces: 0 + wallBounceForce: 0 + damageOnHit: 0 + damageOnBlock: 0 + causesTumble: 0 + opponentForceMagnitude: 0.05 + opponentForceDir: {x: 0, y: 1, z: 0} + forceIncludeYForce: 0 + opponentMaxMagnitude: 1 + opponentMinMagnitude: 1 + throwConfirm: {fileID: 0} + 00000006: + type: {class: ApplyFriction, ns: TDAction.Combat.Events, asm: TDAction_CSharp} + data: + xFriction: 1 + yFriction: 0 + 00000007: + type: {class: ApplyFriction, ns: TDAction.Combat.Events, asm: TDAction_CSharp} + data: + xFriction: 1 + yFriction: 0 + 00000008: + type: {class: ChangeAttack, ns: TDAction.Combat.Events, asm: TDAction_CSharp} + data: + resetCurrentFrame: 0 + lastFrameExecution: 1 diff --git a/Assets/CAF/Samples/TDAction/Characters/Boxer/Moveset/Ground/Launcher A.asset.meta b/Assets/CAF/Samples/TDAction/Characters/Boxer/Moveset/Ground/Launcher A.asset.meta new file mode 100644 index 00000000..cfe09688 --- /dev/null +++ b/Assets/CAF/Samples/TDAction/Characters/Boxer/Moveset/Ground/Launcher A.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: b14ced946c397f744adeb1815ddcaedc +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/CAF/Samples/TDAction/Characters/Boxer/Moveset/Ground/Launcher B.asset b/Assets/CAF/Samples/TDAction/Characters/Boxer/Moveset/Ground/Launcher B.asset new file mode 100644 index 00000000..49697857 --- /dev/null +++ b/Assets/CAF/Samples/TDAction/Characters/Boxer/Moveset/Ground/Launcher B.asset @@ -0,0 +1,183 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &11400000 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: b727ab7513f07da4ab8ca7d2f6d52cc9, type: 3} + m_Name: Launcher B + m_EditorClassIdentifier: + attackName: Launcher B + description: + stateOverride: -1 + length: 25 + animationGround: {fileID: 0} + animationAir: {fileID: 0} + wrapMode: 0 + jumpCancelWindows: + - {x: 6, y: 100} + enemyStepWindows: [] + landCancelWindows: [] + commandAttackCancelWindows: [] + chargeWindows: [] + boxGroups: + - id: 0 + events: + - id: 1 + - id: 2 + - id: 3 + references: + version: 1 + 00000000: + type: {class: BoxGroup, ns: CAF.Combat, asm: CAF} + data: + ID: 0 + activeFramesStart: 5 + activeFramesEnd: 9 + hitGroupType: 0 + boxes: + - id: 4 + attachToEntity: 1 + chargeLevelNeeded: -1 + chargeLevelMax: 1 + hitboxHitInfo: + id: 5 + 00000001: + type: {class: AttackEventDefinition, ns: CAF.Combat, asm: CAF} + data: + nickname: High.Friction + active: 1 + onHit: 0 + onHitHitboxGroup: 0 + startFrame: 1 + endFrame: 4 + attackEvent: + id: 6 + variables: + intVars: + floatVars: + - 0.013 + objectVars: [] + curveVars: [] + inputCheckTiming: 0 + inputCheckStartFrame: 1 + inputCheckEndFrame: 1 + input: + executeWindow: 3 + executeInputs: [] + sequenceWindow: 8 + sequenceInputs: [] + inputCheckProcessed: 0 + 00000002: + type: {class: AttackEventDefinition, ns: CAF.Combat, asm: CAF} + data: + nickname: Friction + active: 1 + onHit: 0 + onHitHitboxGroup: 0 + startFrame: 5 + endFrame: 35 + attackEvent: + id: 7 + variables: + intVars: + floatVars: + - 0.005 + objectVars: [] + curveVars: [] + inputCheckTiming: 0 + inputCheckStartFrame: 1 + inputCheckEndFrame: 1 + input: + executeWindow: 3 + executeInputs: [] + sequenceWindow: 8 + sequenceInputs: [] + inputCheckProcessed: 0 + 00000003: + type: {class: AttackEventDefinition, ns: CAF.Combat, asm: CAF} + data: + nickname: Up + active: 1 + onHit: 0 + onHitHitboxGroup: 0 + startFrame: 5 + endFrame: 6 + attackEvent: + id: 8 + variables: + intVars: + floatVars: + - 0 + - 0.3 + objectVars: [] + curveVars: [] + inputCheckTiming: 0 + inputCheckStartFrame: 1 + inputCheckEndFrame: 1 + input: + executeWindow: 3 + executeInputs: [] + sequenceWindow: 8 + sequenceInputs: [] + inputCheckProcessed: 0 + 00000004: + type: {class: BoxDefinition, ns: CAF.Combat, asm: CAF} + data: + shape: 0 + offset: {x: 0, y: 0.5, z: 0} + size: {x: 5, y: 5, z: 0} + rotation: {x: 0, y: 0, z: 0} + radius: 0 + height: 0 + 00000005: + type: {class: HitInfo, ns: CAF.Combat, asm: CAF} + data: + airOnly: 0 + groundOnly: 0 + hitKills: 1 + continuousHit: 0 + spaceBetweenHits: 0 + opponentResetXForce: 1 + opponentResetYForce: 1 + attackerHitstop: 4 + hitstop: 4 + hitstun: 30 + forceType: 0 + forceRelation: 0 + breakArmor: 0 + unblockable: 0 + knockdown: 0 + groundBounces: 0 + groundBounceForce: 0 + wallBounces: 0 + wallBounceForce: 0 + damageOnHit: 0 + damageOnBlock: 0 + causesTumble: 0 + opponentForceMagnitude: 0.05 + opponentForceDir: {x: 0, y: 1, z: 0} + forceIncludeYForce: 0 + opponentMaxMagnitude: 1 + opponentMinMagnitude: 1 + throwConfirm: {fileID: 0} + 00000006: + type: {class: ApplyFriction, ns: TDAction.Combat.Events, asm: TDAction_CSharp} + data: + xFriction: 1 + yFriction: 0 + 00000007: + type: {class: ApplyFriction, ns: TDAction.Combat.Events, asm: TDAction_CSharp} + data: + xFriction: 1 + yFriction: 0 + 00000008: + type: {class: ForceSet, ns: TDAction.Combat.Events, asm: TDAction_CSharp} + data: + xForce: 0 + yForce: 1 diff --git a/Assets/CAF/Samples/TDAction/Characters/Boxer/Moveset/Ground/Launcher B.asset.meta b/Assets/CAF/Samples/TDAction/Characters/Boxer/Moveset/Ground/Launcher B.asset.meta new file mode 100644 index 00000000..7c9e0590 --- /dev/null +++ b/Assets/CAF/Samples/TDAction/Characters/Boxer/Moveset/Ground/Launcher B.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 3b414d9b9b56e9841b1e9378e0767686 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/CAF/Samples/TDAction/Scenes/Singletons.unity b/Assets/CAF/Samples/TDAction/Scenes/Singletons.unity index 168cc9d3..b9940caa 100644 --- a/Assets/CAF/Samples/TDAction/Scenes/Singletons.unity +++ b/Assets/CAF/Samples/TDAction/Scenes/Singletons.unity @@ -166,6 +166,7 @@ MonoBehaviour: m_EditorClassIdentifier: gameHandler: currentPlayerEntity: {fileID: 0} + playerHUD: {fileID: 0} frameByFrameMode: 0 playerEntity: {fileID: 8147816337253296054, guid: 566a2b9082a19f54d9a11fabf7eb2be8, type: 3} diff --git a/Assets/CAF/Samples/TDAction/Scripts/Combat/Events/ChangeAttack.cs b/Assets/CAF/Samples/TDAction/Scripts/Combat/Events/ChangeAttack.cs new file mode 100644 index 00000000..df0d871d --- /dev/null +++ b/Assets/CAF/Samples/TDAction/Scripts/Combat/Events/ChangeAttack.cs @@ -0,0 +1,55 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; +using CAF.Combat; +using TDAction.Entities; +#if UNITY_EDITOR +using UnityEditor; +#endif + +namespace TDAction.Combat.Events +{ + public class ChangeAttack : AttackEvent + { + public bool resetCurrentFrame = true; + public bool lastFrameExecution = false; + + public override string GetName() + { + return "Change Attack"; + } + + public override bool Evaluate(uint frame, uint endFrame, + CAF.Entities.EntityManager controller, AttackEventVariables variables) + { + if(lastFrameExecution && frame != endFrame) + { + return false; + } + EntityManager e = (EntityManager)controller; + EntityCombatManager combatManager = (EntityCombatManager)controller.CombatManager; + + e.TryAttack((MovesetAttackNode)variables.objectVars[0]); + return true; + } + +#if UNITY_EDITOR + public override void DrawEventVariables(CAF.Combat.AttackEventDefinition eventDefinition) + { + if (eventDefinition.variables.objectVars == null + || eventDefinition.variables.objectVars.Count != 1) + { + eventDefinition.variables.objectVars = new List(1); + eventDefinition.variables.objectVars.Add(null); + } + + resetCurrentFrame = EditorGUILayout.Toggle("Reset Current Frame Counter", resetCurrentFrame); + + eventDefinition.variables.objectVars[0] = + EditorGUILayout.ObjectField("Attack", eventDefinition.variables.objectVars[0], typeof(MovesetAttackNode), false); + + lastFrameExecution = EditorGUILayout.Toggle("Execute on Last Frame", lastFrameExecution); + } +#endif + } +} diff --git a/Assets/CAF/Samples/TDAction/Scripts/Combat/Events/ChangeAttack.cs.meta b/Assets/CAF/Samples/TDAction/Scripts/Combat/Events/ChangeAttack.cs.meta new file mode 100644 index 00000000..86b9cbb9 --- /dev/null +++ b/Assets/CAF/Samples/TDAction/Scripts/Combat/Events/ChangeAttack.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 2ab04e3de417ec04fa52865c22083922 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/CAF/Samples/TDAction/Scripts/Entities/Managers/EntityManager.cs b/Assets/CAF/Samples/TDAction/Scripts/Entities/Managers/EntityManager.cs index 7caba63b..dfaf18bb 100644 --- a/Assets/CAF/Samples/TDAction/Scripts/Entities/Managers/EntityManager.cs +++ b/Assets/CAF/Samples/TDAction/Scripts/Entities/Managers/EntityManager.cs @@ -80,6 +80,17 @@ public virtual bool TryAttack() return false; } + public virtual bool TryAttack(MovesetAttackNode man, bool resetFrameCounter = true) + { + if(man != null) + { + CombatManager.SetAttack(man); + StateManager.ChangeState((int)EntityStates.ATTACK, resetFrameCounter ? 0 : StateManager.CurrentStateFrame); + return true; + } + return false; + } + Collider2D[] enemyStepResults = new Collider2D[2]; public virtual bool TryEnemyStep(int bufferFrames = 3) { diff --git a/Assets/CAF/Samples/TDAction/Scripts/Entities/States/EntityStateAttack.cs b/Assets/CAF/Samples/TDAction/Scripts/Entities/States/EntityStateAttack.cs index d52eb693..2209fb17 100644 --- a/Assets/CAF/Samples/TDAction/Scripts/Entities/States/EntityStateAttack.cs +++ b/Assets/CAF/Samples/TDAction/Scripts/Entities/States/EntityStateAttack.cs @@ -124,9 +124,10 @@ protected virtual bool HandleEvents(CAF.Combat.AttackEventDefinition currentEven break; } currentEvent.inputCheckProcessed = e.CombatManager.CheckForInputSequence(currentEvent.input); + Debug.Log($"?{currentEvent.inputCheckProcessed}, ({currentEvent.input.executeInputs.Count})"); break; case CAF.Combat.AttackEventInputCheckTiming.CONTINUOUS: - currentEvent.inputCheckProcessed = e.CombatManager.CheckForInputSequence(currentEvent.input); + currentEvent.inputCheckProcessed = e.CombatManager.CheckForInputSequence(currentEvent.input, true, true); break; } } diff --git a/CAF.csproj b/CAF.csproj index 9277b66d..3c6094ec 100644 --- a/CAF.csproj +++ b/CAF.csproj @@ -683,6 +683,12 @@ C:/Projects/Unity/Character-Action-Framework/Library/ScriptAssemblies/XNode.dll + + C:/Projects/Unity/Character-Action-Framework/Library/ScriptAssemblies/Malee.ReorderableList.dll + + + C:/Projects/Unity/Character-Action-Framework/Library/ScriptAssemblies/Malee.ReorderableList.Editor.dll + C:/Projects/Unity/Character-Action-Framework/Library/ScriptAssemblies/UnityEditor.UI.dll diff --git a/TDAction_CSharp.csproj b/TDAction_CSharp.csproj index 2b0b8fdb..b0f1f1df 100644 --- a/TDAction_CSharp.csproj +++ b/TDAction_CSharp.csproj @@ -86,6 +86,7 @@ +