diff --git a/Assets/COPY SPRIGHT/2D Character - Orc/Animations/MeleeCombat.meta b/Assets/COPY SPRIGHT/2D Character - Orc/Animations/MeleeCombat.meta new file mode 100644 index 0000000..3322e2d --- /dev/null +++ b/Assets/COPY SPRIGHT/2D Character - Orc/Animations/MeleeCombat.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 27cebf80a8614c3449a68439f0d9931b +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/COPY SPRIGHT/2D Character - Orc/Animations/hammer_side.anim b/Assets/COPY SPRIGHT/2D Character - Orc/Animations/hammer_side.anim index 45f4c03..a78345b 100644 --- a/Assets/COPY SPRIGHT/2D Character - Orc/Animations/hammer_side.anim +++ b/Assets/COPY SPRIGHT/2D Character - Orc/Animations/hammer_side.anim @@ -117,7 +117,7 @@ m_Level: 0 m_CycleOffset: 0 m_HasAdditiveReferencePose: 0 - m_LoopTime: 1 + m_LoopTime: 0 m_LoopBlend: 0 m_LoopBlendOrientation: 0 m_LoopBlendPositionY: 0 diff --git a/Assets/COPY SPRIGHT/2D Character - Orc/Animations/idle.meta b/Assets/COPY SPRIGHT/2D Character - Orc/Animations/idle.meta new file mode 100644 index 0000000..8698e26 --- /dev/null +++ b/Assets/COPY SPRIGHT/2D Character - Orc/Animations/idle.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: ab6a7625d993ffb45bcbf498430844e6 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/COPY SPRIGHT/2D Character - Orc/Animations/idle/idle_down.anim b/Assets/COPY SPRIGHT/2D Character - Orc/Animations/idle/idle_down.anim new file mode 100644 index 0000000..bfd0558 --- /dev/null +++ b/Assets/COPY SPRIGHT/2D Character - Orc/Animations/idle/idle_down.anim @@ -0,0 +1,128 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!74 &7400000 +AnimationClip: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: idle_down + serializedVersion: 6 + m_Legacy: 0 + m_Compressed: 0 + m_UseHighQualityCurve: 1 + m_RotationCurves: [] + m_CompressedRotationCurves: [] + m_EulerCurves: [] + m_PositionCurves: [] + m_ScaleCurves: [] + m_FloatCurves: [] + m_PPtrCurves: + - curve: + - time: 0 + value: {fileID: 8793639957104055765, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} + - time: 0.05 + value: {fileID: 6084859605308855041, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} + - time: 0.1 + value: {fileID: 8603369663158992956, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} + - time: 0.15 + value: {fileID: -5906421172241655209, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} + - time: 0.2 + value: {fileID: 5704420531145803721, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} + - time: 0.25 + value: {fileID: -148617073940163930, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} + - time: 0.3 + value: {fileID: 4729606205655721961, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} + - time: 0.35 + value: {fileID: -2073685336235588006, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} + - time: 0.4 + value: {fileID: 512795395688303107, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} + - time: 0.45 + value: {fileID: 5667770778836351527, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} + - time: 0.5 + value: {fileID: -1480364998338425778, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} + - time: 0.55 + value: {fileID: -189419392851352084, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} + - time: 0.6 + value: {fileID: 2253685004373748758, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} + - time: 0.65 + value: {fileID: 275251749332817211, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} + - time: 0.7 + value: {fileID: -2717920588507469212, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} + - time: 0.75 + value: {fileID: -928564814986837825, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} + - time: 0.8 + value: {fileID: 1047728824233847905, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} + - time: 0.85 + value: {fileID: -526835129060445694, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} + - time: 0.9 + value: {fileID: 5896261190451672117, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} + - time: 0.95 + value: {fileID: -8256383322693916834, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} + - time: 1 + value: {fileID: -8410472694813616623, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} + attribute: m_Sprite + path: + classID: 212 + script: {fileID: 0} + m_SampleRate: 20 + m_WrapMode: 0 + m_Bounds: + m_Center: {x: 0, y: 0, z: 0} + m_Extent: {x: 0, y: 0, z: 0} + m_ClipBindingConstant: + genericBindings: + - serializedVersion: 2 + path: 0 + attribute: 0 + script: {fileID: 0} + typeID: 212 + customType: 23 + isPPtrCurve: 1 + pptrCurveMapping: + - {fileID: 8793639957104055765, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} + - {fileID: 6084859605308855041, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} + - {fileID: 8603369663158992956, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} + - {fileID: -5906421172241655209, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} + - {fileID: 5704420531145803721, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} + - {fileID: -148617073940163930, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} + - {fileID: 4729606205655721961, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} + - {fileID: -2073685336235588006, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} + - {fileID: 512795395688303107, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} + - {fileID: 5667770778836351527, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} + - {fileID: -1480364998338425778, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} + - {fileID: -189419392851352084, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} + - {fileID: 2253685004373748758, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} + - {fileID: 275251749332817211, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} + - {fileID: -2717920588507469212, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} + - {fileID: -928564814986837825, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} + - {fileID: 1047728824233847905, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} + - {fileID: -526835129060445694, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} + - {fileID: 5896261190451672117, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} + - {fileID: -8256383322693916834, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} + - {fileID: -8410472694813616623, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} + m_AnimationClipSettings: + serializedVersion: 2 + m_AdditiveReferencePoseClip: {fileID: 0} + m_AdditiveReferencePoseTime: 0 + m_StartTime: 0 + m_StopTime: 1.05 + m_OrientationOffsetY: 0 + m_Level: 0 + m_CycleOffset: 0 + m_HasAdditiveReferencePose: 0 + m_LoopTime: 1 + m_LoopBlend: 0 + m_LoopBlendOrientation: 0 + m_LoopBlendPositionY: 0 + m_LoopBlendPositionXZ: 0 + m_KeepOriginalOrientation: 0 + m_KeepOriginalPositionY: 1 + m_KeepOriginalPositionXZ: 0 + m_HeightFromFeet: 0 + m_Mirror: 0 + m_EditorCurves: [] + m_EulerEditorCurves: [] + m_HasGenericRootTransform: 0 + m_HasMotionFloatCurves: 0 + m_Events: [] diff --git a/Assets/COPY SPRIGHT/2D Character - Orc/Animations/idle/idle_down.anim.meta b/Assets/COPY SPRIGHT/2D Character - Orc/Animations/idle/idle_down.anim.meta new file mode 100644 index 0000000..9fe2393 --- /dev/null +++ b/Assets/COPY SPRIGHT/2D Character - Orc/Animations/idle/idle_down.anim.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: f42cb240a2284878babb282417141298 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/COPY SPRIGHT/2D Character - Orc/Animations/idle/idle_left.anim b/Assets/COPY SPRIGHT/2D Character - Orc/Animations/idle/idle_left.anim new file mode 100644 index 0000000..820c2dc --- /dev/null +++ b/Assets/COPY SPRIGHT/2D Character - Orc/Animations/idle/idle_left.anim @@ -0,0 +1,128 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!74 &7400000 +AnimationClip: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: idle_left + serializedVersion: 6 + m_Legacy: 0 + m_Compressed: 0 + m_UseHighQualityCurve: 1 + m_RotationCurves: [] + m_CompressedRotationCurves: [] + m_EulerCurves: [] + m_PositionCurves: [] + m_ScaleCurves: [] + m_FloatCurves: [] + m_PPtrCurves: + - curve: + - time: 0 + value: {fileID: -3655621501393774895, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} + - time: 0.05 + value: {fileID: -3185995270805410201, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} + - time: 0.1 + value: {fileID: -6334799096112948352, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} + - time: 0.15 + value: {fileID: -2134340880611598165, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} + - time: 0.2 + value: {fileID: -2151818530499332596, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} + - time: 0.25 + value: {fileID: 3051071556821484571, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} + - time: 0.3 + value: {fileID: -5705869721440319331, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} + - time: 0.35 + value: {fileID: 7168834123846226226, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} + - time: 0.4 + value: {fileID: -5112156401277642946, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} + - time: 0.45 + value: {fileID: -4904485453230194659, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} + - time: 0.5 + value: {fileID: 929150727014594773, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} + - time: 0.55 + value: {fileID: -8898634129254946022, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} + - time: 0.6 + value: {fileID: -1574576503455686002, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} + - time: 0.65 + value: {fileID: 6367498201634126667, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} + - time: 0.7 + value: {fileID: -7207429827535173402, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} + - time: 0.75 + value: {fileID: -8215856964752772259, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} + - time: 0.8 + value: {fileID: -6871614914986685141, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} + - time: 0.85 + value: {fileID: 532023552575573989, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} + - time: 0.9 + value: {fileID: -3490280450085971560, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} + - time: 0.95 + value: {fileID: 2973940874069163354, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} + - time: 1 + value: {fileID: -3547867813687463170, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} + attribute: m_Sprite + path: + classID: 212 + script: {fileID: 0} + m_SampleRate: 20 + m_WrapMode: 0 + m_Bounds: + m_Center: {x: 0, y: 0, z: 0} + m_Extent: {x: 0, y: 0, z: 0} + m_ClipBindingConstant: + genericBindings: + - serializedVersion: 2 + path: 0 + attribute: 0 + script: {fileID: 0} + typeID: 212 + customType: 23 + isPPtrCurve: 1 + pptrCurveMapping: + - {fileID: -3655621501393774895, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} + - {fileID: -3185995270805410201, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} + - {fileID: -6334799096112948352, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} + - {fileID: -2134340880611598165, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} + - {fileID: -2151818530499332596, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} + - {fileID: 3051071556821484571, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} + - {fileID: -5705869721440319331, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} + - {fileID: 7168834123846226226, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} + - {fileID: -5112156401277642946, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} + - {fileID: -4904485453230194659, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} + - {fileID: 929150727014594773, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} + - {fileID: -8898634129254946022, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} + - {fileID: -1574576503455686002, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} + - {fileID: 6367498201634126667, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} + - {fileID: -7207429827535173402, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} + - {fileID: -8215856964752772259, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} + - {fileID: -6871614914986685141, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} + - {fileID: 532023552575573989, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} + - {fileID: -3490280450085971560, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} + - {fileID: 2973940874069163354, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} + - {fileID: -3547867813687463170, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} + m_AnimationClipSettings: + serializedVersion: 2 + m_AdditiveReferencePoseClip: {fileID: 0} + m_AdditiveReferencePoseTime: 0 + m_StartTime: 0 + m_StopTime: 1.05 + m_OrientationOffsetY: 0 + m_Level: 0 + m_CycleOffset: 0 + m_HasAdditiveReferencePose: 0 + m_LoopTime: 1 + m_LoopBlend: 0 + m_LoopBlendOrientation: 0 + m_LoopBlendPositionY: 0 + m_LoopBlendPositionXZ: 0 + m_KeepOriginalOrientation: 0 + m_KeepOriginalPositionY: 1 + m_KeepOriginalPositionXZ: 0 + m_HeightFromFeet: 0 + m_Mirror: 0 + m_EditorCurves: [] + m_EulerEditorCurves: [] + m_HasGenericRootTransform: 0 + m_HasMotionFloatCurves: 0 + m_Events: [] diff --git a/Assets/COPY SPRIGHT/2D Character - Orc/Animations/idle/idle_left.anim.meta b/Assets/COPY SPRIGHT/2D Character - Orc/Animations/idle/idle_left.anim.meta new file mode 100644 index 0000000..35b419b --- /dev/null +++ b/Assets/COPY SPRIGHT/2D Character - Orc/Animations/idle/idle_left.anim.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: f2366ff3ef524b35bcf62aab21f9abb0 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/COPY SPRIGHT/2D Character - Orc/Animations/idle/idle_right.anim b/Assets/COPY SPRIGHT/2D Character - Orc/Animations/idle/idle_right.anim new file mode 100644 index 0000000..71cf04e --- /dev/null +++ b/Assets/COPY SPRIGHT/2D Character - Orc/Animations/idle/idle_right.anim @@ -0,0 +1,191 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!74 &7400000 +AnimationClip: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: idle_right + serializedVersion: 6 + m_Legacy: 0 + m_Compressed: 0 + m_UseHighQualityCurve: 1 + m_RotationCurves: [] + m_CompressedRotationCurves: [] + m_EulerCurves: [] + m_PositionCurves: [] + m_ScaleCurves: [] + m_FloatCurves: + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: Infinity + outSlope: Infinity + tangentMode: 103 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + - serializedVersion: 3 + time: 1.05 + value: 0 + inSlope: Infinity + outSlope: Infinity + tangentMode: 103 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_FlipX + path: + classID: 212 + script: {fileID: 0} + m_PPtrCurves: + - curve: + - time: 0 + value: {fileID: -3655621501393774895, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} + - time: 0.05 + value: {fileID: -3185995270805410201, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} + - time: 0.1 + value: {fileID: -6334799096112948352, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} + - time: 0.15 + value: {fileID: -2134340880611598165, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} + - time: 0.2 + value: {fileID: -2151818530499332596, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} + - time: 0.25 + value: {fileID: 3051071556821484571, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} + - time: 0.3 + value: {fileID: -5705869721440319331, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} + - time: 0.35 + value: {fileID: 7168834123846226226, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} + - time: 0.4 + value: {fileID: -5112156401277642946, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} + - time: 0.45 + value: {fileID: -4904485453230194659, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} + - time: 0.5 + value: {fileID: 929150727014594773, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} + - time: 0.55 + value: {fileID: -8898634129254946022, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} + - time: 0.6 + value: {fileID: -1574576503455686002, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} + - time: 0.65 + value: {fileID: 6367498201634126667, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} + - time: 0.7 + value: {fileID: -7207429827535173402, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} + - time: 0.75 + value: {fileID: -8215856964752772259, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} + - time: 0.8 + value: {fileID: -6871614914986685141, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} + - time: 0.85 + value: {fileID: 532023552575573989, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} + - time: 0.9 + value: {fileID: -3490280450085971560, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} + - time: 0.95 + value: {fileID: 2973940874069163354, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} + - time: 1 + value: {fileID: -3547867813687463170, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} + attribute: m_Sprite + path: + classID: 212 + script: {fileID: 0} + m_SampleRate: 20 + m_WrapMode: 0 + m_Bounds: + m_Center: {x: 0, y: 0, z: 0} + m_Extent: {x: 0, y: 0, z: 0} + m_ClipBindingConstant: + genericBindings: + - serializedVersion: 2 + path: 0 + attribute: 555744692 + script: {fileID: 0} + typeID: 212 + customType: 0 + isPPtrCurve: 0 + - serializedVersion: 2 + path: 0 + attribute: 0 + script: {fileID: 0} + typeID: 212 + customType: 23 + isPPtrCurve: 1 + pptrCurveMapping: + - {fileID: -3655621501393774895, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} + - {fileID: -3185995270805410201, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} + - {fileID: -6334799096112948352, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} + - {fileID: -2134340880611598165, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} + - {fileID: -2151818530499332596, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} + - {fileID: 3051071556821484571, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} + - {fileID: -5705869721440319331, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} + - {fileID: 7168834123846226226, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} + - {fileID: -5112156401277642946, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} + - {fileID: -4904485453230194659, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} + - {fileID: 929150727014594773, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} + - {fileID: -8898634129254946022, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} + - {fileID: -1574576503455686002, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} + - {fileID: 6367498201634126667, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} + - {fileID: -7207429827535173402, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} + - {fileID: -8215856964752772259, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} + - {fileID: -6871614914986685141, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} + - {fileID: 532023552575573989, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} + - {fileID: -3490280450085971560, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} + - {fileID: 2973940874069163354, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} + - {fileID: -3547867813687463170, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} + m_AnimationClipSettings: + serializedVersion: 2 + m_AdditiveReferencePoseClip: {fileID: 0} + m_AdditiveReferencePoseTime: 0 + m_StartTime: 0 + m_StopTime: 1.05 + m_OrientationOffsetY: 0 + m_Level: 0 + m_CycleOffset: 0 + m_HasAdditiveReferencePose: 0 + m_LoopTime: 1 + m_LoopBlend: 0 + m_LoopBlendOrientation: 0 + m_LoopBlendPositionY: 0 + m_LoopBlendPositionXZ: 0 + m_KeepOriginalOrientation: 0 + m_KeepOriginalPositionY: 1 + m_KeepOriginalPositionXZ: 0 + m_HeightFromFeet: 0 + m_Mirror: 0 + m_EditorCurves: + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: Infinity + outSlope: Infinity + tangentMode: 103 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + - serializedVersion: 3 + time: 1.05 + value: 0 + inSlope: Infinity + outSlope: Infinity + tangentMode: 103 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_FlipX + path: + classID: 212 + script: {fileID: 0} + m_EulerEditorCurves: [] + m_HasGenericRootTransform: 0 + m_HasMotionFloatCurves: 0 + m_Events: [] diff --git a/Assets/COPY SPRIGHT/2D Character - Orc/Animations/idle/idle_right.anim.meta b/Assets/COPY SPRIGHT/2D Character - Orc/Animations/idle/idle_right.anim.meta new file mode 100644 index 0000000..50167fa --- /dev/null +++ b/Assets/COPY SPRIGHT/2D Character - Orc/Animations/idle/idle_right.anim.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 5f78295d12cb7a94a893f02e6abb489c +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 7400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/COPY SPRIGHT/2D Character - Orc/Animations/idle/idle_up.anim b/Assets/COPY SPRIGHT/2D Character - Orc/Animations/idle/idle_up.anim new file mode 100644 index 0000000..348ca84 --- /dev/null +++ b/Assets/COPY SPRIGHT/2D Character - Orc/Animations/idle/idle_up.anim @@ -0,0 +1,128 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!74 &7400000 +AnimationClip: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: idle_up + serializedVersion: 6 + m_Legacy: 0 + m_Compressed: 0 + m_UseHighQualityCurve: 1 + m_RotationCurves: [] + m_CompressedRotationCurves: [] + m_EulerCurves: [] + m_PositionCurves: [] + m_ScaleCurves: [] + m_FloatCurves: [] + m_PPtrCurves: + - curve: + - time: 0 + value: {fileID: 3838556530734163676, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} + - time: 0.05 + value: {fileID: -1499976257121873182, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} + - time: 0.1 + value: {fileID: 168846979551174993, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} + - time: 0.15 + value: {fileID: 1848214276972832728, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} + - time: 0.2 + value: {fileID: -5438464607267775908, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} + - time: 0.25 + value: {fileID: -2162490490912676814, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} + - time: 0.3 + value: {fileID: -2923966642950171172, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} + - time: 0.35 + value: {fileID: -4266579293378190299, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} + - time: 0.4 + value: {fileID: -2616059018411542186, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} + - time: 0.45 + value: {fileID: 8979487438362149139, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} + - time: 0.5 + value: {fileID: 841086773508559625, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} + - time: 0.55 + value: {fileID: -5243070509038418389, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} + - time: 0.6 + value: {fileID: -6981167418715947851, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} + - time: 0.65 + value: {fileID: 9209814845565376561, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} + - time: 0.7 + value: {fileID: -2952999747656002874, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} + - time: 0.75 + value: {fileID: 8697369147165302195, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} + - time: 0.8 + value: {fileID: -8940617572574351099, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} + - time: 0.85 + value: {fileID: 516610896262579559, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} + - time: 0.9 + value: {fileID: 2254349733851700077, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} + - time: 0.95 + value: {fileID: -3260541572077893329, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} + - time: 1 + value: {fileID: -3299202918059221898, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} + attribute: m_Sprite + path: + classID: 212 + script: {fileID: 0} + m_SampleRate: 20 + m_WrapMode: 0 + m_Bounds: + m_Center: {x: 0, y: 0, z: 0} + m_Extent: {x: 0, y: 0, z: 0} + m_ClipBindingConstant: + genericBindings: + - serializedVersion: 2 + path: 0 + attribute: 0 + script: {fileID: 0} + typeID: 212 + customType: 23 + isPPtrCurve: 1 + pptrCurveMapping: + - {fileID: 3838556530734163676, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} + - {fileID: -1499976257121873182, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} + - {fileID: 168846979551174993, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} + - {fileID: 1848214276972832728, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} + - {fileID: -5438464607267775908, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} + - {fileID: -2162490490912676814, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} + - {fileID: -2923966642950171172, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} + - {fileID: -4266579293378190299, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} + - {fileID: -2616059018411542186, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} + - {fileID: 8979487438362149139, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} + - {fileID: 841086773508559625, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} + - {fileID: -5243070509038418389, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} + - {fileID: -6981167418715947851, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} + - {fileID: 9209814845565376561, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} + - {fileID: -2952999747656002874, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} + - {fileID: 8697369147165302195, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} + - {fileID: -8940617572574351099, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} + - {fileID: 516610896262579559, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} + - {fileID: 2254349733851700077, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} + - {fileID: -3260541572077893329, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} + - {fileID: -3299202918059221898, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} + m_AnimationClipSettings: + serializedVersion: 2 + m_AdditiveReferencePoseClip: {fileID: 0} + m_AdditiveReferencePoseTime: 0 + m_StartTime: 0 + m_StopTime: 1.05 + m_OrientationOffsetY: 0 + m_Level: 0 + m_CycleOffset: 0 + m_HasAdditiveReferencePose: 0 + m_LoopTime: 1 + m_LoopBlend: 0 + m_LoopBlendOrientation: 0 + m_LoopBlendPositionY: 0 + m_LoopBlendPositionXZ: 0 + m_KeepOriginalOrientation: 0 + m_KeepOriginalPositionY: 1 + m_KeepOriginalPositionXZ: 0 + m_HeightFromFeet: 0 + m_Mirror: 0 + m_EditorCurves: [] + m_EulerEditorCurves: [] + m_HasGenericRootTransform: 0 + m_HasMotionFloatCurves: 0 + m_Events: [] diff --git a/Assets/COPY SPRIGHT/2D Character - Orc/Animations/idle/idle_up.anim.meta b/Assets/COPY SPRIGHT/2D Character - Orc/Animations/idle/idle_up.anim.meta new file mode 100644 index 0000000..21d67a2 --- /dev/null +++ b/Assets/COPY SPRIGHT/2D Character - Orc/Animations/idle/idle_up.anim.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 85139c275168455880d3c5db746d189a +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/COPY SPRIGHT/2D Character - Orc/Animations/idle_down.anim b/Assets/COPY SPRIGHT/2D Character - Orc/Animations/idle_down.anim deleted file mode 100644 index bfd0558..0000000 --- a/Assets/COPY SPRIGHT/2D Character - Orc/Animations/idle_down.anim +++ /dev/null @@ -1,128 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!74 &7400000 -AnimationClip: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_Name: idle_down - serializedVersion: 6 - m_Legacy: 0 - m_Compressed: 0 - m_UseHighQualityCurve: 1 - m_RotationCurves: [] - m_CompressedRotationCurves: [] - m_EulerCurves: [] - m_PositionCurves: [] - m_ScaleCurves: [] - m_FloatCurves: [] - m_PPtrCurves: - - curve: - - time: 0 - value: {fileID: 8793639957104055765, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} - - time: 0.05 - value: {fileID: 6084859605308855041, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} - - time: 0.1 - value: {fileID: 8603369663158992956, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} - - time: 0.15 - value: {fileID: -5906421172241655209, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} - - time: 0.2 - value: {fileID: 5704420531145803721, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} - - time: 0.25 - value: {fileID: -148617073940163930, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} - - time: 0.3 - value: {fileID: 4729606205655721961, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} - - time: 0.35 - value: {fileID: -2073685336235588006, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} - - time: 0.4 - value: {fileID: 512795395688303107, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} - - time: 0.45 - value: {fileID: 5667770778836351527, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} - - time: 0.5 - value: {fileID: -1480364998338425778, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} - - time: 0.55 - value: {fileID: -189419392851352084, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} - - time: 0.6 - value: {fileID: 2253685004373748758, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} - - time: 0.65 - value: {fileID: 275251749332817211, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} - - time: 0.7 - value: {fileID: -2717920588507469212, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} - - time: 0.75 - value: {fileID: -928564814986837825, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} - - time: 0.8 - value: {fileID: 1047728824233847905, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} - - time: 0.85 - value: {fileID: -526835129060445694, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} - - time: 0.9 - value: {fileID: 5896261190451672117, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} - - time: 0.95 - value: {fileID: -8256383322693916834, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} - - time: 1 - value: {fileID: -8410472694813616623, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} - attribute: m_Sprite - path: - classID: 212 - script: {fileID: 0} - m_SampleRate: 20 - m_WrapMode: 0 - m_Bounds: - m_Center: {x: 0, y: 0, z: 0} - m_Extent: {x: 0, y: 0, z: 0} - m_ClipBindingConstant: - genericBindings: - - serializedVersion: 2 - path: 0 - attribute: 0 - script: {fileID: 0} - typeID: 212 - customType: 23 - isPPtrCurve: 1 - pptrCurveMapping: - - {fileID: 8793639957104055765, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} - - {fileID: 6084859605308855041, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} - - {fileID: 8603369663158992956, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} - - {fileID: -5906421172241655209, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} - - {fileID: 5704420531145803721, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} - - {fileID: -148617073940163930, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} - - {fileID: 4729606205655721961, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} - - {fileID: -2073685336235588006, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} - - {fileID: 512795395688303107, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} - - {fileID: 5667770778836351527, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} - - {fileID: -1480364998338425778, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} - - {fileID: -189419392851352084, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} - - {fileID: 2253685004373748758, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} - - {fileID: 275251749332817211, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} - - {fileID: -2717920588507469212, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} - - {fileID: -928564814986837825, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} - - {fileID: 1047728824233847905, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} - - {fileID: -526835129060445694, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} - - {fileID: 5896261190451672117, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} - - {fileID: -8256383322693916834, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} - - {fileID: -8410472694813616623, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} - m_AnimationClipSettings: - serializedVersion: 2 - m_AdditiveReferencePoseClip: {fileID: 0} - m_AdditiveReferencePoseTime: 0 - m_StartTime: 0 - m_StopTime: 1.05 - m_OrientationOffsetY: 0 - m_Level: 0 - m_CycleOffset: 0 - m_HasAdditiveReferencePose: 0 - m_LoopTime: 1 - m_LoopBlend: 0 - m_LoopBlendOrientation: 0 - m_LoopBlendPositionY: 0 - m_LoopBlendPositionXZ: 0 - m_KeepOriginalOrientation: 0 - m_KeepOriginalPositionY: 1 - m_KeepOriginalPositionXZ: 0 - m_HeightFromFeet: 0 - m_Mirror: 0 - m_EditorCurves: [] - m_EulerEditorCurves: [] - m_HasGenericRootTransform: 0 - m_HasMotionFloatCurves: 0 - m_Events: [] diff --git a/Assets/COPY SPRIGHT/2D Character - Orc/Animations/idle_down.anim.meta b/Assets/COPY SPRIGHT/2D Character - Orc/Animations/idle_down.anim.meta deleted file mode 100644 index 9fe2393..0000000 --- a/Assets/COPY SPRIGHT/2D Character - Orc/Animations/idle_down.anim.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: f42cb240a2284878babb282417141298 -NativeFormatImporter: - externalObjects: {} - mainObjectFileID: 0 - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/COPY SPRIGHT/2D Character - Orc/Animations/idle_side.anim b/Assets/COPY SPRIGHT/2D Character - Orc/Animations/idle_side.anim deleted file mode 100644 index 6b893a0..0000000 --- a/Assets/COPY SPRIGHT/2D Character - Orc/Animations/idle_side.anim +++ /dev/null @@ -1,128 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!74 &7400000 -AnimationClip: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_Name: idle_side - serializedVersion: 6 - m_Legacy: 0 - m_Compressed: 0 - m_UseHighQualityCurve: 1 - m_RotationCurves: [] - m_CompressedRotationCurves: [] - m_EulerCurves: [] - m_PositionCurves: [] - m_ScaleCurves: [] - m_FloatCurves: [] - m_PPtrCurves: - - curve: - - time: 0 - value: {fileID: -3655621501393774895, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} - - time: 0.05 - value: {fileID: -3185995270805410201, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} - - time: 0.1 - value: {fileID: -6334799096112948352, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} - - time: 0.15 - value: {fileID: -2134340880611598165, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} - - time: 0.2 - value: {fileID: -2151818530499332596, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} - - time: 0.25 - value: {fileID: 3051071556821484571, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} - - time: 0.3 - value: {fileID: -5705869721440319331, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} - - time: 0.35 - value: {fileID: 7168834123846226226, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} - - time: 0.4 - value: {fileID: -5112156401277642946, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} - - time: 0.45 - value: {fileID: -4904485453230194659, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} - - time: 0.5 - value: {fileID: 929150727014594773, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} - - time: 0.55 - value: {fileID: -8898634129254946022, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} - - time: 0.6 - value: {fileID: -1574576503455686002, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} - - time: 0.65 - value: {fileID: 6367498201634126667, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} - - time: 0.7 - value: {fileID: -7207429827535173402, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} - - time: 0.75 - value: {fileID: -8215856964752772259, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} - - time: 0.8 - value: {fileID: -6871614914986685141, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} - - time: 0.85 - value: {fileID: 532023552575573989, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} - - time: 0.9 - value: {fileID: -3490280450085971560, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} - - time: 0.95 - value: {fileID: 2973940874069163354, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} - - time: 1 - value: {fileID: -3547867813687463170, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} - attribute: m_Sprite - path: - classID: 212 - script: {fileID: 0} - m_SampleRate: 20 - m_WrapMode: 0 - m_Bounds: - m_Center: {x: 0, y: 0, z: 0} - m_Extent: {x: 0, y: 0, z: 0} - m_ClipBindingConstant: - genericBindings: - - serializedVersion: 2 - path: 0 - attribute: 0 - script: {fileID: 0} - typeID: 212 - customType: 23 - isPPtrCurve: 1 - pptrCurveMapping: - - {fileID: -3655621501393774895, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} - - {fileID: -3185995270805410201, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} - - {fileID: -6334799096112948352, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} - - {fileID: -2134340880611598165, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} - - {fileID: -2151818530499332596, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} - - {fileID: 3051071556821484571, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} - - {fileID: -5705869721440319331, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} - - {fileID: 7168834123846226226, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} - - {fileID: -5112156401277642946, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} - - {fileID: -4904485453230194659, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} - - {fileID: 929150727014594773, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} - - {fileID: -8898634129254946022, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} - - {fileID: -1574576503455686002, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} - - {fileID: 6367498201634126667, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} - - {fileID: -7207429827535173402, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} - - {fileID: -8215856964752772259, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} - - {fileID: -6871614914986685141, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} - - {fileID: 532023552575573989, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} - - {fileID: -3490280450085971560, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} - - {fileID: 2973940874069163354, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} - - {fileID: -3547867813687463170, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} - m_AnimationClipSettings: - serializedVersion: 2 - m_AdditiveReferencePoseClip: {fileID: 0} - m_AdditiveReferencePoseTime: 0 - m_StartTime: 0 - m_StopTime: 1.05 - m_OrientationOffsetY: 0 - m_Level: 0 - m_CycleOffset: 0 - m_HasAdditiveReferencePose: 0 - m_LoopTime: 1 - m_LoopBlend: 0 - m_LoopBlendOrientation: 0 - m_LoopBlendPositionY: 0 - m_LoopBlendPositionXZ: 0 - m_KeepOriginalOrientation: 0 - m_KeepOriginalPositionY: 1 - m_KeepOriginalPositionXZ: 0 - m_HeightFromFeet: 0 - m_Mirror: 0 - m_EditorCurves: [] - m_EulerEditorCurves: [] - m_HasGenericRootTransform: 0 - m_HasMotionFloatCurves: 0 - m_Events: [] diff --git a/Assets/COPY SPRIGHT/2D Character - Orc/Animations/idle_side.anim.meta b/Assets/COPY SPRIGHT/2D Character - Orc/Animations/idle_side.anim.meta deleted file mode 100644 index 35b419b..0000000 --- a/Assets/COPY SPRIGHT/2D Character - Orc/Animations/idle_side.anim.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: f2366ff3ef524b35bcf62aab21f9abb0 -NativeFormatImporter: - externalObjects: {} - mainObjectFileID: 0 - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/COPY SPRIGHT/2D Character - Orc/Animations/idle_up.anim b/Assets/COPY SPRIGHT/2D Character - Orc/Animations/idle_up.anim deleted file mode 100644 index 348ca84..0000000 --- a/Assets/COPY SPRIGHT/2D Character - Orc/Animations/idle_up.anim +++ /dev/null @@ -1,128 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!74 &7400000 -AnimationClip: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_Name: idle_up - serializedVersion: 6 - m_Legacy: 0 - m_Compressed: 0 - m_UseHighQualityCurve: 1 - m_RotationCurves: [] - m_CompressedRotationCurves: [] - m_EulerCurves: [] - m_PositionCurves: [] - m_ScaleCurves: [] - m_FloatCurves: [] - m_PPtrCurves: - - curve: - - time: 0 - value: {fileID: 3838556530734163676, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} - - time: 0.05 - value: {fileID: -1499976257121873182, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} - - time: 0.1 - value: {fileID: 168846979551174993, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} - - time: 0.15 - value: {fileID: 1848214276972832728, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} - - time: 0.2 - value: {fileID: -5438464607267775908, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} - - time: 0.25 - value: {fileID: -2162490490912676814, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} - - time: 0.3 - value: {fileID: -2923966642950171172, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} - - time: 0.35 - value: {fileID: -4266579293378190299, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} - - time: 0.4 - value: {fileID: -2616059018411542186, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} - - time: 0.45 - value: {fileID: 8979487438362149139, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} - - time: 0.5 - value: {fileID: 841086773508559625, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} - - time: 0.55 - value: {fileID: -5243070509038418389, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} - - time: 0.6 - value: {fileID: -6981167418715947851, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} - - time: 0.65 - value: {fileID: 9209814845565376561, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} - - time: 0.7 - value: {fileID: -2952999747656002874, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} - - time: 0.75 - value: {fileID: 8697369147165302195, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} - - time: 0.8 - value: {fileID: -8940617572574351099, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} - - time: 0.85 - value: {fileID: 516610896262579559, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} - - time: 0.9 - value: {fileID: 2254349733851700077, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} - - time: 0.95 - value: {fileID: -3260541572077893329, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} - - time: 1 - value: {fileID: -3299202918059221898, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} - attribute: m_Sprite - path: - classID: 212 - script: {fileID: 0} - m_SampleRate: 20 - m_WrapMode: 0 - m_Bounds: - m_Center: {x: 0, y: 0, z: 0} - m_Extent: {x: 0, y: 0, z: 0} - m_ClipBindingConstant: - genericBindings: - - serializedVersion: 2 - path: 0 - attribute: 0 - script: {fileID: 0} - typeID: 212 - customType: 23 - isPPtrCurve: 1 - pptrCurveMapping: - - {fileID: 3838556530734163676, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} - - {fileID: -1499976257121873182, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} - - {fileID: 168846979551174993, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} - - {fileID: 1848214276972832728, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} - - {fileID: -5438464607267775908, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} - - {fileID: -2162490490912676814, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} - - {fileID: -2923966642950171172, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} - - {fileID: -4266579293378190299, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} - - {fileID: -2616059018411542186, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} - - {fileID: 8979487438362149139, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} - - {fileID: 841086773508559625, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} - - {fileID: -5243070509038418389, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} - - {fileID: -6981167418715947851, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} - - {fileID: 9209814845565376561, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} - - {fileID: -2952999747656002874, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} - - {fileID: 8697369147165302195, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} - - {fileID: -8940617572574351099, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} - - {fileID: 516610896262579559, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} - - {fileID: 2254349733851700077, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} - - {fileID: -3260541572077893329, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} - - {fileID: -3299202918059221898, guid: c6d3e18a54ab4998bf1d4fd6f5cef79d, type: 3} - m_AnimationClipSettings: - serializedVersion: 2 - m_AdditiveReferencePoseClip: {fileID: 0} - m_AdditiveReferencePoseTime: 0 - m_StartTime: 0 - m_StopTime: 1.05 - m_OrientationOffsetY: 0 - m_Level: 0 - m_CycleOffset: 0 - m_HasAdditiveReferencePose: 0 - m_LoopTime: 1 - m_LoopBlend: 0 - m_LoopBlendOrientation: 0 - m_LoopBlendPositionY: 0 - m_LoopBlendPositionXZ: 0 - m_KeepOriginalOrientation: 0 - m_KeepOriginalPositionY: 1 - m_KeepOriginalPositionXZ: 0 - m_HeightFromFeet: 0 - m_Mirror: 0 - m_EditorCurves: [] - m_EulerEditorCurves: [] - m_HasGenericRootTransform: 0 - m_HasMotionFloatCurves: 0 - m_Events: [] diff --git a/Assets/COPY SPRIGHT/2D Character - Orc/Animations/idle_up.anim.meta b/Assets/COPY SPRIGHT/2D Character - Orc/Animations/idle_up.anim.meta deleted file mode 100644 index 21d67a2..0000000 --- a/Assets/COPY SPRIGHT/2D Character - Orc/Animations/idle_up.anim.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 85139c275168455880d3c5db746d189a -NativeFormatImporter: - externalObjects: {} - mainObjectFileID: 0 - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/COPY SPRIGHT/2D Character - Orc/Animations/vanish.anim b/Assets/COPY SPRIGHT/2D Character - Orc/Animations/vanish.anim index 66b36ec..726e248 100644 --- a/Assets/COPY SPRIGHT/2D Character - Orc/Animations/vanish.anim +++ b/Assets/COPY SPRIGHT/2D Character - Orc/Animations/vanish.anim @@ -144,7 +144,7 @@ m_Level: 0 m_CycleOffset: 0 m_HasAdditiveReferencePose: 0 - m_LoopTime: 1 + m_LoopTime: 0 m_LoopBlend: 0 m_LoopBlendOrientation: 0 m_LoopBlendPositionY: 0 diff --git a/Assets/COPY SPRIGHT/2D Character - Orc/MeleeWeaponOrcAnimatorController.controller b/Assets/COPY SPRIGHT/2D Character - Orc/MeleeWeaponOrcAnimatorController.controller new file mode 100644 index 0000000..411e116 --- /dev/null +++ b/Assets/COPY SPRIGHT/2D Character - Orc/MeleeWeaponOrcAnimatorController.controller @@ -0,0 +1,131 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!91 &9100000 +AnimatorController: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: MeleeWeaponOrcAnimatorController + serializedVersion: 5 + m_AnimatorParameters: + - m_Name: LookDirectionX + m_Type: 1 + m_DefaultFloat: 0 + m_DefaultInt: 0 + m_DefaultBool: 0 + m_Controller: {fileID: 0} + - m_Name: LookDirectionY + m_Type: 1 + m_DefaultFloat: 0 + m_DefaultInt: 0 + m_DefaultBool: 0 + m_Controller: {fileID: 0} + m_AnimatorLayers: + - serializedVersion: 5 + m_Name: Base Layer + m_StateMachine: {fileID: 1925254280853458698} + m_Mask: {fileID: 0} + m_Motions: [] + m_Behaviours: [] + m_BlendingMode: 0 + m_SyncedLayerIndex: -1 + m_DefaultWeight: 0 + m_IKPass: 0 + m_SyncedLayerAffectsTiming: 0 + m_Controller: {fileID: 9100000} +--- !u!1102 &740266700348904436 +AnimatorState: + serializedVersion: 6 + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: WeaponAttack + m_Speed: 1 + m_CycleOffset: 0 + m_Transitions: [] + m_StateMachineBehaviours: [] + m_Position: {x: 50, y: 50, z: 0} + m_IKOnFeet: 0 + m_WriteDefaultValues: 1 + m_Mirror: 0 + m_SpeedParameterActive: 0 + m_MirrorParameterActive: 0 + m_CycleOffsetParameterActive: 0 + m_TimeParameterActive: 0 + m_Motion: {fileID: 3443464055973746693} + m_Tag: + m_SpeedParameter: + m_MirrorParameter: + m_CycleOffsetParameter: + m_TimeParameter: +--- !u!1107 &1925254280853458698 +AnimatorStateMachine: + serializedVersion: 6 + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: Base Layer + m_ChildStates: + - serializedVersion: 1 + m_State: {fileID: 740266700348904436} + m_Position: {x: 450, y: 110, z: 0} + m_ChildStateMachines: [] + m_AnyStateTransitions: [] + m_EntryTransitions: [] + m_StateMachineTransitions: {} + m_StateMachineBehaviours: [] + m_AnyStatePosition: {x: 50, y: 20, z: 0} + m_EntryPosition: {x: 50, y: 120, z: 0} + m_ExitPosition: {x: 800, y: 120, z: 0} + m_ParentStateMachinePosition: {x: 800, y: 20, z: 0} + m_DefaultState: {fileID: 740266700348904436} +--- !u!206 &3443464055973746693 +BlendTree: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: Blend Tree + m_Childs: + - serializedVersion: 2 + m_Motion: {fileID: 7400000, guid: f60ffe76a0184eecaab42b9bf83edd4d, type: 2} + m_Threshold: 0 + m_Position: {x: 0, y: 1} + m_TimeScale: 1 + m_CycleOffset: 0 + m_DirectBlendParameter: LookDirectionX + m_Mirror: 0 + - serializedVersion: 2 + m_Motion: {fileID: 7400000, guid: 571fa4ce43d149658eadf91ea62c1392, type: 2} + m_Threshold: 0.33333334 + m_Position: {x: -1, y: 0} + m_TimeScale: 1 + m_CycleOffset: 0 + m_DirectBlendParameter: LookDirectionX + m_Mirror: 0 + - serializedVersion: 2 + m_Motion: {fileID: 7400000, guid: 089ed885126e4b65b22f96e4eef15569, type: 2} + m_Threshold: 0.6666667 + m_Position: {x: 0, y: -1} + m_TimeScale: 1 + m_CycleOffset: 0 + m_DirectBlendParameter: LookDirectionX + m_Mirror: 0 + - serializedVersion: 2 + m_Motion: {fileID: 7400000, guid: 571fa4ce43d149658eadf91ea62c1392, type: 2} + m_Threshold: 1 + m_Position: {x: 1, y: 0} + m_TimeScale: 1 + m_CycleOffset: 0 + m_DirectBlendParameter: LookDirectionX + m_Mirror: 0 + m_BlendParameter: LookDirectionX + m_BlendParameterY: LookDirectionY + m_MinThreshold: 0 + m_MaxThreshold: 1 + m_UseAutomaticThresholds: 1 + m_NormalizedBlendValues: 0 + m_BlendType: 2 diff --git a/Assets/COPY SPRIGHT/2D Character - Orc/MeleeWeaponOrcAnimatorController.controller.meta b/Assets/COPY SPRIGHT/2D Character - Orc/MeleeWeaponOrcAnimatorController.controller.meta new file mode 100644 index 0000000..4219ecb --- /dev/null +++ b/Assets/COPY SPRIGHT/2D Character - Orc/MeleeWeaponOrcAnimatorController.controller.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 272534e5f112bf74991f11d15e367cfc +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 9100000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/COPY SPRIGHT/2D Character - Orc/OrcAnimatorController.controller b/Assets/COPY SPRIGHT/2D Character - Orc/OrcAnimatorController.controller index 9bc6c6d..b7455ac 100644 --- a/Assets/COPY SPRIGHT/2D Character - Orc/OrcAnimatorController.controller +++ b/Assets/COPY SPRIGHT/2D Character - Orc/OrcAnimatorController.controller @@ -1,5 +1,30 @@ %YAML 1.1 %TAG !u! tag:unity3d.com,2011: +--- !u!1101 &-6761141826524633981 +AnimatorStateTransition: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: + m_Conditions: + - m_ConditionMode: 2 + m_ConditionEvent: IsAttacking + m_EventTreshold: 0 + m_DstStateMachine: {fileID: 0} + m_DstState: {fileID: 1885941893022285744} + m_Solo: 0 + m_Mute: 0 + m_IsExit: 0 + serializedVersion: 3 + m_TransitionDuration: 0.25 + m_TransitionOffset: 0 + m_ExitTime: 0.75 + m_HasExitTime: 1 + m_HasFixedDuration: 1 + m_InterruptionSource: 0 + m_OrderedInterruption: 1 + m_CanTransitionToSelf: 1 --- !u!1101 &-5874932307711408228 AnimatorStateTransition: m_ObjectHideFlags: 1 @@ -25,6 +50,79 @@ m_InterruptionSource: 0 m_OrderedInterruption: 1 m_CanTransitionToSelf: 1 +--- !u!206 &-5085159077462523511 +BlendTree: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: Blend Tree + m_Childs: + - serializedVersion: 2 + m_Motion: {fileID: 7400000, guid: 0f21b15b9f734f6995fa7fd0cd60e48b, type: 2} + m_Threshold: 0 + m_Position: {x: 0, y: 1} + m_TimeScale: 1 + m_CycleOffset: 0 + m_DirectBlendParameter: LookDirection + m_Mirror: 0 + - serializedVersion: 2 + m_Motion: {fileID: 7400000, guid: e89c7d164da6405eac77efb60bbc8ceb, type: 2} + m_Threshold: 0.33333334 + m_Position: {x: -1, y: 0} + m_TimeScale: 1 + m_CycleOffset: 0 + m_DirectBlendParameter: LookDirection + m_Mirror: 0 + - serializedVersion: 2 + m_Motion: {fileID: 7400000, guid: 4b5ce99f8ed542e49a5eebbe69de0530, type: 2} + m_Threshold: 0.6666667 + m_Position: {x: 0, y: -1} + m_TimeScale: 1 + m_CycleOffset: 0 + m_DirectBlendParameter: LookDirection + m_Mirror: 0 + - serializedVersion: 2 + m_Motion: {fileID: 7400000, guid: e89c7d164da6405eac77efb60bbc8ceb, type: 2} + m_Threshold: 1 + m_Position: {x: 1, y: 0} + m_TimeScale: 1 + m_CycleOffset: 0 + m_DirectBlendParameter: LookDirection + m_Mirror: 0 + m_BlendParameter: LookDirectionX + m_BlendParameterY: LookDirectionY + m_MinThreshold: 0 + m_MaxThreshold: 1 + m_UseAutomaticThresholds: 1 + m_NormalizedBlendValues: 0 + m_BlendType: 2 +--- !u!1102 &-4183501492729423189 +AnimatorState: + serializedVersion: 6 + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: Dead + m_Speed: 1 + m_CycleOffset: 0 + m_Transitions: [] + m_StateMachineBehaviours: [] + m_Position: {x: 50, y: 50, z: 0} + m_IKOnFeet: 0 + m_WriteDefaultValues: 1 + m_Mirror: 0 + m_SpeedParameterActive: 0 + m_MirrorParameterActive: 0 + m_CycleOffsetParameterActive: 0 + m_TimeParameterActive: 0 + m_Motion: {fileID: 7400000, guid: 773ad14fd86e4c5d98891a42ad69d805, type: 2} + m_Tag: + m_SpeedParameter: + m_MirrorParameter: + m_CycleOffsetParameter: + m_TimeParameter: --- !u!1101 &-2933209776547137667 AnimatorStateTransition: m_ObjectHideFlags: 1 @@ -64,25 +162,49 @@ m_DefaultFloat: 0 m_DefaultInt: 0 m_DefaultBool: 0 - m_Controller: {fileID: 0} + m_Controller: {fileID: 9100000} - m_Name: VelocityX m_Type: 1 m_DefaultFloat: 0 m_DefaultInt: 0 m_DefaultBool: 0 - m_Controller: {fileID: 0} + m_Controller: {fileID: 9100000} - m_Name: VelocityY m_Type: 1 m_DefaultFloat: 0 m_DefaultInt: 0 m_DefaultBool: 0 - m_Controller: {fileID: 0} + m_Controller: {fileID: 9100000} + - m_Name: LookDirectionX + m_Type: 1 + m_DefaultFloat: 0 + m_DefaultInt: 0 + m_DefaultBool: 0 + m_Controller: {fileID: 9100000} + - m_Name: LookDirectionY + m_Type: 1 + m_DefaultFloat: 0 + m_DefaultInt: 0 + m_DefaultBool: 0 + m_Controller: {fileID: 9100000} - m_Name: IsStopped m_Type: 4 m_DefaultFloat: 0 m_DefaultInt: 0 m_DefaultBool: 0 - m_Controller: {fileID: 0} + m_Controller: {fileID: 9100000} + - m_Name: IsDead + m_Type: 4 + m_DefaultFloat: 0 + m_DefaultInt: 0 + m_DefaultBool: 0 + m_Controller: {fileID: 9100000} + - m_Name: IsAttacking + m_Type: 4 + m_DefaultFloat: 0 + m_DefaultInt: 0 + m_DefaultBool: 0 + m_Controller: {fileID: 9100000} m_AnimatorLayers: - serializedVersion: 5 m_Name: Base Layer @@ -96,6 +218,31 @@ m_IKPass: 0 m_SyncedLayerAffectsTiming: 0 m_Controller: {fileID: 9100000} +--- !u!1101 &664290950028338795 +AnimatorStateTransition: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: + m_Conditions: + - m_ConditionMode: 1 + m_ConditionEvent: IsDead + m_EventTreshold: 0 + m_DstStateMachine: {fileID: 0} + m_DstState: {fileID: -4183501492729423189} + m_Solo: 0 + m_Mute: 0 + m_IsExit: 0 + serializedVersion: 3 + m_TransitionDuration: 0.25 + m_TransitionOffset: 0 + m_ExitTime: 0.75 + m_HasExitTime: 0 + m_HasFixedDuration: 1 + m_InterruptionSource: 0 + m_OrderedInterruption: 1 + m_CanTransitionToSelf: 0 --- !u!1102 &1885941893022285744 AnimatorState: serializedVersion: 6 @@ -108,6 +255,7 @@ m_CycleOffset: 0 m_Transitions: - {fileID: -5874932307711408228} + - {fileID: 7151231939917025952} m_StateMachineBehaviours: [] m_Position: {x: 50, y: 50, z: 0} m_IKOnFeet: 0 @@ -123,6 +271,33 @@ m_MirrorParameter: m_CycleOffsetParameter: m_TimeParameter: +--- !u!1102 &2012305371415375113 +AnimatorState: + serializedVersion: 6 + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: Attack + m_Speed: 1 + m_CycleOffset: 0 + m_Transitions: + - {fileID: -6761141826524633981} + m_StateMachineBehaviours: [] + m_Position: {x: 50, y: 50, z: 0} + m_IKOnFeet: 0 + m_WriteDefaultValues: 1 + m_Mirror: 0 + m_SpeedParameterActive: 0 + m_MirrorParameterActive: 0 + m_CycleOffsetParameterActive: 0 + m_TimeParameterActive: 0 + m_Motion: {fileID: -5085159077462523511} + m_Tag: + m_SpeedParameter: + m_MirrorParameter: + m_CycleOffsetParameter: + m_TimeParameter: --- !u!206 &3553526472815402576 BlendTree: m_ObjectHideFlags: 1 @@ -213,44 +388,22 @@ m_State: {fileID: 1885941893022285744} m_Position: {x: 330, y: 20, z: 0} - serializedVersion: 1 - m_State: {fileID: 4544742684315406710} - m_Position: {x: 365, y: 85, z: 0} + m_State: {fileID: -4183501492729423189} + m_Position: {x: 30, y: -130, z: 0} + - serializedVersion: 1 + m_State: {fileID: 2012305371415375113} + m_Position: {x: 610, y: 20, z: 0} m_ChildStateMachines: [] - m_AnyStateTransitions: [] + m_AnyStateTransitions: + - {fileID: 664290950028338795} m_EntryTransitions: [] m_StateMachineTransitions: {} m_StateMachineBehaviours: [] - m_AnyStatePosition: {x: 50, y: 20, z: 0} + m_AnyStatePosition: {x: 50, y: -40, z: 0} m_EntryPosition: {x: 50, y: 120, z: 0} m_ExitPosition: {x: 800, y: 120, z: 0} m_ParentStateMachinePosition: {x: 800, y: 20, z: 0} m_DefaultState: {fileID: 4064792876197137059} ---- !u!1102 &4544742684315406710 -AnimatorState: - serializedVersion: 6 - m_ObjectHideFlags: 1 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_Name: walk_right - m_Speed: 1 - m_CycleOffset: 0 - m_Transitions: [] - m_StateMachineBehaviours: [] - m_Position: {x: 50, y: 50, z: 0} - m_IKOnFeet: 0 - m_WriteDefaultValues: 1 - m_Mirror: 0 - m_SpeedParameterActive: 0 - m_MirrorParameterActive: 0 - m_CycleOffsetParameterActive: 0 - m_TimeParameterActive: 0 - m_Motion: {fileID: 7400000, guid: 13ab981c8ff1bfe4bb73f39b23eb3199, type: 2} - m_Tag: - m_SpeedParameter: - m_MirrorParameter: - m_CycleOffsetParameter: - m_TimeParameter: --- !u!206 &6233307688280413951 BlendTree: m_ObjectHideFlags: 1 @@ -276,9 +429,9 @@ m_DirectBlendParameter: Blend m_Mirror: 0 - serializedVersion: 2 - m_Motion: {fileID: 7400000, guid: f2366ff3ef524b35bcf62aab21f9abb0, type: 2} + m_Motion: {fileID: 7400000, guid: 5f78295d12cb7a94a893f02e6abb489c, type: 2} m_Threshold: 0.6666667 - m_Position: {x: 0, y: -1} + m_Position: {x: 1, y: 0} m_TimeScale: 1 m_CycleOffset: 0 m_DirectBlendParameter: Blend @@ -286,15 +439,40 @@ - serializedVersion: 2 m_Motion: {fileID: 7400000, guid: f42cb240a2284878babb282417141298, type: 2} m_Threshold: 1 - m_Position: {x: 1, y: 0} + m_Position: {x: 0, y: -1} m_TimeScale: 1 m_CycleOffset: 0 m_DirectBlendParameter: Blend m_Mirror: 0 - m_BlendParameter: LookDirection - m_BlendParameterY: Blend + m_BlendParameter: LookDirectionX + m_BlendParameterY: LookDirectionY m_MinThreshold: 0 m_MaxThreshold: 1 m_UseAutomaticThresholds: 1 m_NormalizedBlendValues: 0 - m_BlendType: 0 + m_BlendType: 2 +--- !u!1101 &7151231939917025952 +AnimatorStateTransition: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: + m_Conditions: + - m_ConditionMode: 1 + m_ConditionEvent: IsAttacking + m_EventTreshold: 0 + m_DstStateMachine: {fileID: 0} + m_DstState: {fileID: 2012305371415375113} + m_Solo: 0 + m_Mute: 0 + m_IsExit: 0 + serializedVersion: 3 + m_TransitionDuration: 0.25 + m_TransitionOffset: 0 + m_ExitTime: 0.64285713 + m_HasExitTime: 0 + m_HasFixedDuration: 1 + m_InterruptionSource: 0 + m_OrderedInterruption: 1 + m_CanTransitionToSelf: 1 diff --git a/Assets/Editor.meta b/Assets/Editor.meta new file mode 100644 index 0000000..e87014f --- /dev/null +++ b/Assets/Editor.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: ca739ade79d9f32418b307250b7f8ab1 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Editor/EditorFOV.cs b/Assets/Editor/EditorFOV.cs new file mode 100644 index 0000000..7ad21b7 --- /dev/null +++ b/Assets/Editor/EditorFOV.cs @@ -0,0 +1,43 @@ +using UnityEditor; +using UnityEngine; + +[CustomEditor(typeof(FOV))] +public class EditorFOV : Editor +{ + private void OnSceneGUI() + { + FOV fov = (FOV)target; + + // Ensure the FOV script has access to the NPC controller + OrcNPCController controller = (OrcNPCController)fov.Controller; + + if (controller != null) + { + Vector3 lastDirection = controller.LastDirection.normalized; + + // Draw the full FOV circle + Handles.color = Color.green; + Handles.DrawWireArc(fov.transform.position, Vector3.forward, Vector3.right, 360, fov.Radius); + + // Get the angles for the FOV + Vector3 viewAngle01 = DirectionFromAngle(lastDirection, -fov.Angle / 2); + Vector3 viewAngle02 = DirectionFromAngle(lastDirection, fov.Angle / 2); + + // Draw the FOV angles + Handles.color = Color.yellow; + Handles.DrawLine(fov.transform.position, fov.transform.position + viewAngle01 * fov.Radius); + Handles.DrawLine(fov.transform.position, fov.transform.position + viewAngle02 * fov.Radius); + + // Draw the line representing the direction the NPC is facing + Handles.color = Color.red; + Handles.DrawLine(fov.transform.position, fov.transform.position + lastDirection * fov.Radius); + } + } + + private Vector3 DirectionFromAngle(Vector3 direction, float angleInDegrees) + { + // Rotate the direction vector by the given angle + Quaternion rotation = Quaternion.Euler(0, 0, angleInDegrees); + return rotation * direction; + } +} \ No newline at end of file diff --git a/Assets/Editor/EditorFOV.cs.meta b/Assets/Editor/EditorFOV.cs.meta new file mode 100644 index 0000000..3a4f641 --- /dev/null +++ b/Assets/Editor/EditorFOV.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 9c94594eebb653e418ba655e2b167894 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Images/Player/Animation/Player.controller b/Assets/Images/Player/Animation/Player.controller index 6a554d0..3b4cdb8 100644 --- a/Assets/Images/Player/Animation/Player.controller +++ b/Assets/Images/Player/Animation/Player.controller @@ -14,9 +14,6 @@ - m_ConditionMode: 3 m_ConditionEvent: Velocity m_EventTreshold: 0.1 - - m_ConditionMode: 4 - m_ConditionEvent: Velocity - m_EventTreshold: -0.1 m_DstStateMachine: {fileID: 0} m_DstState: {fileID: -6880058234535011538} m_Solo: 0 @@ -213,12 +210,6 @@ - m_ConditionMode: 2 m_ConditionEvent: IsAttacking m_EventTreshold: 0 - - m_ConditionMode: 3 - m_ConditionEvent: Velocity - m_EventTreshold: 0.1 - - m_ConditionMode: 4 - m_ConditionEvent: Velocity - m_EventTreshold: -0.1 m_DstStateMachine: {fileID: 0} m_DstState: {fileID: 3452964147490479734} m_Solo: 0 @@ -272,37 +263,37 @@ m_DefaultFloat: 0 m_DefaultInt: 0 m_DefaultBool: 0 - m_Controller: {fileID: 0} + m_Controller: {fileID: 9100000} - m_Name: moveY m_Type: 1 m_DefaultFloat: 0 m_DefaultInt: 0 m_DefaultBool: 0 - m_Controller: {fileID: 0} + m_Controller: {fileID: 9100000} - m_Name: LastMoveX m_Type: 1 m_DefaultFloat: 0 m_DefaultInt: 0 m_DefaultBool: 0 - m_Controller: {fileID: 0} + m_Controller: {fileID: 9100000} - m_Name: LastMoveY m_Type: 1 m_DefaultFloat: 0 m_DefaultInt: 0 m_DefaultBool: 0 - m_Controller: {fileID: 0} + m_Controller: {fileID: 9100000} - m_Name: IsAttacking m_Type: 4 m_DefaultFloat: 0 m_DefaultInt: 0 m_DefaultBool: 0 - m_Controller: {fileID: 0} + m_Controller: {fileID: 9100000} - m_Name: Velocity m_Type: 1 m_DefaultFloat: 0 m_DefaultInt: 0 m_DefaultBool: 0 - m_Controller: {fileID: 0} + m_Controller: {fileID: 9100000} m_AnimatorLayers: - serializedVersion: 5 m_Name: Base Layer diff --git a/Assets/Scenes/Prototype.unity b/Assets/Scenes/Prototype.unity index 64edaa8..24f4790 100644 --- a/Assets/Scenes/Prototype.unity +++ b/Assets/Scenes/Prototype.unity @@ -272,6 +272,82 @@ serializedVersion: 2 m_Size: {x: 1, y: 1} m_EdgeRadius: 0 +--- !u!1 &242559628 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 242559632} + - component: {fileID: 242559631} + - component: {fileID: 242559629} + m_Layer: 5 + m_Name: WorldCanvas + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &242559629 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 242559628} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: dc42784cf147c0c48a680349fa168899, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IgnoreReversedGraphics: 1 + m_BlockingObjects: 0 + m_BlockingMask: + serializedVersion: 2 + m_Bits: 4294967295 +--- !u!223 &242559631 +Canvas: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 242559628} + m_Enabled: 1 + serializedVersion: 3 + m_RenderMode: 2 + m_Camera: {fileID: 963720382} + m_PlaneDistance: 100 + m_PixelPerfect: 0 + m_ReceivesEvents: 1 + m_OverrideSorting: 0 + m_OverridePixelPerfect: 0 + m_SortingBucketNormalizedSize: 0 + m_AdditionalShaderChannelsFlag: 0 + m_SortingLayerID: -862486127 + m_SortingOrder: 1 + m_TargetDisplay: 0 +--- !u!224 &242559632 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 242559628} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 0.83333325, y: 0.83333325, z: 0.83333325} + m_Children: + - {fileID: 1966039464} + m_Father: {fileID: 743703308} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0, y: 0} + m_AnchoredPosition: {x: 0, y: 2.5} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 0.5} --- !u!1 &466908289 GameObject: m_ObjectHideFlags: 0 @@ -421,6 +497,81 @@ serializedVersion: 2 m_Size: {x: 1, y: 1} m_EdgeRadius: 0 +--- !u!1 &521375757 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 521375758} + m_Layer: 0 + m_Name: GameManager + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &521375758 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 521375757} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: -42.83393, y: -44.721485, z: -47.190758} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 659677662} + - {fileID: 1033366351} + m_Father: {fileID: 0} + m_RootOrder: 9 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &659677661 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 659677662} + - component: {fileID: 659677663} + m_Layer: 0 + m_Name: Observers + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &659677662 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 659677661} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 521375758} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &659677663 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 659677661} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: cb76e5688ed6ec749896b555804212e0, type: 3} + m_Name: + m_EditorClassIdentifier: --- !u!1 &743703306 GameObject: m_ObjectHideFlags: 0 @@ -436,10 +587,10 @@ - component: {fileID: 743703309} - component: {fileID: 743703310} - component: {fileID: 743703313} - m_Layer: 0 + m_Layer: 7 m_Name: Orc m_TagString: Untagged - m_Icon: {fileID: 0} + m_Icon: {fileID: 5132851093641282708, guid: 0000000000000000d000000000000000, type: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 @@ -505,7 +656,9 @@ m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: -47.8, y: -47.4, z: 0} m_LocalScale: {x: 1.2, y: 1.2, z: 1.2} - m_Children: [] + m_Children: + - {fileID: 1772674232} + - {fileID: 242559632} m_Father: {fileID: 0} m_RootOrder: 3 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} @@ -521,15 +674,16 @@ m_Script: {fileID: 11500000, guid: df3d81532da45c54d87eaf26c7c58900, type: 3} m_Name: m_EditorClassIdentifier: - target: {fileID: 1265954503} - speed: 5 + speed: 3 turnSpeed: 3 turnDistance: 2 - stoppingDistance: 10 + stoppingDistance: 5 stop: 0 agentDestination: {x: 0, y: 0} moveDirection: {x: 0, y: 0} + velocity: {x: 0, y: 0} rDist: 0 + grid: {fileID: 1014480004} --- !u!114 &743703310 MonoBehaviour: m_ObjectHideFlags: 0 @@ -542,11 +696,21 @@ m_Script: {fileID: 11500000, guid: a2d1e2f5065e40c4680cc1c51821736f, type: 3} m_Name: m_EditorClassIdentifier: - fsm: {fileID: 11400000, guid: 989f50236af8e2248a189fe3ddbe8034, type: 2} - agent: {fileID: 0} health: 100 maxHealth: 100 - target: {fileID: 1485538324} + fsm: {fileID: 11400000, guid: 989f50236af8e2248a189fe3ddbe8034, type: 2} + agent: {fileID: 0} + initialState: {fileID: 11400000, guid: f544bbd18c02f304386d6f1c01fb3431, type: 2} + healthBar: {fileID: 0} + healthBarImage: {fileID: 1966039468} + currentState: {fileID: 0} + lastDirection: {x: 1, y: 0} + weapon: {fileID: 1772674231} + deadTimer: 2 + disabletimer: 0 + attackClip: {fileID: 7400000, guid: 0f21b15b9f734f6995fa7fd0cd60e48b, type: 2} + MaxAttackTimer: 0 + isAttacking: 0 --- !u!61 &743703311 BoxCollider2D: m_ObjectHideFlags: 0 @@ -605,15 +769,153 @@ m_Name: m_EditorClassIdentifier: fovRadius: 10 - Angle: 103 + angle: 90 fovDelay: 0.3 targetMask: serializedVersion: 2 m_Bits: 64 - obstructionMask: - serializedVersion: 2 - m_Bits: 256 target: {fileID: 0} +--- !u!1 &935596104 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 935596107} + - component: {fileID: 935596106} + - component: {fileID: 935596105} + m_Layer: 0 + m_Name: EventSystem + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &935596105 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 935596104} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 4f231c4fb786f3946a6b90b886c48677, type: 3} + m_Name: + m_EditorClassIdentifier: + m_HorizontalAxis: Horizontal + m_VerticalAxis: Vertical + m_SubmitButton: Submit + m_CancelButton: Cancel + m_InputActionsPerSecond: 10 + m_RepeatDelay: 0.5 + m_ForceModuleActive: 0 +--- !u!114 &935596106 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 935596104} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 76c392e42b5098c458856cdf6ecaaaa1, type: 3} + m_Name: + m_EditorClassIdentifier: + m_FirstSelected: {fileID: 0} + m_sendNavigationEvents: 1 + m_DragThreshold: 10 +--- !u!4 &935596107 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 935596104} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 8 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &959352735 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 959352736} + - component: {fileID: 959352738} + - component: {fileID: 959352737} + m_Layer: 0 + m_Name: Background + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &959352736 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 959352735} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 31.200003, y: 2, z: 2} + m_Children: [] + m_Father: {fileID: 1966039464} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0.5, y: 0.5} + m_AnchorMax: {x: 0.5, y: 0.5} + m_AnchoredPosition: {x: 0, y: -0.003999591} + m_SizeDelta: {x: 0.2, y: 0.22} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &959352737 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 959352735} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0, g: 0, b: 0, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 0 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 21300000, guid: 7a83f207a17a16f43a2e0815145df913, type: 3} + m_Type: 0 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 0 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 +--- !u!222 &959352738 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 959352735} + m_CullTransparentMesh: 1 --- !u!1 &963720380 GameObject: m_ObjectHideFlags: 0 @@ -693,7 +995,7 @@ m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 963720380} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: -10} + m_LocalPosition: {x: -47.7, y: -45.8, z: -10} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 0} @@ -871,7 +1173,7 @@ gridWorldSize: {x: 100, y: 100} nodeRadius: 0.5 walkableTerrains: [] - obstacleProxPenalty: 50 + obstacleProxPenalty: 10 --- !u!114 &1014480005 MonoBehaviour: m_ObjectHideFlags: 0 @@ -912,6 +1214,50 @@ m_Script: {fileID: 11500000, guid: 1005d7bc1974a5e4db284e7078ff757d, type: 3} m_Name: m_EditorClassIdentifier: +--- !u!1 &1033366350 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1033366351} + - component: {fileID: 1033366352} + m_Layer: 0 + m_Name: NPC_Manager + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1033366351 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1033366350} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 521375758} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &1033366352 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1033366350} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 3a081df65f1f3d24aba73e1ba7608eed, type: 3} + m_Name: + m_EditorClassIdentifier: + npcList: [] --- !u!4 &1265954503 stripped Transform: m_CorrespondingSourceObject: {fileID: 7125823908817143917, guid: 0cf11774487a5ee47a41ba8097423209, type: 3} @@ -976,17 +1322,25 @@ propertyPath: m_Layer value: 6 objectReference: {fileID: 0} + - target: {fileID: 7125823908817143912, guid: 0cf11774487a5ee47a41ba8097423209, type: 3} + propertyPath: attackRange + value: 2 + objectReference: {fileID: 0} + - target: {fileID: 7125823908817143912, guid: 0cf11774487a5ee47a41ba8097423209, type: 3} + propertyPath: enemyLayerMask.m_Bits + value: 128 + objectReference: {fileID: 0} - target: {fileID: 7125823908817143917, guid: 0cf11774487a5ee47a41ba8097423209, type: 3} propertyPath: m_RootOrder value: 2 objectReference: {fileID: 0} - target: {fileID: 7125823908817143917, guid: 0cf11774487a5ee47a41ba8097423209, type: 3} propertyPath: m_LocalPosition.x - value: -0 + value: -46.7 objectReference: {fileID: 0} - target: {fileID: 7125823908817143917, guid: 0cf11774487a5ee47a41ba8097423209, type: 3} propertyPath: m_LocalPosition.y - value: -4.9 + value: -24.7 objectReference: {fileID: 0} - target: {fileID: 7125823908817143917, guid: 0cf11774487a5ee47a41ba8097423209, type: 3} propertyPath: m_LocalPosition.z @@ -1022,11 +1376,387 @@ objectReference: {fileID: 0} m_RemovedComponents: [] m_SourcePrefab: {fileID: 100100000, guid: 0cf11774487a5ee47a41ba8097423209, type: 3} ---- !u!1 &1485538324 stripped +--- !u!1 &1421125592 GameObject: - m_CorrespondingSourceObject: {fileID: 7125823908817143911, guid: 0cf11774487a5ee47a41ba8097423209, type: 3} - m_PrefabInstance: {fileID: 1378569865} + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1421125593} + - component: {fileID: 1421125595} + - component: {fileID: 1421125594} + m_Layer: 0 + m_Name: Color + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1421125593 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1421125592} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 31.200003, y: 2, z: 2} + m_Children: [] + m_Father: {fileID: 1966039464} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0.5, y: 0.5} + m_AnchorMax: {x: 0.5, y: 0.5} + m_AnchoredPosition: {x: 0, y: -0.003999591} + m_SizeDelta: {x: 0.2, y: 0.22} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &1421125594 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1421125592} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 0, b: 0, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 0} + m_Type: 3 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 0 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 +--- !u!222 &1421125595 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1421125592} + m_CullTransparentMesh: 1 +--- !u!1 &1649898231 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1649898235} + - component: {fileID: 1649898234} + - component: {fileID: 1649898233} + - component: {fileID: 1649898232} + m_Layer: 5 + m_Name: Canvas + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &1649898232 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1649898231} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: dc42784cf147c0c48a680349fa168899, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IgnoreReversedGraphics: 1 + m_BlockingObjects: 0 + m_BlockingMask: + serializedVersion: 2 + m_Bits: 4294967295 +--- !u!114 &1649898233 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1649898231} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 0cd44c1031e13a943bb63640046fad76, type: 3} + m_Name: + m_EditorClassIdentifier: + m_UiScaleMode: 0 + m_ReferencePixelsPerUnit: 100 + m_ScaleFactor: 1 + m_ReferenceResolution: {x: 800, y: 600} + m_ScreenMatchMode: 0 + m_MatchWidthOrHeight: 0 + m_PhysicalUnit: 3 + m_FallbackScreenDPI: 96 + m_DefaultSpriteDPI: 96 + m_DynamicPixelsPerUnit: 1 + m_PresetInfoIsWorld: 0 +--- !u!223 &1649898234 +Canvas: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1649898231} + m_Enabled: 1 + serializedVersion: 3 + m_RenderMode: 0 + m_Camera: {fileID: 0} + m_PlaneDistance: 100 + m_PixelPerfect: 0 + m_ReceivesEvents: 1 + m_OverrideSorting: 0 + m_OverridePixelPerfect: 0 + m_SortingBucketNormalizedSize: 0 + m_AdditionalShaderChannelsFlag: 0 + m_SortingLayerID: 0 + m_SortingOrder: 0 + m_TargetDisplay: 0 +--- !u!224 &1649898235 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1649898231} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 0, y: 0, z: 0} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 7 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0, y: 0} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0, y: 0} +--- !u!1 &1772674231 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1772674232} + - component: {fileID: 1772674234} + - component: {fileID: 1772674233} + m_Layer: 7 + m_Name: OrcWeapon + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 0 +--- !u!4 &1772674232 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1772674231} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 743703308} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!212 &1772674233 +SpriteRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1772674231} + m_Enabled: 1 + m_CastShadows: 0 + m_ReceiveShadows: 0 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 0 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 10754, guid: 0000000000000000f000000000000000, type: 0} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 0 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: -862486127 + m_SortingLayer: 2 + m_SortingOrder: 0 + m_Sprite: {fileID: 4301844918096825189, guid: 529a3f289051493d92d179d309189c59, type: 3} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_FlipX: 0 + m_FlipY: 0 + m_DrawMode: 0 + m_Size: {x: 3.4461539, y: 3.323077} + m_AdaptiveModeThreshold: 0.5 + m_SpriteTileMode: 0 + m_WasSpriteAssigned: 1 + m_MaskInteraction: 0 + m_SpriteSortPoint: 0 +--- !u!95 &1772674234 +Animator: + serializedVersion: 3 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1772674231} + m_Enabled: 1 + m_Avatar: {fileID: 0} + m_Controller: {fileID: 9100000, guid: 272534e5f112bf74991f11d15e367cfc, type: 2} + m_CullingMode: 0 + m_UpdateMode: 0 + m_ApplyRootMotion: 0 + m_LinearVelocityBlending: 0 + m_WarningMessage: + m_HasTransformHierarchy: 1 + m_AllowConstantClipSamplingOptimization: 1 + m_KeepAnimatorControllerStateOnDisable: 0 +--- !u!1 &1966039463 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1966039464} + - component: {fileID: 1966039466} + - component: {fileID: 1966039467} + - component: {fileID: 1966039468} + - component: {fileID: 1966039465} + m_Layer: 5 + m_Name: HealthBar + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1966039464 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1966039463} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 0.5, y: 0.5, z: 0.5} + m_Children: + - {fileID: 959352736} + - {fileID: 1421125593} + m_Father: {fileID: 242559632} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0.5, y: 0.5} + m_AnchorMax: {x: 0.5, y: 0.5} + m_AnchoredPosition: {x: 0, y: -0.64} + m_SizeDelta: {x: 6.25, y: 0.5} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &1966039465 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1966039463} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 31a19414c41e5ae4aae2af33fee712f6, type: 3} + m_Name: + m_EditorClassIdentifier: + m_ShowMaskGraphic: 1 +--- !u!222 &1966039466 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1966039463} + m_CullTransparentMesh: 1 +--- !u!225 &1966039467 +CanvasGroup: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1966039463} + m_Enabled: 1 + m_Alpha: 1 + m_Interactable: 1 + m_BlocksRaycasts: 1 + m_IgnoreParentGroups: 0 +--- !u!114 &1966039468 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1966039463} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 21300000, guid: 7a83f207a17a16f43a2e0815145df913, type: 3} + m_Type: 3 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 0 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 --- !u!1 &2120984397 GameObject: m_ObjectHideFlags: 0 diff --git a/Assets/Scripts/Interfaces/IDisplayable.cs b/Assets/Scripts/Interfaces/IDisplayable.cs new file mode 100644 index 0000000..5420d7e --- /dev/null +++ b/Assets/Scripts/Interfaces/IDisplayable.cs @@ -0,0 +1,9 @@ +using System.Collections; +using System.Collections.Generic; +using TMPro; +using UnityEngine; + +public interface IDisplayable +{ + public abstract void Display(TextMeshPro tmp); +} diff --git a/Assets/Scripts/Interfaces/IDisplayable.cs.meta b/Assets/Scripts/Interfaces/IDisplayable.cs.meta new file mode 100644 index 0000000..c7a63c3 --- /dev/null +++ b/Assets/Scripts/Interfaces/IDisplayable.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 7db9210c1375147458843ae24cdad8fd +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/Interfaces/IHealthSystem.cs b/Assets/Scripts/Interfaces/IHealthSystem.cs index 1ba754d..4ddf491 100644 --- a/Assets/Scripts/Interfaces/IHealthSystem.cs +++ b/Assets/Scripts/Interfaces/IHealthSystem.cs @@ -8,5 +8,5 @@ public void TakeDamage(float ammount); public bool IsDead(); - public float GetHealth(); -} + public float CurrentHealth(); +} \ No newline at end of file diff --git a/Assets/Scripts/Interfaces/IObserver.cs b/Assets/Scripts/Interfaces/IObserver.cs new file mode 100644 index 0000000..6fd5c44 --- /dev/null +++ b/Assets/Scripts/Interfaces/IObserver.cs @@ -0,0 +1,8 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; + +public interface IObserver +{ + public void OnNotify(object obj); +} diff --git a/Assets/Scripts/Interfaces/IObserver.cs.meta b/Assets/Scripts/Interfaces/IObserver.cs.meta new file mode 100644 index 0000000..2950033 --- /dev/null +++ b/Assets/Scripts/Interfaces/IObserver.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 26467af48aa79b044b073b7fc85371d9 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/NPC/FOV.cs b/Assets/Scripts/NPC/FOV.cs index a37726f..e5e2258 100644 --- a/Assets/Scripts/NPC/FOV.cs +++ b/Assets/Scripts/NPC/FOV.cs @@ -1,29 +1,40 @@ using System.Collections; using System.Collections.Generic; +using Unity.VisualScripting; using UnityEngine; public class FOV : MonoBehaviour { [Header("FOV Settings: ")] [SerializeField] private float fovRadius; - [Range(0, 360)][SerializeField] private float Angle; + [Range(0, 360)][SerializeField] private float angle; [SerializeField] private float fovDelay; [SerializeField] private LayerMask targetMask; - [SerializeField] private LayerMask obstructionMask; [SerializeField] private GameObject target; private NPCConroller controller; - private Agent agent; + + public float Radius => fovRadius; + public float Angle => angle; + public NPCConroller Controller => controller; + private bool isEnabled = true; + + public bool IsEnabled { get => isEnabled; set => isEnabled = value; } private void Awake() { controller = GetComponent(); + isEnabled = true; } // Start is called before the first frame update void Start() { - agent = controller.Agent; + StartCoroutine(FOVRoutine(fovDelay)); + } + + private void OnEnable() + { StartCoroutine(FOVRoutine(fovDelay)); } @@ -35,33 +46,39 @@ private void PerformFov() { - Collider2D collider = Physics2D.OverlapCircle(transform.position, fovRadius, targetMask); - GameObject potentialTarget = null; - - if (collider != null) + if (target == null && isEnabled) { - potentialTarget = collider.gameObject; - Debug.Log($"Collider FOV detected something: {potentialTarget}"); - Vector2 dirToTarget = (Vec3ToVec2(potentialTarget.transform.position) - Vec3ToVec2(transform.position)).normalized; - if (Vector3.Angle(transform.forward, dirToTarget) < Angle/2) - { - Debug.Log("Target in Angle!"); - target = potentialTarget; - //float distanceToTarget = Vector2.Distance(transform.forward, dirToTarget); + Collider2D[] colliders = Physics2D.OverlapCircleAll(transform.position, fovRadius, targetMask); - //if(Physics2D.Raycast(transform.position, dirToTarget, distanceToTarget,)) + if (colliders.Length != 0) + { + foreach (Collider2D collider in colliders) + { + GameObject potentialTarget = collider.gameObject; + Vector2 dirToTarget = (potentialTarget.transform.position - transform.position).normalized; + + // Check if the target is within the specified angle + if (Vector2.Angle(transform.right, dirToTarget) < angle / 2) + { + target = potentialTarget; + Debug.Log("Target detected within angle!"); + return; // Exit after finding the first valid target + } + } } } } - private static Vector2 Vec3ToVec2(Vector3 vec) => (Vector2)vec; - private IEnumerator FOVRoutine(float seconds) { - WaitForSeconds wait = new WaitForSeconds(seconds); - yield return wait; - PerformFov(); + while (true) + { + WaitForSeconds wait = new WaitForSeconds(seconds); + yield return wait; + PerformFov(); + } } public GameObject GetTarget() => target; + public void ClearTarget() => target = null; } diff --git a/Assets/Scripts/NPC/FSM/FSM.cs b/Assets/Scripts/NPC/FSM/FSM.cs index bdd94cc..47f5fa6 100644 --- a/Assets/Scripts/NPC/FSM/FSM.cs +++ b/Assets/Scripts/NPC/FSM/FSM.cs @@ -11,7 +11,6 @@ private NPCConroller controller; [SerializeField] private State initialState; [SerializeField] private State currentState; - [SerializeField] private GameObject target; public NPCConroller Controller => controller; public void SetUp(NPCConroller conroller) @@ -20,8 +19,7 @@ if (initialState != null) { - Debug.Log($"{controller.gameObject.name} initial state is {initialState}"); - initialState.GetentryActions(); + initialState.EnterState(this); currentState = initialState; } @@ -34,7 +32,7 @@ // Called Every Frame public void GUpdate() { - Debug.Log("FSM UPDATING"); + if (currentState != null) { if (currentState.GetActions().Count > 0) @@ -56,11 +54,18 @@ public void ChangeState(State state) { - currentState.GetExitAction().Run(this); //Runs the exit action + currentState.GetExitAction()?.Run(this); //Runs the exit action + currentState = state; state.EnterState(this); } public State CurrentState() => currentState; + public void SetInitialState(State initialState) + { + this.initialState = initialState; + currentState = initialState; + currentState.EnterState(this); + } private void SetContoller(NPCConroller controller) => this.controller = controller; } diff --git a/Assets/Scripts/NPC/FSM/State.cs b/Assets/Scripts/NPC/FSM/State.cs index 618f939..b8302be 100644 --- a/Assets/Scripts/NPC/FSM/State.cs +++ b/Assets/Scripts/NPC/FSM/State.cs @@ -17,9 +17,16 @@ public List GetTransitions() => transitions; public Action GetExitAction() => exitAction; + //SetUp custom Properties of the state + public virtual void StartState() + { + + } + //Runs the entry actions of the state public void EnterState(FSM fsm) { + StartState(); if (entryActions.Count > 0) { foreach (Action action in entryActions) @@ -36,6 +43,7 @@ { foreach (Transition transition in transitions) { + //Debug.Log($"Transition {transition.name}: {transition.IsTriggered(fsm)}"); if (transition.IsTriggered(fsm)) { return transition; diff --git a/Assets/Scripts/NPC/HealthBar.cs b/Assets/Scripts/NPC/HealthBar.cs new file mode 100644 index 0000000..fb19419 --- /dev/null +++ b/Assets/Scripts/NPC/HealthBar.cs @@ -0,0 +1,37 @@ +using System; +using System.Collections; +using System.Collections.Generic; +using UnityEngine; +using UnityEngine.UI; + +public class HealthBar : MonoBehaviour +{ + [SerializeField] private Image image; + [SerializeField] private GameObject obj; + private IHealthSystem healthSystem; + + private void Awake() + { + if (!obj.TryGetComponent(out healthSystem)) + { + Debug.LogError($"Missing {nameof(IHealthSystem)} component"); + } + } + + // Start is called before the first frame update + void Start() + { + + } + + // Update is called once per frame + void Update() + { + + } + + public void UpdateHealth() + { + image.fillAmount = 0f; + } +} diff --git a/Assets/Scripts/NPC/HealthBar.cs.meta b/Assets/Scripts/NPC/HealthBar.cs.meta new file mode 100644 index 0000000..c547777 --- /dev/null +++ b/Assets/Scripts/NPC/HealthBar.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: bc675ff7abe802f4d8f3cf7838d87b42 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/NPC/NPCConroller.cs b/Assets/Scripts/NPC/NPCConroller.cs index 2d1b2f5..9b1bc33 100644 --- a/Assets/Scripts/NPC/NPCConroller.cs +++ b/Assets/Scripts/NPC/NPCConroller.cs @@ -4,16 +4,23 @@ using MyCollections.AI.FinitStateMachine; [RequireComponent(typeof(Animator))] -public abstract class NPCConroller : MonoBehaviour +public abstract class NPCConroller : MonoBehaviour, IHealthSystem { + [Header("NPC Attributes: ")] + [SerializeField] protected float health; + [SerializeField] protected float maxHealth; + [SerializeField] protected FSM fsm; [SerializeField] protected Agent agent; protected Animator animator; protected FOV agentFOV; + protected List observers = new List(); public Agent Agent => agent; public Animator Animator => animator; public FOV AgentFOV => agentFOV; + public float MaxHealth => maxHealth; + public bool IsCoroutineRunning { get; set; } protected virtual void Awake() { @@ -48,4 +55,42 @@ { } + + protected void NotifyObservers() + { + foreach (IObserver observer in observers) + { + observer.OnNotify(this); // Notify each observer, passing the NPCController as the object + } + } + + + public virtual float CurrentHealth() => health; + + public virtual void Heal(float ammount) => health += ammount; + + public virtual bool IsDead() => health <= 0f; + + public virtual void TakeDamage(float ammount) + { + health -= ammount; + NotifyObservers(); + } + + // Observer pattern methods + public void AddObserver(IObserver observer) + { + if (!observers.Contains(observer)) + { + observers.Add(observer); + } + } + + public void RemoveObserver(IObserver observer) + { + if (observers.Contains(observer)) + { + observers.Remove(observer); + } + } } diff --git a/Assets/Scripts/NPC/NPCManager.cs b/Assets/Scripts/NPC/NPCManager.cs new file mode 100644 index 0000000..172ab09 --- /dev/null +++ b/Assets/Scripts/NPC/NPCManager.cs @@ -0,0 +1,79 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; + +public class NPCManager : MonoBehaviour +{ + public static NPCManager Instance { get; private set; } + [SerializeField] private List npcList; + private List observers = new List(); + + private void Awake() + { + if (Instance == null) + { + Instance = this; + } + + else + { + Destroy(gameObject); + } + } + + // Called by NPCs when they spawn + public void RegisterNPC(EnemyNPCContoller npc) + { + npcList.Add(npc); + + foreach (IObserver observer in observers) + { + npc.AddObserver(observer); + } + } + + // Called by NPCs when they are destroyed + public void UnregisterNPC(EnemyNPCContoller npc) + { + npcList.Remove(npc); + + foreach (IObserver observer in observers) + { + npc.RemoveObserver(observer); + } + } + + public void RegisterObservers(IObserver observer) + { + observers.Add(observer); + + //Register observer from + foreach (EnemyNPCContoller npc in npcList) + { + npc.AddObserver(observer); + } + } + + public void UnregisterObserver(IObserver observer) + { + observers.Remove(observer); + + // Unregister the observer from all NPCs + foreach (EnemyNPCContoller npc in npcList) + { + npc.RemoveObserver(observer); + } + } + + // Start is called before the first frame update + void Start() + { + + } + + // Update is called once per frame + void Update() + { + + } +} diff --git a/Assets/Scripts/NPC/NPCManager.cs.meta b/Assets/Scripts/NPC/NPCManager.cs.meta new file mode 100644 index 0000000..8ac89d8 --- /dev/null +++ b/Assets/Scripts/NPC/NPCManager.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 3a081df65f1f3d24aba73e1ba7608eed +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/NPC/Orc/Actions/ChaseTartet.cs b/Assets/Scripts/NPC/Orc/Actions/ChaseTartet.cs index 6399828..df1f733 100644 --- a/Assets/Scripts/NPC/Orc/Actions/ChaseTartet.cs +++ b/Assets/Scripts/NPC/Orc/Actions/ChaseTartet.cs @@ -17,6 +17,7 @@ if (target != null) { agent.SetDestination(target.transform.position); + agent.agentStop = false; } } } diff --git a/Assets/Scripts/NPC/Orc/Actions/ClearTarget.asset b/Assets/Scripts/NPC/Orc/Actions/ClearTarget.asset new file mode 100644 index 0000000..b33ec5f --- /dev/null +++ b/Assets/Scripts/NPC/Orc/Actions/ClearTarget.asset @@ -0,0 +1,14 @@ +%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: 21409d02ab17bb447be9289882791e6b, type: 3} + m_Name: ClearTarget + m_EditorClassIdentifier: diff --git a/Assets/Scripts/NPC/Orc/Actions/ClearTarget.asset.meta b/Assets/Scripts/NPC/Orc/Actions/ClearTarget.asset.meta new file mode 100644 index 0000000..4c1190b --- /dev/null +++ b/Assets/Scripts/NPC/Orc/Actions/ClearTarget.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: a99f4ddcf701dc948a90ba146ee514e8 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/NPC/Orc/Actions/ClearTarget.cs b/Assets/Scripts/NPC/Orc/Actions/ClearTarget.cs new file mode 100644 index 0000000..74e3538 --- /dev/null +++ b/Assets/Scripts/NPC/Orc/Actions/ClearTarget.cs @@ -0,0 +1,17 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; +using MyCollections.AI.FinitStateMachine; + +[CreateAssetMenu(menuName = "Finite State Machine/Action/ClearTarget")] +public class ClearTarget : Action +{ + public override void Run(FSM fsm) + { + if (fsm.Controller.AgentFOV.GetTarget() != null) + { + fsm.Controller.AgentFOV.IsEnabled = false; + fsm.Controller.AgentFOV.ClearTarget(); + } + } +} diff --git a/Assets/Scripts/NPC/Orc/Actions/ClearTarget.cs.meta b/Assets/Scripts/NPC/Orc/Actions/ClearTarget.cs.meta new file mode 100644 index 0000000..b8798f9 --- /dev/null +++ b/Assets/Scripts/NPC/Orc/Actions/ClearTarget.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 21409d02ab17bb447be9289882791e6b +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/NPC/Orc/Actions/DisableWeapon.asset b/Assets/Scripts/NPC/Orc/Actions/DisableWeapon.asset new file mode 100644 index 0000000..9b5aa12 --- /dev/null +++ b/Assets/Scripts/NPC/Orc/Actions/DisableWeapon.asset @@ -0,0 +1,14 @@ +%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: 53ee13e50b7440f429ede1801a9d4fa2, type: 3} + m_Name: DisableWeapon + m_EditorClassIdentifier: diff --git a/Assets/Scripts/NPC/Orc/Actions/DisableWeapon.asset.meta b/Assets/Scripts/NPC/Orc/Actions/DisableWeapon.asset.meta new file mode 100644 index 0000000..1acb637 --- /dev/null +++ b/Assets/Scripts/NPC/Orc/Actions/DisableWeapon.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: d6b405631b8b5b0459abf3ab76c405eb +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/NPC/Orc/Actions/DisableWeaponAction.cs b/Assets/Scripts/NPC/Orc/Actions/DisableWeaponAction.cs new file mode 100644 index 0000000..1cd72f4 --- /dev/null +++ b/Assets/Scripts/NPC/Orc/Actions/DisableWeaponAction.cs @@ -0,0 +1,17 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; +using MyCollections.AI.FinitStateMachine; + +[CreateAssetMenu(menuName = "Finite State Machine/Action/DisableWeaponAction")] +public class DisableWeaponAction : Action +{ + public override void Run(FSM fsm) + { + OrcNPCController controller = (OrcNPCController)fsm.Controller; + GameObject weapon = controller.Weapon; + + fsm.Controller.Animator.SetBool("IsAttacking", false); + weapon.SetActive(false); + } +} diff --git a/Assets/Scripts/NPC/Orc/Actions/DisableWeaponAction.cs.meta b/Assets/Scripts/NPC/Orc/Actions/DisableWeaponAction.cs.meta new file mode 100644 index 0000000..0452d69 --- /dev/null +++ b/Assets/Scripts/NPC/Orc/Actions/DisableWeaponAction.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 53ee13e50b7440f429ede1801a9d4fa2 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/NPC/Orc/Actions/IdleAction.cs b/Assets/Scripts/NPC/Orc/Actions/IdleAction.cs index 4dd1290..4619677 100644 --- a/Assets/Scripts/NPC/Orc/Actions/IdleAction.cs +++ b/Assets/Scripts/NPC/Orc/Actions/IdleAction.cs @@ -6,11 +6,31 @@ [CreateAssetMenu(menuName = "Finite State Machine/Action/Idle")] public class IdleAction : Action { + public override void Run(FSM fsm) { - Agent agent = fsm.Controller.Agent; + IdleState state = (IdleState)fsm.CurrentState(); + state.timer -= Time.deltaTime; + if (state.timer <= 0f && !state.generated) + { + GenerateWaypoint(fsm.Controller.Agent); + state.generated = true; + } + } - if(agent != null) agent.agentStop = true; + private void GenerateWaypoint(Agent agent) + { + //Give agent a waypoint + Node randomNode = agent.Grid.GetRandomWalkableNode(); + + if (randomNode != null) + { + Vector2 targetPosition = randomNode.worldPos; + Debug.Log($"TARGET POSITION: {targetPosition}"); + agent.SetDestination(targetPosition); + } + + else Debug.LogError($"RANDOM NODE {randomNode}"); } } diff --git a/Assets/Scripts/NPC/Orc/Actions/MeleeAttackAction.asset b/Assets/Scripts/NPC/Orc/Actions/MeleeAttackAction.asset new file mode 100644 index 0000000..bc88590 --- /dev/null +++ b/Assets/Scripts/NPC/Orc/Actions/MeleeAttackAction.asset @@ -0,0 +1,20 @@ +%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: 659e1d3713dd253449cdba5206d0a74f, type: 3} + m_Name: MeleeAttackAction + m_EditorClassIdentifier: + attackRange: 1.5 + targetLayerMask: + serializedVersion: 2 + m_Bits: 64 + attackBaseValue: 5 + attackTimer: 2 diff --git a/Assets/Scripts/NPC/Orc/Actions/MeleeAttackAction.asset.meta b/Assets/Scripts/NPC/Orc/Actions/MeleeAttackAction.asset.meta new file mode 100644 index 0000000..8e163ad --- /dev/null +++ b/Assets/Scripts/NPC/Orc/Actions/MeleeAttackAction.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: c9b52c567df4ead4aa694275d5bf984e +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/NPC/Orc/Actions/MeleeAttackAction.cs b/Assets/Scripts/NPC/Orc/Actions/MeleeAttackAction.cs new file mode 100644 index 0000000..c2cca75 --- /dev/null +++ b/Assets/Scripts/NPC/Orc/Actions/MeleeAttackAction.cs @@ -0,0 +1,78 @@ +using UnityEngine; +using System.Collections; +using MyCollections.AI.FinitStateMachine; + +[CreateAssetMenu(menuName = "Finite State Machine/Action/MeleeAttackAction")] +public class MeleeAttackAction : Action +{ + [Header("Melee Combat Settings:")] + [SerializeField] private float attackRange; + [SerializeField] private LayerMask targetLayerMask; + [SerializeField] private float attackBaseValue = 5f; + [SerializeField] private float attackTimer = 2f; + + public override void Run(FSM fsm) + { + // Start the attack coroutine if not already running + NPCConroller controller = fsm.Controller; + if (controller != null && !controller.IsCoroutineRunning) + { + controller.StartCoroutine(RunAttack(fsm, attackTimer)); + } + } + + private void ApplyAttack(FSM fsm) + { + OrcNPCController controller = fsm.Controller as OrcNPCController; + + if (controller == null) + { + Debug.LogWarning("MeleeAttackAction: Controller is not an OrcNPCController."); + return; + } + + Animator anim = controller.Animator; + GameObject weapon = controller.Weapon; + + if (controller.AgentFOV.GetTarget() == null || anim == null || weapon == null) + { + Debug.LogWarning("MeleeAttackAction: Missing required components."); + return; + } + + if (!controller.isAttacking) + { + weapon.SetActive(true); + Vector2 origin = controller.transform.position; + Vector2 direction = ((Vector2)controller.AgentFOV.GetTarget().transform.position - origin).normalized; + + RaycastHit2D hit = Physics2D.Raycast(origin, direction, attackRange, targetLayerMask); + Debug.DrawRay(origin, direction * attackRange, Color.red, 1.5f); + controller.isAttacking = true; + + if (hit.collider != null && hit.collider.TryGetComponent(out IHealthSystem healthSystem)) + { + Debug.Log($"Apply Damage to the {hit.collider.gameObject}!"); + healthSystem.TakeDamage(attackBaseValue); + } + } + } + + private IEnumerator RunAttack(FSM fsm, float wait) + { + NPCConroller controller = fsm.Controller; + + if (controller == null) yield break; + + controller.IsCoroutineRunning = true; + + // Ensure the coroutine runs only while the FSM is in the current state + while (fsm.CurrentState() == fsm.CurrentState()) + { + yield return new WaitForSeconds(wait); + ApplyAttack(fsm); + } + + controller.IsCoroutineRunning = false; + } +} \ No newline at end of file diff --git a/Assets/Scripts/NPC/Orc/Actions/MeleeAttackAction.cs.meta b/Assets/Scripts/NPC/Orc/Actions/MeleeAttackAction.cs.meta new file mode 100644 index 0000000..ac8f3e1 --- /dev/null +++ b/Assets/Scripts/NPC/Orc/Actions/MeleeAttackAction.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 659e1d3713dd253449cdba5206d0a74f +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/NPC/Orc/Actions/PatrolAction.asset b/Assets/Scripts/NPC/Orc/Actions/PatrolAction.asset new file mode 100644 index 0000000..d68a4e5 --- /dev/null +++ b/Assets/Scripts/NPC/Orc/Actions/PatrolAction.asset @@ -0,0 +1,14 @@ +%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: 6cd4bee13d8053c4dab9fc4633d042f5, type: 3} + m_Name: PatrolAction + m_EditorClassIdentifier: diff --git a/Assets/Scripts/NPC/Orc/Actions/PatrolAction.asset.meta b/Assets/Scripts/NPC/Orc/Actions/PatrolAction.asset.meta new file mode 100644 index 0000000..6475193 --- /dev/null +++ b/Assets/Scripts/NPC/Orc/Actions/PatrolAction.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: ff1e99d0d8c1db5448ed47b03ebed981 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/NPC/Orc/Actions/PatrolAction.cs b/Assets/Scripts/NPC/Orc/Actions/PatrolAction.cs new file mode 100644 index 0000000..34f2995 --- /dev/null +++ b/Assets/Scripts/NPC/Orc/Actions/PatrolAction.cs @@ -0,0 +1,14 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; +using MyCollections.AI.FinitStateMachine; + +[CreateAssetMenu(menuName = "Finite State Machine/Action/PatrolAction")] +public class PatrolAction : Action +{ + public override void Run(FSM fsm) + { + Agent agent = fsm.Controller.Agent; + agent.agentStop = false; + } +} diff --git a/Assets/Scripts/NPC/Orc/Actions/PatrolAction.cs.meta b/Assets/Scripts/NPC/Orc/Actions/PatrolAction.cs.meta new file mode 100644 index 0000000..622e6cb --- /dev/null +++ b/Assets/Scripts/NPC/Orc/Actions/PatrolAction.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 6cd4bee13d8053c4dab9fc4633d042f5 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/NPC/Orc/Actions/SetIdleTime.asset b/Assets/Scripts/NPC/Orc/Actions/SetIdleTime.asset new file mode 100644 index 0000000..97a1073 --- /dev/null +++ b/Assets/Scripts/NPC/Orc/Actions/SetIdleTime.asset @@ -0,0 +1,14 @@ +%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: 65ebc51757f32024fb22417f10a2a19e, type: 3} + m_Name: SetIdleTime + m_EditorClassIdentifier: diff --git a/Assets/Scripts/NPC/Orc/Actions/SetIdleTime.asset.meta b/Assets/Scripts/NPC/Orc/Actions/SetIdleTime.asset.meta new file mode 100644 index 0000000..f34c90b --- /dev/null +++ b/Assets/Scripts/NPC/Orc/Actions/SetIdleTime.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 0282369c2d7558f4983082318cc2ebdd +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/NPC/Orc/Actions/SetIdleTime.cs b/Assets/Scripts/NPC/Orc/Actions/SetIdleTime.cs new file mode 100644 index 0000000..ea63253 --- /dev/null +++ b/Assets/Scripts/NPC/Orc/Actions/SetIdleTime.cs @@ -0,0 +1,23 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; +using MyCollections.AI.FinitStateMachine; + +[CreateAssetMenu(menuName = "Finite State Machine/Action/SetIdleTime")] +public class SetIdleTime : Action +{ + public override void Run(FSM fsm) + { + IdleState state = (IdleState)fsm.CurrentState(); + Agent agent = fsm.Controller.Agent; + state.generated = false; + + agent.agentStop = true; + + if (state != null) + { + state.timer = Random.Range(2f, 10f); + Debug.Log($"TIMER IDLE: {state.timer}f"); + } + } +} diff --git a/Assets/Scripts/NPC/Orc/Actions/SetIdleTime.cs.meta b/Assets/Scripts/NPC/Orc/Actions/SetIdleTime.cs.meta new file mode 100644 index 0000000..10fd67a --- /dev/null +++ b/Assets/Scripts/NPC/Orc/Actions/SetIdleTime.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 65ebc51757f32024fb22417f10a2a19e +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/NPC/Orc/Conditions/IsDead.asset b/Assets/Scripts/NPC/Orc/Conditions/IsDead.asset new file mode 100644 index 0000000..5a6705f --- /dev/null +++ b/Assets/Scripts/NPC/Orc/Conditions/IsDead.asset @@ -0,0 +1,14 @@ +%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: ea674bb1efc861f4891b3e860cf044cc, type: 3} + m_Name: IsDead + m_EditorClassIdentifier: diff --git a/Assets/Scripts/NPC/Orc/Conditions/IsDead.asset.meta b/Assets/Scripts/NPC/Orc/Conditions/IsDead.asset.meta new file mode 100644 index 0000000..8840336 --- /dev/null +++ b/Assets/Scripts/NPC/Orc/Conditions/IsDead.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: fb8744c3932a27e48bbbaef2add7933f +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/NPC/Orc/Conditions/IsDead.cs b/Assets/Scripts/NPC/Orc/Conditions/IsDead.cs new file mode 100644 index 0000000..b6fcfaa --- /dev/null +++ b/Assets/Scripts/NPC/Orc/Conditions/IsDead.cs @@ -0,0 +1,10 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; +using MyCollections.AI.FinitStateMachine; + +[CreateAssetMenu(menuName = "Finite State Machine/Condition/IsDead")] +public class IsDead : Condition +{ + public override bool CheckCondition(FSM fsm) => fsm.Controller.CurrentHealth() <= 0f; +} diff --git a/Assets/Scripts/NPC/Orc/Conditions/IsDead.cs.meta b/Assets/Scripts/NPC/Orc/Conditions/IsDead.cs.meta new file mode 100644 index 0000000..ad7a30e --- /dev/null +++ b/Assets/Scripts/NPC/Orc/Conditions/IsDead.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: ea674bb1efc861f4891b3e860cf044cc +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/NPC/Orc/Conditions/IsNotOnDestination.asset b/Assets/Scripts/NPC/Orc/Conditions/IsNotOnDestination.asset new file mode 100644 index 0000000..653369b --- /dev/null +++ b/Assets/Scripts/NPC/Orc/Conditions/IsNotOnDestination.asset @@ -0,0 +1,14 @@ +%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: 2322f705bfe43c0408b67553ccd209f2, type: 3} + m_Name: IsNotOnDestination + m_EditorClassIdentifier: diff --git a/Assets/Scripts/NPC/Orc/Conditions/IsNotOnDestination.asset.meta b/Assets/Scripts/NPC/Orc/Conditions/IsNotOnDestination.asset.meta new file mode 100644 index 0000000..6e720ff --- /dev/null +++ b/Assets/Scripts/NPC/Orc/Conditions/IsNotOnDestination.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: cc798be60553ff442874fb040d9c1582 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/NPC/Orc/Conditions/IsNotOnDestination.cs b/Assets/Scripts/NPC/Orc/Conditions/IsNotOnDestination.cs new file mode 100644 index 0000000..975523b --- /dev/null +++ b/Assets/Scripts/NPC/Orc/Conditions/IsNotOnDestination.cs @@ -0,0 +1,15 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; +using MyCollections.AI.FinitStateMachine; + +[CreateAssetMenu(menuName = "Finite State Machine/Condition/IsNotOnDestination")] +public class IsNotOnDestination : Condition +{ + public override bool CheckCondition(FSM fsm) + { + Agent agent = fsm.Controller.Agent; + + return agent.remainingDistance > 0.2f; + } +} diff --git a/Assets/Scripts/NPC/Orc/Conditions/IsNotOnDestination.cs.meta b/Assets/Scripts/NPC/Orc/Conditions/IsNotOnDestination.cs.meta new file mode 100644 index 0000000..6946acf --- /dev/null +++ b/Assets/Scripts/NPC/Orc/Conditions/IsNotOnDestination.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 2322f705bfe43c0408b67553ccd209f2 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/NPC/Orc/Conditions/IsOnDestination.asset b/Assets/Scripts/NPC/Orc/Conditions/IsOnDestination.asset new file mode 100644 index 0000000..4ffee0e --- /dev/null +++ b/Assets/Scripts/NPC/Orc/Conditions/IsOnDestination.asset @@ -0,0 +1,14 @@ +%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: c60d12e2ec47bc945876e8c2a62bc7b7, type: 3} + m_Name: IsOnDestination + m_EditorClassIdentifier: diff --git a/Assets/Scripts/NPC/Orc/Conditions/IsOnDestination.asset.meta b/Assets/Scripts/NPC/Orc/Conditions/IsOnDestination.asset.meta new file mode 100644 index 0000000..974a9f4 --- /dev/null +++ b/Assets/Scripts/NPC/Orc/Conditions/IsOnDestination.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 16b8f4f5dbbaa264381636c5dd17a281 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/NPC/Orc/Conditions/IsOnDestination.cs b/Assets/Scripts/NPC/Orc/Conditions/IsOnDestination.cs new file mode 100644 index 0000000..2bba2ec --- /dev/null +++ b/Assets/Scripts/NPC/Orc/Conditions/IsOnDestination.cs @@ -0,0 +1,10 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; +using MyCollections.AI.FinitStateMachine; + +[CreateAssetMenu(menuName = "Finite State Machine/Condition/IsOnDestination")] +public class IsOnDestination : Condition +{ + public override bool CheckCondition(FSM fsm) => fsm.Controller.Agent.remainingDistance <= 0.2f; +} diff --git a/Assets/Scripts/NPC/Orc/Conditions/IsOnDestination.cs.meta b/Assets/Scripts/NPC/Orc/Conditions/IsOnDestination.cs.meta new file mode 100644 index 0000000..6515396 --- /dev/null +++ b/Assets/Scripts/NPC/Orc/Conditions/IsOnDestination.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: c60d12e2ec47bc945876e8c2a62bc7b7 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/NPC/Orc/Conditions/IsTargetClose.asset b/Assets/Scripts/NPC/Orc/Conditions/IsTargetClose.asset new file mode 100644 index 0000000..ff45f19 --- /dev/null +++ b/Assets/Scripts/NPC/Orc/Conditions/IsTargetClose.asset @@ -0,0 +1,15 @@ +%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: 0d3b7a9a5bbe04c4bba8049b04320fc7, type: 3} + m_Name: IsTargetClose + m_EditorClassIdentifier: + distance: 2 diff --git a/Assets/Scripts/NPC/Orc/Conditions/IsTargetClose.asset.meta b/Assets/Scripts/NPC/Orc/Conditions/IsTargetClose.asset.meta new file mode 100644 index 0000000..d1454d8 --- /dev/null +++ b/Assets/Scripts/NPC/Orc/Conditions/IsTargetClose.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: ca96130eb662f294ba0cac3df8788466 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/NPC/Orc/Conditions/IsTargetClose.cs b/Assets/Scripts/NPC/Orc/Conditions/IsTargetClose.cs new file mode 100644 index 0000000..d31d1c9 --- /dev/null +++ b/Assets/Scripts/NPC/Orc/Conditions/IsTargetClose.cs @@ -0,0 +1,12 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; +using MyCollections.AI.FinitStateMachine; + +[CreateAssetMenu(menuName = "Finite State Machine/Condition/IsTargetClose")] +public class IsTargetClose : Condition +{ + [SerializeField] private float distance; + + public override bool CheckCondition(FSM fsm) => (fsm.Controller.transform.position - fsm.Controller.AgentFOV.GetTarget().transform.position).magnitude <= distance; +} diff --git a/Assets/Scripts/NPC/Orc/Conditions/IsTargetClose.cs.meta b/Assets/Scripts/NPC/Orc/Conditions/IsTargetClose.cs.meta new file mode 100644 index 0000000..30e9b9a --- /dev/null +++ b/Assets/Scripts/NPC/Orc/Conditions/IsTargetClose.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 0d3b7a9a5bbe04c4bba8049b04320fc7 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/NPC/Orc/Conditions/IsTargetNotClose.asset b/Assets/Scripts/NPC/Orc/Conditions/IsTargetNotClose.asset new file mode 100644 index 0000000..1b28043 --- /dev/null +++ b/Assets/Scripts/NPC/Orc/Conditions/IsTargetNotClose.asset @@ -0,0 +1,15 @@ +%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: de528a5ef8d1e424397ddde58595abe5, type: 3} + m_Name: IsTargetNotClose + m_EditorClassIdentifier: + distance: 2 diff --git a/Assets/Scripts/NPC/Orc/Conditions/IsTargetNotClose.asset.meta b/Assets/Scripts/NPC/Orc/Conditions/IsTargetNotClose.asset.meta new file mode 100644 index 0000000..6c338e3 --- /dev/null +++ b/Assets/Scripts/NPC/Orc/Conditions/IsTargetNotClose.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: e447b6af56c40d744809722336732043 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/NPC/Orc/Conditions/IsTargetNotClose.cs b/Assets/Scripts/NPC/Orc/Conditions/IsTargetNotClose.cs new file mode 100644 index 0000000..c95431a --- /dev/null +++ b/Assets/Scripts/NPC/Orc/Conditions/IsTargetNotClose.cs @@ -0,0 +1,16 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; +using MyCollections.AI.FinitStateMachine; + +[CreateAssetMenu(menuName = "Finite State Machine/Condition/IsTargetNotClose")] +public class IsTargetNotClose : Condition +{ + [SerializeField] private float distance; + + public override bool CheckCondition(FSM fsm) + { + Debug.Log($"IS TARGET NOT CLOSE: { fsm.Controller.Agent.remainingDistance > distance}"); + return (fsm.Controller.transform.position - fsm.Controller.AgentFOV.GetTarget().transform.position).magnitude > distance; + } +} diff --git a/Assets/Scripts/NPC/Orc/Conditions/IsTargetNotClose.cs.meta b/Assets/Scripts/NPC/Orc/Conditions/IsTargetNotClose.cs.meta new file mode 100644 index 0000000..a3caa00 --- /dev/null +++ b/Assets/Scripts/NPC/Orc/Conditions/IsTargetNotClose.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: de528a5ef8d1e424397ddde58595abe5 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/NPC/Orc/Conditions/TargetDistance.cs b/Assets/Scripts/NPC/Orc/Conditions/TargetDistance.cs deleted file mode 100644 index 154d693..0000000 --- a/Assets/Scripts/NPC/Orc/Conditions/TargetDistance.cs +++ /dev/null @@ -1,21 +0,0 @@ -using System.Collections; -using System.Collections.Generic; -using UnityEngine; -using MyCollections.AI.FinitStateMachine; - -[CreateAssetMenu(menuName = "Finite State Machine/Condition/TargetDistance")] -public class TargetDistance : Condition -{ - [SerializeField] private float distance; - [SerializeField] private bool targetClose; - - public override bool CheckCondition(FSM fsm) - { - if (targetClose) - { - //if(fsm.Controller.Agent.destination == fsm.agent.) - } - - return false; - } -} diff --git a/Assets/Scripts/NPC/Orc/Conditions/TargetDistance.cs.meta b/Assets/Scripts/NPC/Orc/Conditions/TargetDistance.cs.meta deleted file mode 100644 index 30e9b9a..0000000 --- a/Assets/Scripts/NPC/Orc/Conditions/TargetDistance.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 0d3b7a9a5bbe04c4bba8049b04320fc7 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/NPC/Orc/EnemyNPCContoller.cs b/Assets/Scripts/NPC/Orc/EnemyNPCContoller.cs index a182ff4..1589e4f 100644 --- a/Assets/Scripts/NPC/Orc/EnemyNPCContoller.cs +++ b/Assets/Scripts/NPC/Orc/EnemyNPCContoller.cs @@ -1,34 +1,39 @@ using System.Collections; using System.Collections.Generic; +using TMPro; using UnityEngine; +using UnityEngine.UI; +using MyCollections.AI.FinitStateMachine; -public abstract class EnemyNPCContoller : NPCConroller, IHealthSystem +public abstract class EnemyNPCContoller : NPCConroller { - [Header("NPC Attributes: ")] - [SerializeField] protected float health; - [SerializeField] protected float maxHealth; + [SerializeField] protected State initialState; - [SerializeField] protected GameObject target; + [Header("Other References: ")] + [SerializeField] protected GameObject healthBar; - public GameObject Target => target; - public float GetHealth() => health; + [SerializeField] protected Image healthBarImage; + public Image HealthBarImage => healthBarImage; - public void Heal(float ammount) => health += ammount; - - public bool IsDead() => health <= 0f; - - public void TakeDamage(float ammount) => maxHealth -= ammount; - + protected override void Awake() { base.Awake(); } + protected virtual void OnEnable() + { + health = maxHealth; + fsm.SetInitialState(initialState); + NPCManager.Instance.RegisterNPC(this); + healthBarImage.fillAmount = MaxHealth; + } + // Start is called before the first frame update protected override void Start() { base.Start(); - health = maxHealth; + NPCManager.Instance.RegisterNPC(this); } // Update is called once per frame @@ -36,4 +41,10 @@ { base.Update(); } + + protected virtual void OnDisable() + { + NPCManager.Instance.UnregisterNPC(this); + } + } diff --git a/Assets/Scripts/NPC/Orc/OrcFSM.asset b/Assets/Scripts/NPC/Orc/OrcFSM.asset index 9454fef..2518379 100644 --- a/Assets/Scripts/NPC/Orc/OrcFSM.asset +++ b/Assets/Scripts/NPC/Orc/OrcFSM.asset @@ -13,5 +13,4 @@ m_Name: OrcFSM m_EditorClassIdentifier: initialState: {fileID: 11400000, guid: f544bbd18c02f304386d6f1c01fb3431, type: 2} - currentState: {fileID: 11400000, guid: f544bbd18c02f304386d6f1c01fb3431, type: 2} - target: {fileID: 0} + currentState: {fileID: 11400000, guid: 46e233bbb8a097e45828adee0507c870, type: 2} diff --git a/Assets/Scripts/NPC/Orc/OrcNPCController.cs b/Assets/Scripts/NPC/Orc/OrcNPCController.cs index 7fefd81..bd84e76 100644 --- a/Assets/Scripts/NPC/Orc/OrcNPCController.cs +++ b/Assets/Scripts/NPC/Orc/OrcNPCController.cs @@ -1,28 +1,147 @@ using System.Collections; -using System.Collections.Generic; using UnityEngine; +using MyCollections.AI.FinitStateMachine; +using System.Collections.Generic; +using JetBrains.Annotations; public class OrcNPCController : EnemyNPCContoller { - // Start is called before the first frame update + [SerializeField] private State currentState; + [SerializeField] private Vector2 lastDirection = Vector2.right; // Default facing right + [SerializeField] private GameObject weapon; + private Animator weaponAnimator; + + [SerializeField] private float deadTimer = 2; + [SerializeField] private float disabletimer; + [SerializeField] private AnimationClip attackClip; + + private float attackTimer; + [SerializeField] private float MaxAttackTimer; + + public Vector2 LastDirection => lastDirection; + public Animator WeaponAnimator => weaponAnimator; + public GameObject Weapon => weapon; + + public bool isAttacking; + + protected override void Awake() + { + base.Awake(); + weaponAnimator = weapon.GetComponent(); + weapon.SetActive(false); + } + protected override void Start() { base.Start(); + disabletimer = deadTimer; + MaxAttackTimer = attackClip.length; + attackTimer = MaxAttackTimer; + } + + protected override void OnEnable() + { + base.OnEnable(); + lastDirection = Vector2.right; + AgentFOV.IsEnabled = true; + MaxAttackTimer = attackClip.length; + attackTimer = MaxAttackTimer; + } + + protected override void OnDisable() + { + base.OnDisable(); + disabletimer = deadTimer; } // Update is called once per frame protected override void Update() { base.Update(); + currentState = fsm.CurrentState(); + Debug.Log("UPDATE THE ANIM CONTROLLER"); } protected override void AnimationController() { base.AnimationController(); - Debug.Log("ANIMATOR IS RUNING"); + + if (agent.agentVelocity != Vector2.zero) + { + lastDirection = agent.agentVelocity.normalized; + } + animator.SetBool("IsStopped", agent.agentStop); + animator.SetFloat("VelocityX", agent.agentVelocity.x); animator.SetFloat("VelocityY", agent.agentVelocity.y); - animator.SetFloat("LookDirection", agent.agentVelocity.normalized.magnitude); + + animator.SetFloat("LookDirectionX", lastDirection.x); + animator.SetFloat("LookDirectionY", lastDirection.y); + + animator.SetBool("IsDead", health <= 0f); + + if (animator.GetBool("IsDead")) + { + AnimatorClipInfo deadClip = animator.GetCurrentAnimatorClipInfo(0)[0]; + float wait = deadClip.clip.length; + disabletimer -= Time.deltaTime; + + if (disabletimer <= 0f) + { + gameObject.SetActive(false); + } + } + + if (weapon.activeSelf) + { + weaponAnimator.SetFloat("LookDirectionX", lastDirection.x); + weaponAnimator.SetFloat("LookDirectionY", lastDirection.y); + } + + if (isAttacking) + { + weapon.SetActive(true); + weaponAnimator.enabled = true; + animator.SetBool("IsAttacking", true); + attackTimer -= Time.deltaTime; + + if (attackTimer <= 0f) + { + weaponAnimator.enabled = false; + weapon.SetActive(false); + isAttacking = false; + attackTimer = MaxAttackTimer; + animator.SetBool("IsAttacking", false); + } + } + } + + public void OnGUI() + { + Rect rect = new Rect(0f, 0f, 300f, 200f); // Adjust size as needed + GUI.color = Color.red; + List list = new List(); + + if (currentState != null) + { + list.Add(currentState.name); + + foreach (Transition t in currentState.GetTransitions()) + { + list.Add($"Transition: {t.name}"); + } + + // Combine all strings into one string with line breaks + string combinedText = string.Join("\n", list); + + // Create a GUIStyle to modify the text appearance + GUIStyle style = new GUIStyle(GUI.skin.box); + style.fontSize = 25; // Set the font size + style.alignment = TextAnchor.MiddleCenter; // Center align the text (optional) + + // Display the combined string in the GUI.Box with the custom style + GUI.Box(rect, combinedText, style); + } } } diff --git a/Assets/Scripts/NPC/Orc/States/Chase.asset b/Assets/Scripts/NPC/Orc/States/Chase.asset index 4858dde..4814ae2 100644 --- a/Assets/Scripts/NPC/Orc/States/Chase.asset +++ b/Assets/Scripts/NPC/Orc/States/Chase.asset @@ -13,7 +13,9 @@ m_Name: Chase m_EditorClassIdentifier: entryActions: [] - transitions: [] actions: - {fileID: 11400000, guid: 592981a221a482047bb06c48da4742d4, type: 2} + transitions: + - {fileID: 11400000, guid: a6417f515e081f44390cf64d22597462, type: 2} + - {fileID: 11400000, guid: 0f5b66ca1a4db4041b99bf3d5e1386c8, type: 2} exitAction: {fileID: 0} diff --git a/Assets/Scripts/NPC/Orc/States/Dead.asset b/Assets/Scripts/NPC/Orc/States/Dead.asset new file mode 100644 index 0000000..ca26566 --- /dev/null +++ b/Assets/Scripts/NPC/Orc/States/Dead.asset @@ -0,0 +1,19 @@ +%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: 7e5d42aa554d6614e9d198b0b751cc65, type: 3} + m_Name: Dead + m_EditorClassIdentifier: + entryActions: + - {fileID: 11400000, guid: a99f4ddcf701dc948a90ba146ee514e8, type: 2} + actions: [] + transitions: [] + exitAction: {fileID: 0} diff --git a/Assets/Scripts/NPC/Orc/States/Dead.asset.meta b/Assets/Scripts/NPC/Orc/States/Dead.asset.meta new file mode 100644 index 0000000..90593a3 --- /dev/null +++ b/Assets/Scripts/NPC/Orc/States/Dead.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 3dd07641b9ae7ee418f2fb2e43d8dbf7 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/NPC/Orc/States/Idle.asset b/Assets/Scripts/NPC/Orc/States/Idle.asset index 9cc4b3b..477bafd 100644 --- a/Assets/Scripts/NPC/Orc/States/Idle.asset +++ b/Assets/Scripts/NPC/Orc/States/Idle.asset @@ -9,12 +9,16 @@ m_GameObject: {fileID: 0} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 7e5d42aa554d6614e9d198b0b751cc65, type: 3} + m_Script: {fileID: 11500000, guid: 273b030aa170a88409ce1f10660b8bc1, type: 3} m_Name: Idle m_EditorClassIdentifier: entryActions: + - {fileID: 11400000, guid: 0282369c2d7558f4983082318cc2ebdd, type: 2} + actions: - {fileID: 11400000, guid: 8c27bb2d79d5f0540bfd7faac8760886, type: 2} - actions: [] transitions: - {fileID: 11400000, guid: 8e509e9af5720ba4183642f10f0b87d9, type: 2} + - {fileID: 11400000, guid: 95787fbdc02f5694995b8ab0a8bc3363, type: 2} exitAction: {fileID: 0} + timer: -0.041249365 + generated: 1 diff --git a/Assets/Scripts/NPC/Orc/States/IdleState.cs b/Assets/Scripts/NPC/Orc/States/IdleState.cs new file mode 100644 index 0000000..0bba625 --- /dev/null +++ b/Assets/Scripts/NPC/Orc/States/IdleState.cs @@ -0,0 +1,16 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; +using MyCollections.AI.FinitStateMachine; + +[CreateAssetMenu(menuName = "Finite State Machine/CustomState/Idle")] +public class IdleState : State +{ + public float timer; + public bool generated = false; + + public override void StartState() + { + base.StartState(); + } +} diff --git a/Assets/Scripts/NPC/Orc/States/IdleState.cs.meta b/Assets/Scripts/NPC/Orc/States/IdleState.cs.meta new file mode 100644 index 0000000..e75bada --- /dev/null +++ b/Assets/Scripts/NPC/Orc/States/IdleState.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 273b030aa170a88409ce1f10660b8bc1 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/NPC/Orc/States/MeleeCombat.asset b/Assets/Scripts/NPC/Orc/States/MeleeCombat.asset new file mode 100644 index 0000000..b907529 --- /dev/null +++ b/Assets/Scripts/NPC/Orc/States/MeleeCombat.asset @@ -0,0 +1,21 @@ +%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: 7e5d42aa554d6614e9d198b0b751cc65, type: 3} + m_Name: MeleeCombat + m_EditorClassIdentifier: + entryActions: + - {fileID: 11400000, guid: c9b52c567df4ead4aa694275d5bf984e, type: 2} + actions: [] + transitions: + - {fileID: 11400000, guid: 2a53b7e3bce4bf741a47563f6f9ce607, type: 2} + - {fileID: 11400000, guid: eaa30e55b5bf2fc4fa27956e38f72671, type: 2} + exitAction: {fileID: 0} diff --git a/Assets/Scripts/NPC/Orc/States/MeleeCombat.asset.meta b/Assets/Scripts/NPC/Orc/States/MeleeCombat.asset.meta new file mode 100644 index 0000000..a801ad8 --- /dev/null +++ b/Assets/Scripts/NPC/Orc/States/MeleeCombat.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 911f5d097a56b5b4199b5eb772cc9896 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/NPC/Orc/States/Patrol.asset b/Assets/Scripts/NPC/Orc/States/Patrol.asset index 8b30d5f..9b5ca34 100644 --- a/Assets/Scripts/NPC/Orc/States/Patrol.asset +++ b/Assets/Scripts/NPC/Orc/States/Patrol.asset @@ -12,7 +12,10 @@ m_Script: {fileID: 11500000, guid: 7e5d42aa554d6614e9d198b0b751cc65, type: 3} m_Name: Patrol m_EditorClassIdentifier: - entryActions: [] - transitions: [] + entryActions: + - {fileID: 11400000, guid: ff1e99d0d8c1db5448ed47b03ebed981, type: 2} actions: [] + transitions: + - {fileID: 11400000, guid: d0dd643916f415147b8ec0ff3d03cec0, type: 2} + - {fileID: 11400000, guid: f82b901dbd4bee4478f9f27019d257b9, type: 2} exitAction: {fileID: 0} diff --git a/Assets/Scripts/NPC/Orc/Transitions/ChaseToDead.asset b/Assets/Scripts/NPC/Orc/Transitions/ChaseToDead.asset new file mode 100644 index 0000000..5aa7bab --- /dev/null +++ b/Assets/Scripts/NPC/Orc/Transitions/ChaseToDead.asset @@ -0,0 +1,17 @@ +%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: 6af03f2a2f4c7994cb57d6e4a1646605, type: 3} + m_Name: ChaseToDead + m_EditorClassIdentifier: + condition: {fileID: 11400000, guid: fb8744c3932a27e48bbbaef2add7933f, type: 2} + targetState: {fileID: 11400000, guid: 3dd07641b9ae7ee418f2fb2e43d8dbf7, type: 2} + action: {fileID: 0} diff --git a/Assets/Scripts/NPC/Orc/Transitions/ChaseToDead.asset.meta b/Assets/Scripts/NPC/Orc/Transitions/ChaseToDead.asset.meta new file mode 100644 index 0000000..4fefcf4 --- /dev/null +++ b/Assets/Scripts/NPC/Orc/Transitions/ChaseToDead.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 0f5b66ca1a4db4041b99bf3d5e1386c8 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/NPC/Orc/Transitions/ChaseToMeleeCombat.asset b/Assets/Scripts/NPC/Orc/Transitions/ChaseToMeleeCombat.asset index ceb3a4e..a092080 100644 --- a/Assets/Scripts/NPC/Orc/Transitions/ChaseToMeleeCombat.asset +++ b/Assets/Scripts/NPC/Orc/Transitions/ChaseToMeleeCombat.asset @@ -12,6 +12,6 @@ m_Script: {fileID: 11500000, guid: 6af03f2a2f4c7994cb57d6e4a1646605, type: 3} m_Name: ChaseToMeleeCombat m_EditorClassIdentifier: - condition: {fileID: 0} - targetState: {fileID: 0} + condition: {fileID: 11400000, guid: ca96130eb662f294ba0cac3df8788466, type: 2} + targetState: {fileID: 11400000, guid: 911f5d097a56b5b4199b5eb772cc9896, type: 2} action: {fileID: 0} diff --git a/Assets/Scripts/NPC/Orc/Transitions/ChaseToMeleeCombat.asset.meta b/Assets/Scripts/NPC/Orc/Transitions/ChaseToMeleeCombat.asset.meta index fe66835..b7242e2 100644 --- a/Assets/Scripts/NPC/Orc/Transitions/ChaseToMeleeCombat.asset.meta +++ b/Assets/Scripts/NPC/Orc/Transitions/ChaseToMeleeCombat.asset.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: be70e4e8d6c7b9548a6fe136492d5a63 +guid: a6417f515e081f44390cf64d22597462 NativeFormatImporter: externalObjects: {} mainObjectFileID: 11400000 diff --git a/Assets/Scripts/NPC/Orc/Transitions/IdleToPatrol.asset b/Assets/Scripts/NPC/Orc/Transitions/IdleToPatrol.asset new file mode 100644 index 0000000..0cd3644 --- /dev/null +++ b/Assets/Scripts/NPC/Orc/Transitions/IdleToPatrol.asset @@ -0,0 +1,17 @@ +%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: 6af03f2a2f4c7994cb57d6e4a1646605, type: 3} + m_Name: IdleToPatrol + m_EditorClassIdentifier: + condition: {fileID: 11400000, guid: cc798be60553ff442874fb040d9c1582, type: 2} + targetState: {fileID: 11400000, guid: 4f7f22025830a5a4285462c8b29a39a7, type: 2} + action: {fileID: 0} diff --git a/Assets/Scripts/NPC/Orc/Transitions/IdleToPatrol.asset.meta b/Assets/Scripts/NPC/Orc/Transitions/IdleToPatrol.asset.meta new file mode 100644 index 0000000..63638d5 --- /dev/null +++ b/Assets/Scripts/NPC/Orc/Transitions/IdleToPatrol.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 95787fbdc02f5694995b8ab0a8bc3363 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/NPC/Orc/Transitions/MeleeCombatToChase.asset b/Assets/Scripts/NPC/Orc/Transitions/MeleeCombatToChase.asset new file mode 100644 index 0000000..2c4a5d3 --- /dev/null +++ b/Assets/Scripts/NPC/Orc/Transitions/MeleeCombatToChase.asset @@ -0,0 +1,17 @@ +%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: 6af03f2a2f4c7994cb57d6e4a1646605, type: 3} + m_Name: MeleeCombatToChase + m_EditorClassIdentifier: + condition: {fileID: 11400000, guid: e447b6af56c40d744809722336732043, type: 2} + targetState: {fileID: 11400000, guid: 46e233bbb8a097e45828adee0507c870, type: 2} + action: {fileID: 11400000, guid: d6b405631b8b5b0459abf3ab76c405eb, type: 2} diff --git a/Assets/Scripts/NPC/Orc/Transitions/MeleeCombatToChase.asset.meta b/Assets/Scripts/NPC/Orc/Transitions/MeleeCombatToChase.asset.meta new file mode 100644 index 0000000..6a9b5ad --- /dev/null +++ b/Assets/Scripts/NPC/Orc/Transitions/MeleeCombatToChase.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 2a53b7e3bce4bf741a47563f6f9ce607 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/NPC/Orc/Transitions/MeleeCombatToDead.asset b/Assets/Scripts/NPC/Orc/Transitions/MeleeCombatToDead.asset new file mode 100644 index 0000000..32a85bd --- /dev/null +++ b/Assets/Scripts/NPC/Orc/Transitions/MeleeCombatToDead.asset @@ -0,0 +1,17 @@ +%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: 6af03f2a2f4c7994cb57d6e4a1646605, type: 3} + m_Name: MeleeCombatToDead + m_EditorClassIdentifier: + condition: {fileID: 11400000, guid: fb8744c3932a27e48bbbaef2add7933f, type: 2} + targetState: {fileID: 11400000, guid: 3dd07641b9ae7ee418f2fb2e43d8dbf7, type: 2} + action: {fileID: 11400000, guid: d6b405631b8b5b0459abf3ab76c405eb, type: 2} diff --git a/Assets/Scripts/NPC/Orc/Transitions/MeleeCombatToDead.asset.meta b/Assets/Scripts/NPC/Orc/Transitions/MeleeCombatToDead.asset.meta new file mode 100644 index 0000000..bb9f34a --- /dev/null +++ b/Assets/Scripts/NPC/Orc/Transitions/MeleeCombatToDead.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: eaa30e55b5bf2fc4fa27956e38f72671 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/NPC/Orc/Transitions/PatrolToChase.asset b/Assets/Scripts/NPC/Orc/Transitions/PatrolToChase.asset new file mode 100644 index 0000000..e52d184 --- /dev/null +++ b/Assets/Scripts/NPC/Orc/Transitions/PatrolToChase.asset @@ -0,0 +1,17 @@ +%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: 6af03f2a2f4c7994cb57d6e4a1646605, type: 3} + m_Name: PatrolToChase + m_EditorClassIdentifier: + condition: {fileID: 11400000, guid: dc955976ccd89da4895726795cafd50a, type: 2} + targetState: {fileID: 11400000, guid: 46e233bbb8a097e45828adee0507c870, type: 2} + action: {fileID: 0} diff --git a/Assets/Scripts/NPC/Orc/Transitions/PatrolToChase.asset.meta b/Assets/Scripts/NPC/Orc/Transitions/PatrolToChase.asset.meta new file mode 100644 index 0000000..46a7887 --- /dev/null +++ b/Assets/Scripts/NPC/Orc/Transitions/PatrolToChase.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: f82b901dbd4bee4478f9f27019d257b9 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/NPC/Orc/Transitions/PatrolToIdle.asset b/Assets/Scripts/NPC/Orc/Transitions/PatrolToIdle.asset new file mode 100644 index 0000000..46a1a25 --- /dev/null +++ b/Assets/Scripts/NPC/Orc/Transitions/PatrolToIdle.asset @@ -0,0 +1,17 @@ +%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: 6af03f2a2f4c7994cb57d6e4a1646605, type: 3} + m_Name: PatrolToIdle + m_EditorClassIdentifier: + condition: {fileID: 11400000, guid: 16b8f4f5dbbaa264381636c5dd17a281, type: 2} + targetState: {fileID: 11400000, guid: f544bbd18c02f304386d6f1c01fb3431, type: 2} + action: {fileID: 0} diff --git a/Assets/Scripts/NPC/Orc/Transitions/PatrolToIdle.asset.meta b/Assets/Scripts/NPC/Orc/Transitions/PatrolToIdle.asset.meta new file mode 100644 index 0000000..b5dff9c --- /dev/null +++ b/Assets/Scripts/NPC/Orc/Transitions/PatrolToIdle.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: d0dd643916f415147b8ec0ff3d03cec0 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/NPC/Pathfinding/Agent.cs b/Assets/Scripts/NPC/Pathfinding/Agent.cs index 310e231..57f669e 100644 --- a/Assets/Scripts/NPC/Pathfinding/Agent.cs +++ b/Assets/Scripts/NPC/Pathfinding/Agent.cs @@ -1,4 +1,3 @@ -using System; using System.Collections; using System.Collections.Generic; using UnityEngine; @@ -6,7 +5,6 @@ public class Agent : MonoBehaviour { - public Transform target; public float speed = 20f; public float turnSpeed = 3f; public float turnDistance = 2f; @@ -16,14 +14,23 @@ public const float pathUpdateMoveThreshold = 0.5f; private Path path; + private Vector2 targetDestination; + [SerializeField] private bool stop; [SerializeField] private Vector2 agentDestination; [SerializeField] private Vector2 moveDirection; + [SerializeField] private Vector2 velocity; [SerializeField] private float rDist; + [SerializeField] private Grid grid; + + public Vector2 TargetDestination => targetDestination; + public Path Path => path; + public Grid Grid => grid; public bool agentStop { get => stop; set => stop = value; } - public Vector2 agentVelocity => moveDirection; - public float remainingDistance => rDist; + public Vector2 agentVelocity => velocity; + + public float remainingDistance => CalculateRemainingDistance(); public Vector2 destination { @@ -33,7 +40,8 @@ private void Awake() { agentDestination = Vector2.zero; - stop = false; + velocity = Vector2.zero; + stop = agentVelocity.normalized.magnitude == 0 ? true : false; } private void Start() @@ -41,9 +49,24 @@ StartCoroutine(UpdatePath()); } - public void OnPathFound(Vector2[] waypoints, bool pathSuccessfull) + private void OnEnable() { - if (pathSuccessfull) + agentDestination = Vector2.zero; + velocity = Vector2.zero; + moveDirection = Vector2.zero; + path = null; + stop = agentVelocity.normalized.magnitude == 0 ? true : false; + StartCoroutine(UpdatePath()); + } + + private void Update() + { + rDist = CalculateRemainingDistance(); + } + + public void OnPathFound(Vector2[] waypoints, bool pathSuccessful) + { + if (pathSuccessful) { Debug.Log($"WAYPOINTS: {waypoints.Length}"); path = new Path(waypoints, transform.position, turnDistance, stoppingDistance); @@ -52,12 +75,10 @@ } } - private IEnumerator UpdatePath() { while (true) { - Debug.Log("LET ME RUN!"); if (agentDestination != Vector2.zero) { if (Time.timeSinceLevelLoad < 0.3f) @@ -86,23 +107,37 @@ } } - private void CalculatePathDistance(Vector2[] pathPoints) + private float CalculateRemainingDistance() { - Vector2 currentPoint = transform.position; - - for (int i = 1; i < pathPoints.Length; i++) + if (path == null || path.lookPoints == null || path.lookPoints.Length == 0) { - rDist = Vector2.Distance(currentPoint, pathPoints[i]); - currentPoint = pathPoints[i]; + return 0f; } + + float distance = 0f; + Vector2 currentPosition = transform.position; + + // Calculate distance from current position to the next path point + if (path.turnBoundaries.Length > 0) + { + distance = Vector2.Distance(currentPosition, path.lookPoints[path.turnBoundaries.Length - 1]); + } + + // Add distances between all remaining path points + for (int i = path.turnBoundaries.Length - 1; i < path.lookPoints.Length - 1; i++) + { + distance += Vector2.Distance(path.lookPoints[i], path.lookPoints[i + 1]); + } + + return distance; } + private IEnumerator FollowPath() { bool followingPath = true; int pathIndex = 0; - moveDirection = Vector2.zero; - + Vector2 previousPosition = transform.position; // Store the previous position float speedPercent = 1f; while (followingPath) @@ -114,6 +149,7 @@ } Vector2 position = new Vector2(transform.position.x, transform.position.y); + while (path.turnBoundaries[pathIndex].HasCrossedLine(position)) { if (pathIndex == path.finishLineIndex) @@ -122,13 +158,15 @@ break; } else + { pathIndex++; - + } } if (followingPath) { - CalculatePathDistance(path.lookPoints); + CalculateRemainingDistance(); + if (pathIndex >= path.slowDownIndex && stoppingDistance > 0) { speedPercent = Mathf.Clamp01(path.turnBoundaries[path.finishLineIndex].DistanceFromPoint(position) / stoppingDistance); @@ -140,15 +178,22 @@ } Vector2 targetDirection = (path.lookPoints[pathIndex] - position).normalized; - moveDirection = Vector2.Lerp(moveDirection, targetDirection, Time.deltaTime * turnSpeed).normalized; - position += moveDirection * speed * speedPercent * Time.deltaTime; + moveDirection = Vector2.Lerp(moveDirection, targetDirection, Time.deltaTime * turnSpeed); + // Update position + position += moveDirection * speed * speedPercent * Time.deltaTime; transform.position = new Vector3(position.x, position.y, transform.position.z); + // Calculate agent velocity + velocity = (position - previousPosition) / Time.deltaTime; // Velocity is change in position over time + previousPosition = position; // Update previous position } yield return null; } + + // If not following the path, ensure velocity is zero + velocity = Vector2.zero; } public void SetDestination(Vector2 newDestination) => agentDestination = newDestination; @@ -159,5 +204,10 @@ { path.DrawWithGizmos(); } + + // Draw a line showing the direction the object is facing + Gizmos.color = Color.red; + Vector3 direction = transform.right; // Assuming the character is facing right by default + Gizmos.DrawLine(transform.position, transform.position + direction * 2); } } diff --git a/Assets/Scripts/NPC/Pathfinding/Grid.cs b/Assets/Scripts/NPC/Pathfinding/Grid.cs index facd699..8e911ae 100644 --- a/Assets/Scripts/NPC/Pathfinding/Grid.cs +++ b/Assets/Scripts/NPC/Pathfinding/Grid.cs @@ -149,6 +149,27 @@ return neighbours; } + public Node GetRandomWalkableNode() + { + List walkableNodes = new List(); + + foreach (Node node in grid) + { + if (node.walkable) + { + walkableNodes.Add(node); + } + } + + if (walkableNodes.Count == 0) + { + return null; + } + + int randomIndex = UnityEngine.Random.Range(0, walkableNodes.Count); + return walkableNodes[randomIndex]; + } + //Grid Creation private void CreateGrid() { diff --git a/Assets/Scripts/Player/PlayerController.cs b/Assets/Scripts/Player/PlayerController.cs index 4e7598e..c2baf06 100644 --- a/Assets/Scripts/Player/PlayerController.cs +++ b/Assets/Scripts/Player/PlayerController.cs @@ -23,10 +23,13 @@ [SerializeField] private float mana = 100f; [SerializeField] private float speed = 0f; + [SerializeField] private int playerGold = 0; + [Header("Combat Settings: ")] + [SerializeField] private LayerMask enemyLayerMask; [SerializeField] private bool isAttacking = false; [SerializeField] private float attackBaseValue = 20f; - [SerializeField] private float attackRange = 1f; + [SerializeField] private float attackRange = 2f; [SerializeField] private float attackTimer = 0f; [SerializeField] private float maxAttackTimer = 1.5f; @@ -91,17 +94,20 @@ if (Input.GetMouseButtonUp(0) && isAttacking) { Vector2 origin = transform.position; - Vector2 direction = new Vector2(horizontalInput, verticalInput).normalized; + Vector2 direction = lastInput; anim.SetBool("IsAttacking", true); //Perform attack Animation - RaycastHit2D hit = Physics2D.Raycast(origin, direction, attackRange); + RaycastHit2D hit = Physics2D.Raycast(origin, direction, attackRange, enemyLayerMask); - Debug.DrawRay(origin, direction, Color.red, 1.5f); + Debug.DrawRay(origin, direction * attackRange, Color.red, 1.5f); if (hit.collider != null) { + Debug.Log($"Collider: {hit.collider}"); + if (hit.collider.TryGetComponent(out IHealthSystem healthSystem)) { + Debug.Log($"Apply Damage!"); float damage = attackBaseValue + (attackBaseValue * attackTimer); healthSystem.TakeDamage(damage); } @@ -137,6 +143,6 @@ public void TakeDamage(float ammount) => health -= ammount; public void Heal(float ammount) => health += ammount; - public float GetHealth() => health; + public float CurrentHealth() => health; public bool IsDead() => health <= 0f ? true : false; } diff --git a/Assets/Scripts/Player/PlayerLevel.cs b/Assets/Scripts/Player/PlayerLevel.cs index 708f887..d42742c 100644 --- a/Assets/Scripts/Player/PlayerLevel.cs +++ b/Assets/Scripts/Player/PlayerLevel.cs @@ -56,7 +56,7 @@ void Update() { - Debug.Log("Level: " + Level); + //Debug.Log("Level: " + Level); //Debug.Log("Attack: " + playerController.normalPlayerAttack); //Debug.Log("Strong Attack: " + playerController.strongPlayerAttack); //Debug.Log("Defense: " + playerController.defensePlayer); diff --git a/Assets/Scripts/Prefabs/Player.prefab b/Assets/Scripts/Prefabs/Player.prefab index 888d92b..2360ca8 100644 --- a/Assets/Scripts/Prefabs/Player.prefab +++ b/Assets/Scripts/Prefabs/Player.prefab @@ -1,75 +1,5 @@ %YAML 1.1 %TAG !u! tag:unity3d.com,2011: ---- !u!1 &7125823908444158659 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 7125823908444158656} - - component: {fileID: 7125823908444158657} - - component: {fileID: 7125823908444158662} - m_Layer: 0 - m_Name: AttackLeft - m_TagString: MyWeapon - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 0 ---- !u!4 &7125823908444158656 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 7125823908444158659} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_Children: [] - m_Father: {fileID: 7125823908817143917} - m_RootOrder: 3 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!61 &7125823908444158657 -BoxCollider2D: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 7125823908444158659} - m_Enabled: 1 - m_Density: 1 - m_Material: {fileID: 0} - m_IsTrigger: 1 - m_UsedByEffector: 0 - m_UsedByComposite: 0 - m_Offset: {x: -4.331889, y: 0.23542786} - m_SpriteTilingProperty: - border: {x: 0, y: 0, z: 0, w: 0} - pivot: {x: 0, y: 0} - oldSize: {x: 0, y: 0} - newSize: {x: 0, y: 0} - adaptiveTilingThreshold: 0 - drawMode: 0 - adaptiveTiling: 0 - m_AutoTiling: 0 - serializedVersion: 2 - m_Size: {x: 2.7892585, y: 7.4978323} - m_EdgeRadius: 0 ---- !u!114 &7125823908444158662 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 7125823908444158659} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: c2c6ceef6220a0a4fac5dfa14072c0cb, type: 3} - m_Name: - m_EditorClassIdentifier: --- !u!1 &7125823908817143911 GameObject: m_ObjectHideFlags: 0 @@ -81,14 +11,7 @@ - component: {fileID: 7125823908817143917} - component: {fileID: 7125823908817143916} - component: {fileID: 7125823908817143919} - - component: {fileID: 7125823908817143918} - - component: {fileID: 7125823908817143913} - component: {fileID: 7125823908817143912} - - component: {fileID: 7125823908817143915} - - component: {fileID: 7125823908817143914} - - component: {fileID: 7125823908817143909} - - component: {fileID: 7125823908817143908} - - component: {fileID: 7125823908817143920} - component: {fileID: 7125823908817143922} - component: {fileID: 7125823908817143923} m_Layer: 0 @@ -108,11 +31,7 @@ m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: -261.8, y: -101.8, z: 0} m_LocalScale: {x: 0.3270065, y: 0.3270065, z: 0.3270065} - m_Children: - - {fileID: 7125823909734813423} - - {fileID: 7125823909286263884} - - {fileID: 7125823909613540713} - - {fileID: 7125823908444158656} + m_Children: [] m_Father: {fileID: 0} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} @@ -187,34 +106,6 @@ m_HasTransformHierarchy: 1 m_AllowConstantClipSamplingOptimization: 1 m_KeepAnimatorControllerStateOnDisable: 0 ---- !u!114 &7125823908817143918 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 7125823908817143911} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: d54a42d75efe0e4498576706cd23a901, type: 3} - m_Name: - m_EditorClassIdentifier: - expBar: {fileID: 0} - exptext: {fileID: 0} ---- !u!114 &7125823908817143913 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 7125823908817143911} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 052a7562be129084da93a8d4c1580a73, type: 3} - m_Name: - m_EditorClassIdentifier: - healthBar: {fileID: 0} - hpText: {fileID: 0} --- !u!114 &7125823908817143912 MonoBehaviour: m_ObjectHideFlags: 0 @@ -233,6 +124,10 @@ health: 100 mana: 100 speed: 5 + playerGold: 0 + enemyLayerMask: + serializedVersion: 2 + m_Bits: 0 isAttacking: 0 attackBaseValue: 20 attackRange: 1 @@ -244,84 +139,6 @@ normalPlayerAttack: 10 strongPlayerAttack: 15 defensePlayer: 5 ---- !u!114 &7125823908817143915 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 7125823908817143911} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 7459d2500afe10b42b36c3b1319692b8, type: 3} - m_Name: - m_EditorClassIdentifier: - gold: 0 - goldText: {fileID: 0} - goldTextUpgrades: {fileID: 0} ---- !u!114 &7125823908817143914 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 7125823908817143911} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 73cef4819c7d9c04e833f7fa34a1777b, type: 3} - m_Name: - m_EditorClassIdentifier: - exp: 0 - maxlevel: 5 - currentmaxexp: 0 - Level: 1 - arrayPoints: 0 - maxexp: - normalattackpower: - strongattackpower: - defensepower: - BossSlimeKilled: 0 ---- !u!114 &7125823908817143909 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 7125823908817143911} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: ea89a6a57594f3d40a7b984b41053e7d, type: 3} - m_Name: - m_EditorClassIdentifier: - life: 100 - maxlife: 100 - timer: 0 - regenerationtimer: 1500 ---- !u!114 &7125823908817143908 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 7125823908817143911} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: c8ed50b42c01c564a9bf01014f8c08d3, type: 3} - m_Name: - m_EditorClassIdentifier: - levelText: {fileID: 0} ---- !u!114 &7125823908817143920 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 7125823908817143911} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 1e2bb5d1e0bb7d6459140e3db5491669, type: 3} - m_Name: - m_EditorClassIdentifier: --- !u!50 &7125823908817143922 Rigidbody2D: serializedVersion: 4 @@ -369,213 +186,3 @@ serializedVersion: 2 m_Size: {x: 3.3061156, y: 4.50177} m_EdgeRadius: 0 ---- !u!1 &7125823909286263887 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 7125823909286263884} - - component: {fileID: 7125823909286263885} - - component: {fileID: 7125823909286263890} - m_Layer: 0 - m_Name: AttackDown - m_TagString: MyWeapon - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 0 ---- !u!4 &7125823909286263884 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 7125823909286263887} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_Children: [] - m_Father: {fileID: 7125823908817143917} - m_RootOrder: 1 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!61 &7125823909286263885 -BoxCollider2D: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 7125823909286263887} - m_Enabled: 1 - m_Density: 1 - m_Material: {fileID: 0} - m_IsTrigger: 1 - m_UsedByEffector: 0 - m_UsedByComposite: 0 - m_Offset: {x: 0.35314178, y: -3.955204} - m_SpriteTilingProperty: - border: {x: 0, y: 0, z: 0, w: 0} - pivot: {x: 0, y: 0} - oldSize: {x: 0, y: 0} - newSize: {x: 0, y: 0} - adaptiveTilingThreshold: 0 - drawMode: 0 - adaptiveTiling: 0 - m_AutoTiling: 0 - serializedVersion: 2 - m_Size: {x: 5.75566, y: 2.4125729} - m_EdgeRadius: 0 ---- !u!114 &7125823909286263890 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 7125823909286263887} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: c2c6ceef6220a0a4fac5dfa14072c0cb, type: 3} - m_Name: - m_EditorClassIdentifier: ---- !u!1 &7125823909613540712 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 7125823909613540713} - - component: {fileID: 7125823909613540718} - - component: {fileID: 7125823909613540719} - m_Layer: 0 - m_Name: AttackRight - m_TagString: MyWeapon - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 0 ---- !u!4 &7125823909613540713 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 7125823909613540712} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_Children: [] - m_Father: {fileID: 7125823908817143917} - m_RootOrder: 2 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!61 &7125823909613540718 -BoxCollider2D: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 7125823909613540712} - m_Enabled: 1 - m_Density: 1 - m_Material: {fileID: 0} - m_IsTrigger: 1 - m_UsedByEffector: 0 - m_UsedByComposite: 0 - m_Offset: {x: 4.0964613, y: 0.40022945} - m_SpriteTilingProperty: - border: {x: 0, y: 0, z: 0, w: 0} - pivot: {x: 0, y: 0} - oldSize: {x: 0, y: 0} - newSize: {x: 0, y: 0} - adaptiveTilingThreshold: 0 - drawMode: 0 - adaptiveTiling: 0 - m_AutoTiling: 0 - serializedVersion: 2 - m_Size: {x: 3.260118, y: 7.4507437} - m_EdgeRadius: 0 ---- !u!114 &7125823909613540719 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 7125823909613540712} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: c2c6ceef6220a0a4fac5dfa14072c0cb, type: 3} - m_Name: - m_EditorClassIdentifier: ---- !u!1 &7125823909734813422 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 7125823909734813423} - - component: {fileID: 7125823909734813420} - - component: {fileID: 7125823909734813421} - m_Layer: 0 - m_Name: AttackUp - m_TagString: MyWeapon - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 0 ---- !u!4 &7125823909734813423 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 7125823909734813422} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_Children: [] - m_Father: {fileID: 7125823908817143917} - m_RootOrder: 0 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!61 &7125823909734813420 -BoxCollider2D: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 7125823909734813422} - m_Enabled: 1 - m_Density: 1 - m_Material: {fileID: 0} - m_IsTrigger: 1 - m_UsedByEffector: 0 - m_UsedByComposite: 0 - m_Offset: {x: 0.31165648, y: 5.3144035} - m_SpriteTilingProperty: - border: {x: 0, y: 0, z: 0, w: 0} - pivot: {x: 0, y: 0} - oldSize: {x: 0, y: 0} - newSize: {x: 0, y: 0} - adaptiveTilingThreshold: 0 - drawMode: 0 - adaptiveTiling: 0 - m_AutoTiling: 0 - serializedVersion: 2 - m_Size: {x: 6.1942625, y: 1.7597103} - m_EdgeRadius: 0 ---- !u!114 &7125823909734813421 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 7125823909734813422} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: c2c6ceef6220a0a4fac5dfa14072c0cb, type: 3} - m_Name: - m_EditorClassIdentifier: diff --git a/Assets/UI.meta b/Assets/UI.meta new file mode 100644 index 0000000..fdd62b6 --- /dev/null +++ b/Assets/UI.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 1bfde5de3be95ea4389ff50279d7cff4 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UI/Bar.meta b/Assets/UI/Bar.meta new file mode 100644 index 0000000..d190c38 --- /dev/null +++ b/Assets/UI/Bar.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 084c2c7fe754fbb4ba04e91cbbf501ed +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UI/Bar/HealthBar.mat b/Assets/UI/Bar/HealthBar.mat new file mode 100644 index 0000000..887616a --- /dev/null +++ b/Assets/UI/Bar/HealthBar.mat @@ -0,0 +1,109 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!21 &2100000 +Material: + serializedVersion: 6 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: HealthBar + m_Shader: {fileID: 10766, guid: 0000000000000000f000000000000000, type: 0} + m_ShaderKeywords: + m_LightmapFlags: 4 + m_EnableInstancingVariants: 0 + m_DoubleSidedGI: 0 + m_CustomRenderQueue: -1 + stringTagMap: {} + disabledShaderPasses: [] + m_SavedProperties: + serializedVersion: 3 + m_TexEnvs: + - _AlphaTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _BumpMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailAlbedoMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailBump: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailNormalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MainBump: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MainTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MetallicGlossMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _OcclusionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ParallaxMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + m_Ints: [] + m_Floats: + - PixelSnap: 0 + - _BumpScale: 1 + - _ColorMask: 15 + - _Cutoff: 0.5 + - _DetailNormalMapScale: 1 + - _DstBlend: 0 + - _EnableExternalAlpha: 0 + - _GlossMapScale: 1 + - _Glossiness: 0.71 + - _GlossyReflections: 1 + - _Metallic: 0 + - _Mode: 0 + - _OcclusionStrength: 1 + - _Parallax: 0.02 + - _Shininess: 0.2 + - _SmoothnessTextureChannel: 0 + - _SpecularHighlights: 1 + - _SrcBlend: 1 + - _Stencil: 0 + - _StencilComp: 8 + - _StencilOp: 0 + - _StencilReadMask: 255 + - _StencilWriteMask: 255 + - _Strength: 0.2 + - _UVSec: 0 + - _UseUIAlphaClip: 0 + - _ZWrite: 1 + m_Colors: + - _Color: {r: 1, g: 0.098039225, b: 0, a: 1} + - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} + - _Flip: {r: 1, g: 1, b: 1, a: 1} + - _RendererColor: {r: 1, g: 1, b: 1, a: 1} + - _Specular: {r: 0, g: 0, b: 0, a: 0} + m_BuildTextureStacks: [] diff --git a/Assets/UI/Bar/HealthBar.mat.meta b/Assets/UI/Bar/HealthBar.mat.meta new file mode 100644 index 0000000..dae20db --- /dev/null +++ b/Assets/UI/Bar/HealthBar.mat.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 4876394178bc15745aed2b9f001c7899 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 2100000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UI/Bar/HealthBar.png b/Assets/UI/Bar/HealthBar.png new file mode 100644 index 0000000..ca9b55d --- /dev/null +++ b/Assets/UI/Bar/HealthBar.png Binary files differ diff --git a/Assets/UI/Bar/HealthBar.png.meta b/Assets/UI/Bar/HealthBar.png.meta new file mode 100644 index 0000000..0f7ef71 --- /dev/null +++ b/Assets/UI/Bar/HealthBar.png.meta @@ -0,0 +1,96 @@ +fileFormatVersion: 2 +guid: 1cb192ea380a8c04c8bb17bcecc2b072 +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 11 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + vTOnly: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 1 + aniso: 1 + mipBias: 0 + wrapU: 1 + wrapV: 1 + wrapW: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 8 + textureShape: 1 + singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + ignorePngGamma: 0 + applyGammaDecoding: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: 5e97eb03825dee720800000000000000 + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UI/Bar/barGreen_horizontalMid.png b/Assets/UI/Bar/barGreen_horizontalMid.png new file mode 100644 index 0000000..f7b5d77 --- /dev/null +++ b/Assets/UI/Bar/barGreen_horizontalMid.png Binary files differ diff --git a/Assets/UI/Bar/barGreen_horizontalMid.png.meta b/Assets/UI/Bar/barGreen_horizontalMid.png.meta new file mode 100644 index 0000000..2281ff4 --- /dev/null +++ b/Assets/UI/Bar/barGreen_horizontalMid.png.meta @@ -0,0 +1,96 @@ +fileFormatVersion: 2 +guid: 11b05d72827a574408ee4e260da93952 +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 11 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + vTOnly: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 1 + aniso: 1 + mipBias: 0 + wrapU: 1 + wrapV: 1 + wrapW: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 8 + textureShape: 1 + singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + ignorePngGamma: 0 + applyGammaDecoding: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: 5e97eb03825dee720800000000000000 + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UI/Bar/image.png b/Assets/UI/Bar/image.png new file mode 100644 index 0000000..4128f5f --- /dev/null +++ b/Assets/UI/Bar/image.png Binary files differ diff --git a/Assets/UI/Bar/image.png.meta b/Assets/UI/Bar/image.png.meta new file mode 100644 index 0000000..8ec5ca5 --- /dev/null +++ b/Assets/UI/Bar/image.png.meta @@ -0,0 +1,96 @@ +fileFormatVersion: 2 +guid: 7a83f207a17a16f43a2e0815145df913 +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 11 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + vTOnly: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 1 + aniso: 1 + mipBias: 0 + wrapU: 1 + wrapV: 1 + wrapW: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 8 + textureShape: 1 + singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + ignorePngGamma: 0 + applyGammaDecoding: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: 5e97eb03825dee720800000000000000 + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UI/Bar/uipack_rpg_sheet.xml b/Assets/UI/Bar/uipack_rpg_sheet.xml new file mode 100644 index 0000000..09aeee4 --- /dev/null +++ b/Assets/UI/Bar/uipack_rpg_sheet.xml @@ -0,0 +1,89 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Assets/UI/Bar/uipack_rpg_sheet.xml.meta b/Assets/UI/Bar/uipack_rpg_sheet.xml.meta new file mode 100644 index 0000000..f06e566 --- /dev/null +++ b/Assets/UI/Bar/uipack_rpg_sheet.xml.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 41119aeaf5d8e3548ba66caa63a90caf +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UI/license.txt b/Assets/UI/license.txt new file mode 100644 index 0000000..56b6a72 --- /dev/null +++ b/Assets/UI/license.txt @@ -0,0 +1,14 @@ + +############################################################################### + + UI pack: RPG extension by Kenney Vleugels (www.kenney.nl) + + ------------------------------ + + License (CC0) + http://creativecommons.org/publicdomain/zero/1.0/ + + You may use these graphics in personal and commercial projects. + Credit (Kenney or www.kenney.nl) would be nice but is not mandatory. + +############################################################################### \ No newline at end of file diff --git a/Assets/UI/license.txt.meta b/Assets/UI/license.txt.meta new file mode 100644 index 0000000..837d9a0 --- /dev/null +++ b/Assets/UI/license.txt.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 637109376aa9ffd43b34513becc21733 +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UIObserver.cs b/Assets/UIObserver.cs new file mode 100644 index 0000000..f739f0c --- /dev/null +++ b/Assets/UIObserver.cs @@ -0,0 +1,44 @@ +using System.Collections; +using System.Collections.Generic; +using System.Data; +using UnityEngine; + +public class UIObserver : MonoBehaviour, IObserver +{ + + // Start is called before the first frame update + void Start() + { + NPCManager.Instance.RegisterObservers(this); + } + + // Update is called once per frame + void Update() + { + + } + + public void OnNotify(object obj) + { + EnemyNPCContoller controller = obj as EnemyNPCContoller; + + if (controller != null) + { + float fillAmount = controller.CurrentHealth() / controller.MaxHealth; + controller.HealthBarImage.fillAmount = fillAmount; + } + + else + { + Debug.LogError($"Missing or Invalid: {nameof(EnemyNPCContoller)}"); + } + } + + + public void OnDestroy() + { + NPCManager.Instance.UnregisterObserver(this); + } + + +} diff --git a/Assets/UIObserver.cs.meta b/Assets/UIObserver.cs.meta new file mode 100644 index 0000000..155abb6 --- /dev/null +++ b/Assets/UIObserver.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: cb76e5688ed6ec749896b555804212e0 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/ProjectSettings/TagManager.asset b/ProjectSettings/TagManager.asset index 05fa213..150a77d 100644 --- a/ProjectSettings/TagManager.asset +++ b/ProjectSettings/TagManager.asset @@ -31,7 +31,7 @@ - Water - UI - Player - - + - Enemy - Unwalkable - - diff --git a/UIElementsSchema/UIElements.xsd b/UIElementsSchema/UIElements.xsd new file mode 100644 index 0000000..8675373 --- /dev/null +++ b/UIElementsSchema/UIElements.xsd @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/UIElementsSchema/Unity.Cloud.Collaborate.Components.ChangeListEntries.xsd b/UIElementsSchema/Unity.Cloud.Collaborate.Components.ChangeListEntries.xsd new file mode 100644 index 0000000..92b95b8 --- /dev/null +++ b/UIElementsSchema/Unity.Cloud.Collaborate.Components.ChangeListEntries.xsd @@ -0,0 +1,109 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/UIElementsSchema/Unity.Cloud.Collaborate.Components.xsd b/UIElementsSchema/Unity.Cloud.Collaborate.Components.xsd new file mode 100644 index 0000000..7a82301 --- /dev/null +++ b/UIElementsSchema/Unity.Cloud.Collaborate.Components.xsd @@ -0,0 +1,331 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/UIElementsSchema/Unity.Cloud.Collaborate.Views.xsd b/UIElementsSchema/Unity.Cloud.Collaborate.Views.xsd new file mode 100644 index 0000000..71061f0 --- /dev/null +++ b/UIElementsSchema/Unity.Cloud.Collaborate.Views.xsd @@ -0,0 +1,67 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/UIElementsSchema/Unity.UI.Builder.xsd b/UIElementsSchema/Unity.UI.Builder.xsd new file mode 100644 index 0000000..03cc503 --- /dev/null +++ b/UIElementsSchema/Unity.UI.Builder.xsd @@ -0,0 +1,775 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/UIElementsSchema/UnityEditor.PackageManager.UI.Internal.xsd b/UIElementsSchema/UnityEditor.PackageManager.UI.Internal.xsd new file mode 100644 index 0000000..71164ad --- /dev/null +++ b/UIElementsSchema/UnityEditor.PackageManager.UI.Internal.xsd @@ -0,0 +1,412 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/UIElementsSchema/UnityEditor.U2D.Animation.xsd b/UIElementsSchema/UnityEditor.U2D.Animation.xsd new file mode 100644 index 0000000..7a5e7e6 --- /dev/null +++ b/UIElementsSchema/UnityEditor.U2D.Animation.xsd @@ -0,0 +1,380 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/UIElementsSchema/UnityEditor.U2D.Layout.xsd b/UIElementsSchema/UnityEditor.U2D.Layout.xsd new file mode 100644 index 0000000..2537a22 --- /dev/null +++ b/UIElementsSchema/UnityEditor.U2D.Layout.xsd @@ -0,0 +1,65 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/UIElementsSchema/UnityEditor.UIElements.Debugger.xsd b/UIElementsSchema/UnityEditor.UIElements.Debugger.xsd new file mode 100644 index 0000000..d01b050 --- /dev/null +++ b/UIElementsSchema/UnityEditor.UIElements.Debugger.xsd @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/UIElementsSchema/UnityEditor.UIElements.xsd b/UIElementsSchema/UnityEditor.UIElements.xsd new file mode 100644 index 0000000..82b7a92 --- /dev/null +++ b/UIElementsSchema/UnityEditor.UIElements.xsd @@ -0,0 +1,891 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/UIElementsSchema/UnityEngine.UIElements.xsd b/UIElementsSchema/UnityEngine.UIElements.xsd new file mode 100644 index 0000000..0e578df --- /dev/null +++ b/UIElementsSchema/UnityEngine.UIElements.xsd @@ -0,0 +1,817 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file