Skip to content
This repository has been archived by the owner on Mar 9, 2024. It is now read-only.

Commit

Permalink
Add Damage & KnockBack
Browse files Browse the repository at this point in the history
  • Loading branch information
Kassout committed Apr 27, 2023
1 parent 14c5ca7 commit 971805f
Show file tree
Hide file tree
Showing 34 changed files with 449 additions and 849 deletions.
12 changes: 9 additions & 3 deletions PlatformerController/Assets/Data/Weapons/SwordData.asset
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,18 @@ MonoBehaviour:
m_Name: SwordData
m_EditorClassIdentifier:
attackDetails:
- attackName: Slash Attack 1
- attackName: Left Slash
movementSpeed: 3
damageAmount: 10
- attackName: Slash Attack 2
knockBackStrength: 10
knockBackAngle: {x: 1, y: 1}
- attackName: Right Slash
movementSpeed: 4
damageAmount: 15
- attackName: Slash Attack 3
knockBackStrength: 15
knockBackAngle: {x: 1, y: 1}
- attackName: Up Slash
movementSpeed: 2
damageAmount: 20
knockBackStrength: 20
knockBackAngle: {x: 1, y: 2}
275 changes: 274 additions & 1 deletion PlatformerController/Assets/Scenes/MainScene.unity
Original file line number Diff line number Diff line change
Expand Up @@ -623,6 +623,7 @@ Transform:
m_Children:
- {fileID: 1171421165}
- {fileID: 1394428076}
- {fileID: 625480764}
m_Father: {fileID: 1973051728}
m_RootOrder: -1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
Expand Down Expand Up @@ -723,6 +724,96 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 1a8a05de0ac134f4f9d01bef6b9da077, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!1 &625480763
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 625480764}
- component: {fileID: 625480765}
- component: {fileID: 625480766}
m_Layer: 9
m_Name: Combat
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &625480764
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 625480763}
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_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 522243858}
m_RootOrder: -1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &625480765
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 625480763}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 2f8a23b857b56f6499436fc25f6427ff, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!61 &625480766
BoxCollider2D:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 625480763}
m_Enabled: 1
m_Density: 1
m_Material: {fileID: 0}
m_IncludeLayers:
serializedVersion: 2
m_Bits: 0
m_ExcludeLayers:
serializedVersion: 2
m_Bits: 0
m_LayerOverridePriority: 0
m_ForceSendLayers:
serializedVersion: 2
m_Bits: 4294967295
m_ForceReceiveLayers:
serializedVersion: 2
m_Bits: 4294967295
m_ContactCaptureLayers:
serializedVersion: 2
m_Bits: 4294967295
m_CallbackLayers:
serializedVersion: 2
m_Bits: 4294967295
m_IsTrigger: 1
m_UsedByEffector: 0
m_UsedByComposite: 0
m_Offset: {x: 0, y: -0.25}
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: 0.6, y: 1.5}
m_EdgeRadius: 0
--- !u!1 &630794300
GameObject:
m_ObjectHideFlags: 0
Expand Down Expand Up @@ -925,6 +1016,96 @@ MonoBehaviour:
respawnPoint: {fileID: 178037291}
player: {fileID: 1431556409912570048, guid: 485e82926c7b1d34196afc7d8ab19c5f, type: 3}
respawnTime: 5
--- !u!1 &1002651838
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1002651839}
- component: {fileID: 1002651840}
- component: {fileID: 1002651841}
m_Layer: 7
m_Name: Combat
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &1002651839
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1002651838}
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_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 2018358762}
m_RootOrder: -1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &1002651840
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1002651838}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 2f8a23b857b56f6499436fc25f6427ff, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!61 &1002651841
BoxCollider2D:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1002651838}
m_Enabled: 1
m_Density: 1
m_Material: {fileID: 0}
m_IncludeLayers:
serializedVersion: 2
m_Bits: 0
m_ExcludeLayers:
serializedVersion: 2
m_Bits: 0
m_LayerOverridePriority: 0
m_ForceSendLayers:
serializedVersion: 2
m_Bits: 4294967295
m_ForceReceiveLayers:
serializedVersion: 2
m_Bits: 4294967295
m_ContactCaptureLayers:
serializedVersion: 2
m_Bits: 4294967295
m_CallbackLayers:
serializedVersion: 2
m_Bits: 4294967295
m_IsTrigger: 1
m_UsedByEffector: 0
m_UsedByComposite: 0
m_Offset: {x: 0, y: -0.5}
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: 1.7, y: 1}
m_EdgeRadius: 0
--- !u!1 &1113032910
GameObject:
m_ObjectHideFlags: 0
Expand Down Expand Up @@ -956,6 +1137,7 @@ Transform:
m_Children:
- {fileID: 1368672505}
- {fileID: 256802740}
- {fileID: 1828052443}
m_Father: {fileID: 1387436680127814067}
m_RootOrder: -1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
Expand Down Expand Up @@ -51082,6 +51264,96 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 392b87496d3b34443bba1dfac83d4e81, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!1 &1828052442
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1828052443}
- component: {fileID: 1828052444}
- component: {fileID: 1828052445}
m_Layer: 7
m_Name: Combat
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &1828052443
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1828052442}
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_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 1113032911}
m_RootOrder: -1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &1828052444
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1828052442}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 2f8a23b857b56f6499436fc25f6427ff, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!61 &1828052445
BoxCollider2D:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1828052442}
m_Enabled: 1
m_Density: 1
m_Material: {fileID: 0}
m_IncludeLayers:
serializedVersion: 2
m_Bits: 0
m_ExcludeLayers:
serializedVersion: 2
m_Bits: 0
m_LayerOverridePriority: 0
m_ForceSendLayers:
serializedVersion: 2
m_Bits: 4294967295
m_ForceReceiveLayers:
serializedVersion: 2
m_Bits: 4294967295
m_ContactCaptureLayers:
serializedVersion: 2
m_Bits: 4294967295
m_CallbackLayers:
serializedVersion: 2
m_Bits: 4294967295
m_IsTrigger: 1
m_UsedByEffector: 0
m_UsedByComposite: 0
m_Offset: {x: 0, y: -0.25}
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: 0.65, y: 1.5}
m_EdgeRadius: 0
--- !u!1 &1907564702
GameObject:
m_ObjectHideFlags: 0
Expand Down Expand Up @@ -51566,6 +51838,7 @@ Transform:
m_Children:
- {fileID: 657241008}
- {fileID: 197339787}
- {fileID: 1002651839}
m_Father: {fileID: 7021417624037721779}
m_RootOrder: -1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
Expand Down Expand Up @@ -52519,7 +52792,7 @@ Transform:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1050152193434644593}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 12, y: 8, z: 0}
m_LocalPosition: {x: 0, y: -6, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children:
Expand Down
Loading

0 comments on commit 971805f

Please sign in to comment.