refator : Controller 스킬 버튼 로드 및 스킬 투사체 & ObjectPool 분리

This commit is contained in:
aube.lee
2025-02-11 00:26:00 +09:00
parent 3cfa9040bf
commit cdc7cbae56
12 changed files with 231 additions and 502 deletions

View File

@@ -161,6 +161,7 @@ GameObject:
- component: {fileID: 8074330830695280406}
- component: {fileID: 7221054774098027555}
- component: {fileID: 8618505599359909844}
- component: {fileID: 8968069870202076509}
m_Layer: 5
m_Name: Skill Slot
m_TagString: Untagged
@@ -228,6 +229,20 @@ MonoBehaviour:
m_FillOrigin: 0
m_UseSpriteMesh: 0
m_PixelsPerUnitMultiplier: 1
--- !u!114 &8968069870202076509
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6583065413429247215}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 19db9b1bf85c67042afc28005a6af101, type: 3}
m_Name:
m_EditorClassIdentifier:
skillImage: {fileID: 6834027631568802153}
lockerImage: {fileID: 5863612593878900192}
--- !u!1 &6834027631568802153
GameObject:
m_ObjectHideFlags: 0

View File

@@ -117,16 +117,8 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
joystick: {fileID: 7288066023221573359}
buttons:
- {fileID: 2829166192458660942}
- {fileID: 3177755080651955962}
- {fileID: 3967442941689525696}
skillButtons:
keys: 000000000100000002000000
values:
- Value: {fileID: 1708453278417668396}
- Value: {fileID: 2084944479451016088}
- Value: {fileID: 574669408038666402}
skillButtonGroup: {fileID: 2009939342780089657}
skillButtonPrefab: {fileID: 1708453278417668396}
--- !u!1 &4244698586613034378
GameObject:
m_ObjectHideFlags: 0
@@ -160,9 +152,9 @@ RectTransform:
- {fileID: 7491548976331193867}
m_Father: {fileID: 2166821633958283099}
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_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 600, y: -50}
m_SizeDelta: {x: 280, y: 100}
m_Pivot: {x: 1, y: 0.5}
--- !u!114 &33952610133029470
@@ -221,13 +213,11 @@ RectTransform:
m_ConstrainProportionsScale: 1
m_Children:
- {fileID: 7123232125577925591}
- {fileID: 7602178571154501987}
- {fileID: 8257009192460294745}
m_Father: {fileID: 2166821633958283099}
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_AnchorMin: {x: 1, y: 0}
m_AnchorMax: {x: 1, y: 0}
m_AnchoredPosition: {x: 0, y: 361.6667}
m_SizeDelta: {x: 500, y: 150}
m_Pivot: {x: 1, y: 0.5}
--- !u!114 &455422347591164938
@@ -247,9 +237,9 @@ MonoBehaviour:
m_Right: 0
m_Top: 0
m_Bottom: 0
m_ChildAlignment: 4
m_Spacing: 0
m_ChildForceExpandWidth: 1
m_ChildAlignment: 5
m_Spacing: 15
m_ChildForceExpandWidth: 0
m_ChildForceExpandHeight: 1
m_ChildControlWidth: 0
m_ChildControlHeight: 0
@@ -289,9 +279,9 @@ RectTransform:
- {fileID: 6582269636449212517}
m_Father: {fileID: 2166821633958283099}
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_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 600, y: -436.66666}
m_SizeDelta: {x: 450, y: 200}
m_Pivot: {x: 1, y: 0.5}
--- !u!114 &1902573024854622680
@@ -329,7 +319,6 @@ GameObject:
serializedVersion: 6
m_Component:
- component: {fileID: 2166821633958283099}
- component: {fileID: 8745252609621016303}
m_Layer: 5
m_Name: Button Area
m_TagString: Untagged
@@ -359,32 +348,6 @@ RectTransform:
m_AnchoredPosition: {x: -80, y: 0}
m_SizeDelta: {x: 600, y: -500}
m_Pivot: {x: 1, y: 0}
--- !u!114 &8745252609621016303
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8296493774891888372}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 59f8146938fff824cb5fd77236b75775, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Padding:
m_Left: 0
m_Right: 0
m_Top: 0
m_Bottom: 0
m_ChildAlignment: 2
m_Spacing: 0
m_ChildForceExpandWidth: 1
m_ChildForceExpandHeight: 1
m_ChildControlWidth: 0
m_ChildControlHeight: 0
m_ChildScaleWidth: 0
m_ChildScaleHeight: 0
m_ReverseArrangement: 0
--- !u!1001 &1452685402175000212
PrefabInstance:
m_ObjectHideFlags: 0
@@ -674,138 +637,6 @@ RectTransform:
m_CorrespondingSourceObject: {fileID: 7442045083355200288, guid: c4604ffc09f28ed4c8f733a3ba91d6e4, type: 3}
m_PrefabInstance: {fileID: 4332357077754258245}
m_PrefabAsset: {fileID: 0}
--- !u!1001 &4670399535607039025
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
serializedVersion: 3
m_TransformParent: {fileID: 2009939342780089657}
m_Modifications:
- target: {fileID: 3622686016877026920, guid: f023329ca96ab444ca7c60781e310d59, type: 3}
propertyPath: m_Pivot.x
value: 1
objectReference: {fileID: 0}
- target: {fileID: 3622686016877026920, guid: f023329ca96ab444ca7c60781e310d59, type: 3}
propertyPath: m_Pivot.y
value: 1
objectReference: {fileID: 0}
- target: {fileID: 3622686016877026920, guid: f023329ca96ab444ca7c60781e310d59, type: 3}
propertyPath: m_AnchorMax.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3622686016877026920, guid: f023329ca96ab444ca7c60781e310d59, type: 3}
propertyPath: m_AnchorMax.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3622686016877026920, guid: f023329ca96ab444ca7c60781e310d59, type: 3}
propertyPath: m_AnchorMin.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3622686016877026920, guid: f023329ca96ab444ca7c60781e310d59, type: 3}
propertyPath: m_AnchorMin.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3622686016877026920, guid: f023329ca96ab444ca7c60781e310d59, type: 3}
propertyPath: m_SizeDelta.x
value: 150
objectReference: {fileID: 0}
- target: {fileID: 3622686016877026920, guid: f023329ca96ab444ca7c60781e310d59, type: 3}
propertyPath: m_SizeDelta.y
value: 150
objectReference: {fileID: 0}
- target: {fileID: 3622686016877026920, guid: f023329ca96ab444ca7c60781e310d59, type: 3}
propertyPath: m_LocalPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3622686016877026920, guid: f023329ca96ab444ca7c60781e310d59, type: 3}
propertyPath: m_LocalPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3622686016877026920, guid: f023329ca96ab444ca7c60781e310d59, type: 3}
propertyPath: m_LocalPosition.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3622686016877026920, guid: f023329ca96ab444ca7c60781e310d59, type: 3}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: 3622686016877026920, guid: f023329ca96ab444ca7c60781e310d59, type: 3}
propertyPath: m_LocalRotation.x
value: -0
objectReference: {fileID: 0}
- target: {fileID: 3622686016877026920, guid: f023329ca96ab444ca7c60781e310d59, type: 3}
propertyPath: m_LocalRotation.y
value: -0
objectReference: {fileID: 0}
- target: {fileID: 3622686016877026920, guid: f023329ca96ab444ca7c60781e310d59, type: 3}
propertyPath: m_LocalRotation.z
value: -0
objectReference: {fileID: 0}
- target: {fileID: 3622686016877026920, guid: f023329ca96ab444ca7c60781e310d59, type: 3}
propertyPath: m_AnchoredPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3622686016877026920, guid: f023329ca96ab444ca7c60781e310d59, type: 3}
propertyPath: m_AnchoredPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3622686016877026920, guid: f023329ca96ab444ca7c60781e310d59, type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3622686016877026920, guid: f023329ca96ab444ca7c60781e310d59, type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3622686016877026920, guid: f023329ca96ab444ca7c60781e310d59, type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6576729596631844278, guid: f023329ca96ab444ca7c60781e310d59, type: 3}
propertyPath: m_SizeDelta.y
value: 52
objectReference: {fileID: 0}
- target: {fileID: 8426200199618059491, guid: f023329ca96ab444ca7c60781e310d59, type: 3}
propertyPath: m_Name
value: Skill Button
objectReference: {fileID: 0}
- target: {fileID: 8637807277690663409, guid: f023329ca96ab444ca7c60781e310d59, type: 3}
propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_Target
value:
objectReference: {fileID: -4577297331876422106}
m_RemovedComponents: []
m_RemovedGameObjects: []
m_AddedGameObjects: []
m_AddedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: f023329ca96ab444ca7c60781e310d59, type: 3}
--- !u!114 &574669408038666402 stripped
MonoBehaviour:
m_CorrespondingSourceObject: {fileID: 5127688379423261843, guid: f023329ca96ab444ca7c60781e310d59, type: 3}
m_PrefabInstance: {fileID: 4670399535607039025}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 35c94c75c6e511048b4a77d3682e1f85, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!114 &3967442941689525696 stripped
MonoBehaviour:
m_CorrespondingSourceObject: {fileID: 8637807277690663409, guid: f023329ca96ab444ca7c60781e310d59, type: 3}
m_PrefabInstance: {fileID: 4670399535607039025}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!224 &8257009192460294745 stripped
RectTransform:
m_CorrespondingSourceObject: {fileID: 3622686016877026920, guid: f023329ca96ab444ca7c60781e310d59, type: 3}
m_PrefabInstance: {fileID: 4670399535607039025}
m_PrefabAsset: {fileID: 0}
--- !u!1001 &4992115338521249541
PrefabInstance:
m_ObjectHideFlags: 0
@@ -977,6 +808,10 @@ PrefabInstance:
serializedVersion: 3
m_TransformParent: {fileID: 2009939342780089657}
m_Modifications:
- target: {fileID: 561526979871276618, guid: f023329ca96ab444ca7c60781e310d59, type: 3}
propertyPath: m_Material
value:
objectReference: {fileID: 0}
- target: {fileID: 3622686016877026920, guid: f023329ca96ab444ca7c60781e310d59, type: 3}
propertyPath: m_Pivot.x
value: 1
@@ -1061,6 +896,10 @@ PrefabInstance:
propertyPath: m_Name
value: Skill Button
objectReference: {fileID: 0}
- target: {fileID: 8426200199618059491, guid: f023329ca96ab444ca7c60781e310d59, type: 3}
propertyPath: m_IsActive
value: 1
objectReference: {fileID: 0}
- target: {fileID: 8637807277690663409, guid: f023329ca96ab444ca7c60781e310d59, type: 3}
propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_Target
value:
@@ -1081,150 +920,11 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 35c94c75c6e511048b4a77d3682e1f85, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!114 &2829166192458660942 stripped
MonoBehaviour:
m_CorrespondingSourceObject: {fileID: 8637807277690663409, guid: f023329ca96ab444ca7c60781e310d59, type: 3}
m_PrefabInstance: {fileID: 5808676351208836543}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!224 &7123232125577925591 stripped
RectTransform:
m_CorrespondingSourceObject: {fileID: 3622686016877026920, guid: f023329ca96ab444ca7c60781e310d59, type: 3}
m_PrefabInstance: {fileID: 5808676351208836543}
m_PrefabAsset: {fileID: 0}
--- !u!1001 &6612973776956747531
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
serializedVersion: 3
m_TransformParent: {fileID: 2009939342780089657}
m_Modifications:
- target: {fileID: 3622686016877026920, guid: f023329ca96ab444ca7c60781e310d59, type: 3}
propertyPath: m_Pivot.x
value: 1
objectReference: {fileID: 0}
- target: {fileID: 3622686016877026920, guid: f023329ca96ab444ca7c60781e310d59, type: 3}
propertyPath: m_Pivot.y
value: 1
objectReference: {fileID: 0}
- target: {fileID: 3622686016877026920, guid: f023329ca96ab444ca7c60781e310d59, type: 3}
propertyPath: m_AnchorMax.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3622686016877026920, guid: f023329ca96ab444ca7c60781e310d59, type: 3}
propertyPath: m_AnchorMax.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3622686016877026920, guid: f023329ca96ab444ca7c60781e310d59, type: 3}
propertyPath: m_AnchorMin.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3622686016877026920, guid: f023329ca96ab444ca7c60781e310d59, type: 3}
propertyPath: m_AnchorMin.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3622686016877026920, guid: f023329ca96ab444ca7c60781e310d59, type: 3}
propertyPath: m_SizeDelta.x
value: 150
objectReference: {fileID: 0}
- target: {fileID: 3622686016877026920, guid: f023329ca96ab444ca7c60781e310d59, type: 3}
propertyPath: m_SizeDelta.y
value: 150
objectReference: {fileID: 0}
- target: {fileID: 3622686016877026920, guid: f023329ca96ab444ca7c60781e310d59, type: 3}
propertyPath: m_LocalPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3622686016877026920, guid: f023329ca96ab444ca7c60781e310d59, type: 3}
propertyPath: m_LocalPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3622686016877026920, guid: f023329ca96ab444ca7c60781e310d59, type: 3}
propertyPath: m_LocalPosition.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3622686016877026920, guid: f023329ca96ab444ca7c60781e310d59, type: 3}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: 3622686016877026920, guid: f023329ca96ab444ca7c60781e310d59, type: 3}
propertyPath: m_LocalRotation.x
value: -0
objectReference: {fileID: 0}
- target: {fileID: 3622686016877026920, guid: f023329ca96ab444ca7c60781e310d59, type: 3}
propertyPath: m_LocalRotation.y
value: -0
objectReference: {fileID: 0}
- target: {fileID: 3622686016877026920, guid: f023329ca96ab444ca7c60781e310d59, type: 3}
propertyPath: m_LocalRotation.z
value: -0
objectReference: {fileID: 0}
- target: {fileID: 3622686016877026920, guid: f023329ca96ab444ca7c60781e310d59, type: 3}
propertyPath: m_AnchoredPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3622686016877026920, guid: f023329ca96ab444ca7c60781e310d59, type: 3}
propertyPath: m_AnchoredPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3622686016877026920, guid: f023329ca96ab444ca7c60781e310d59, type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3622686016877026920, guid: f023329ca96ab444ca7c60781e310d59, type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3622686016877026920, guid: f023329ca96ab444ca7c60781e310d59, type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8426200199618059491, guid: f023329ca96ab444ca7c60781e310d59, type: 3}
propertyPath: m_Name
value: Skill Button
objectReference: {fileID: 0}
- target: {fileID: 8637807277690663409, guid: f023329ca96ab444ca7c60781e310d59, type: 3}
propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_Target
value:
objectReference: {fileID: -4577297331876422106}
m_RemovedComponents: []
m_RemovedGameObjects: []
m_AddedGameObjects: []
m_AddedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: f023329ca96ab444ca7c60781e310d59, type: 3}
--- !u!114 &2084944479451016088 stripped
MonoBehaviour:
m_CorrespondingSourceObject: {fileID: 5127688379423261843, guid: f023329ca96ab444ca7c60781e310d59, type: 3}
m_PrefabInstance: {fileID: 6612973776956747531}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 35c94c75c6e511048b4a77d3682e1f85, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!114 &3177755080651955962 stripped
MonoBehaviour:
m_CorrespondingSourceObject: {fileID: 8637807277690663409, guid: f023329ca96ab444ca7c60781e310d59, type: 3}
m_PrefabInstance: {fileID: 6612973776956747531}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!224 &7602178571154501987 stripped
RectTransform:
m_CorrespondingSourceObject: {fileID: 3622686016877026920, guid: f023329ca96ab444ca7c60781e310d59, type: 3}
m_PrefabInstance: {fileID: 6612973776956747531}
m_PrefabAsset: {fileID: 0}
--- !u!1001 &7956348480403183261
PrefabInstance:
m_ObjectHideFlags: 0

View File

@@ -418,7 +418,7 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 0, y: 0.0003230538}
m_AnchoredPosition: {x: 0, y: 0.000046387704}
m_SizeDelta: {x: 555, y: 200}
m_Pivot: {x: 0, y: 1}
--- !u!1 &373368146
@@ -665,7 +665,7 @@ RectTransform:
m_Father: {fileID: 1010759826}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 20, y: 20}
m_Pivot: {x: 0.5, y: 0.5}
@@ -990,7 +990,7 @@ PrefabInstance:
objectReference: {fileID: 0}
- target: {fileID: 8074330830695280406, guid: 85ce9a177f9e26740921e0ecc2753cea, type: 3}
propertyPath: m_AnchorMax.y
value: 0
value: 1
objectReference: {fileID: 0}
- target: {fileID: 8074330830695280406, guid: 85ce9a177f9e26740921e0ecc2753cea, type: 3}
propertyPath: m_AnchorMin.x
@@ -998,7 +998,7 @@ PrefabInstance:
objectReference: {fileID: 0}
- target: {fileID: 8074330830695280406, guid: 85ce9a177f9e26740921e0ecc2753cea, type: 3}
propertyPath: m_AnchorMin.y
value: 0
value: 1
objectReference: {fileID: 0}
- target: {fileID: 8074330830695280406, guid: 85ce9a177f9e26740921e0ecc2753cea, type: 3}
propertyPath: m_SizeDelta.x
@@ -1038,11 +1038,11 @@ PrefabInstance:
objectReference: {fileID: 0}
- target: {fileID: 8074330830695280406, guid: 85ce9a177f9e26740921e0ecc2753cea, type: 3}
propertyPath: m_AnchoredPosition.x
value: 0
value: 240
objectReference: {fileID: 0}
- target: {fileID: 8074330830695280406, guid: 85ce9a177f9e26740921e0ecc2753cea, type: 3}
propertyPath: m_AnchoredPosition.y
value: 0
value: -80
objectReference: {fileID: 0}
- target: {fileID: 8074330830695280406, guid: 85ce9a177f9e26740921e0ecc2753cea, type: 3}
propertyPath: m_LocalEulerAnglesHint.x
@@ -1509,7 +1509,7 @@ PrefabInstance:
objectReference: {fileID: 0}
- target: {fileID: 8074330830695280406, guid: 85ce9a177f9e26740921e0ecc2753cea, type: 3}
propertyPath: m_AnchorMax.y
value: 0
value: 1
objectReference: {fileID: 0}
- target: {fileID: 8074330830695280406, guid: 85ce9a177f9e26740921e0ecc2753cea, type: 3}
propertyPath: m_AnchorMin.x
@@ -1517,7 +1517,7 @@ PrefabInstance:
objectReference: {fileID: 0}
- target: {fileID: 8074330830695280406, guid: 85ce9a177f9e26740921e0ecc2753cea, type: 3}
propertyPath: m_AnchorMin.y
value: 0
value: 1
objectReference: {fileID: 0}
- target: {fileID: 8074330830695280406, guid: 85ce9a177f9e26740921e0ecc2753cea, type: 3}
propertyPath: m_SizeDelta.x
@@ -1557,11 +1557,11 @@ PrefabInstance:
objectReference: {fileID: 0}
- target: {fileID: 8074330830695280406, guid: 85ce9a177f9e26740921e0ecc2753cea, type: 3}
propertyPath: m_AnchoredPosition.x
value: 0
value: 400
objectReference: {fileID: 0}
- target: {fileID: 8074330830695280406, guid: 85ce9a177f9e26740921e0ecc2753cea, type: 3}
propertyPath: m_AnchoredPosition.y
value: 0
value: -80
objectReference: {fileID: 0}
- target: {fileID: 8074330830695280406, guid: 85ce9a177f9e26740921e0ecc2753cea, type: 3}
propertyPath: m_LocalEulerAnglesHint.x
@@ -2120,7 +2120,7 @@ MonoBehaviour:
m_HandleRect: {fileID: 505319090}
m_Direction: 2
m_Value: 0
m_Size: 0.9999964
m_Size: 1
m_NumberOfSteps: 0
m_OnValueChanged:
m_PersistentCalls:
@@ -2514,7 +2514,7 @@ GameObject:
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
m_IsActive: 0
--- !u!114 &1882871573
MonoBehaviour:
m_ObjectHideFlags: 0
@@ -2785,9 +2785,9 @@ RectTransform:
m_Father: {fileID: 835921122}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_SizeDelta: {x: 3, y: 0}
m_Pivot: {x: 0, y: 1}
--- !u!114 &2053288270
MonoBehaviour:
@@ -2944,7 +2944,7 @@ PrefabInstance:
objectReference: {fileID: 0}
- target: {fileID: 8074330830695280406, guid: 85ce9a177f9e26740921e0ecc2753cea, type: 3}
propertyPath: m_AnchorMax.y
value: 0
value: 1
objectReference: {fileID: 0}
- target: {fileID: 8074330830695280406, guid: 85ce9a177f9e26740921e0ecc2753cea, type: 3}
propertyPath: m_AnchorMin.x
@@ -2952,7 +2952,7 @@ PrefabInstance:
objectReference: {fileID: 0}
- target: {fileID: 8074330830695280406, guid: 85ce9a177f9e26740921e0ecc2753cea, type: 3}
propertyPath: m_AnchorMin.y
value: 0
value: 1
objectReference: {fileID: 0}
- target: {fileID: 8074330830695280406, guid: 85ce9a177f9e26740921e0ecc2753cea, type: 3}
propertyPath: m_SizeDelta.x
@@ -2992,11 +2992,11 @@ PrefabInstance:
objectReference: {fileID: 0}
- target: {fileID: 8074330830695280406, guid: 85ce9a177f9e26740921e0ecc2753cea, type: 3}
propertyPath: m_AnchoredPosition.x
value: 0
value: 80
objectReference: {fileID: 0}
- target: {fileID: 8074330830695280406, guid: 85ce9a177f9e26740921e0ecc2753cea, type: 3}
propertyPath: m_AnchoredPosition.y
value: 0
value: -80
objectReference: {fileID: 0}
- target: {fileID: 8074330830695280406, guid: 85ce9a177f9e26740921e0ecc2753cea, type: 3}
propertyPath: m_LocalEulerAnglesHint.x

View File

@@ -48,13 +48,13 @@ namespace TON
PlayerDataManager.Singleton.SetCurrentUserData();
// HeartDataManager.Singleton.();
List<SkillData> skillDatas = SkillDataManager.Singleton.skillDatas;
SkillDataManager.Singleton.SetSkillInstances();
SkillDataManager.Singleton.Initalize();
// TODO : Custom Order After System Load
// UIManager.Show<IngameUI>(UIList.IngameUI);
// UIManager.Show<LobbyUI>(UIList.LobbyUI);
UIManager.Show<ControllerUI>(UIList.ControllerUI);
// ControllerUI.Instance.Initalize();
ControllerUI.Instance.Initalize();
// UIManager.Show<IngameOptionUI>(UIList.IngameOptionUI);
// UIManager.Show<CharaterCreateUI>(UIList.CharaterCreateUI);
// UIManager.Show<TitleUI>(UIList.TitleUI);

View File

@@ -0,0 +1,58 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
namespace TON
{
[System.Serializable]
public class Projectile : PoolAble
{
public PlayerData playerData;
public float destoryTime = 2f;
private float activatedTime = 0f; // 경과 시간 저장 변수
private DamageCalculator damageCalculator = new DamageCalculator();
private float damage;
public void Init(float damage)
{
this.damage = damage;
playerData = PlayerDataManager.Singleton.player;
}
void OnEnable()
{
activatedTime = Time.time;
}
private void Update()
{
if (Time.time - activatedTime >= destoryTime)
{
ReleaseObject();
}
}
private void OnTriggerEnter2D(Collider2D collision)
{
if (collision.CompareTag("Monster")) // 적과 충돌 시 제거
{
// 기본 데미지 계산
// TODO: 장비 공격력 반영 필요
// float damage = damageCalculator.CalculateBaseDamage(playerData.attackPower, playerData.equipmentAttack, playerData.defensivePower);
// 몬스터 방어력
float monsterDefencePower = collision.GetComponent<MonsterBase>().defencePower;
float damage = damageCalculator.CalculateBaseDamage(playerData.attackPower * this.damage, 0, monsterDefencePower);
// 치명타 적용
damage = damageCalculator.ApplyCriticalDamage(damage);
collision.GetComponent<IDamage>().ApplyDamage(damage);
ReleaseObject();
}
}
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 9407c2d7c54dec74eac0fe37da48ef1d
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -5,61 +5,20 @@ using UnityEngine;
namespace TON
{
[System.Serializable]
public class SkillBase : PoolAble
public class SkillBase
{
public float SkillCoolDown => SkillData.coolDown;
public float CurrentCoolDown { get; protected set; }
public SkillData SkillData { get; private set; }
public PlayerData playerData;
private DamageCalculator damageCalculator = new DamageCalculator();
private float elapsedTime = 0f; // 경과 시간 저장 변수
public float destoryTime = 2f;
public void Init(SkillData skillData)
public SkillBase(SkillData skillData)
{
SkillData = skillData;
playerData = PlayerDataManager.Singleton.player;
}
void OnEnable()
{
elapsedTime = 0f;
}
public void InvokeExcuteSkill()
{
InvokeRepeating(nameof(ExecuteSkill), 0f, 1f); // 즉시 실행 후 1초 간격 반복
}
void ExecuteSkill()
{
if (elapsedTime >= destoryTime)
{
CancelInvoke(nameof(ExecuteSkill)); // 반복 중지
ReleaseObject();
return;
}
Debug.Log("SkillBase:: " + SkillData.name);
UpdateSkill(Time.deltaTime);
elapsedTime += 1.0f;
}
void OnDisable()
{
CancelInvoke(nameof(ExecuteSkill)); // 오브젝트 비활성화 시 중지
CurrentCoolDown = 0f;
}
public float SkillCoolDown => SkillData.coolDown;
[field: SerializeField] public SkillData SkillData { get; private set; }
[field: SerializeField] public float CurrentCoolDown { get; protected set; }
void Update()
{
}
public System.Action OnSkillExecuted;
public event System.Action OnCooldownCompleted;
public void SetCurrentCoolDown()
{
@@ -68,30 +27,16 @@ namespace TON
public void UpdateSkill(float deltaTime)
{
float before = CurrentCoolDown;
CurrentCoolDown -= deltaTime;
CurrentCoolDown = Mathf.Max(0, CurrentCoolDown);
}
private void OnTriggerEnter2D(Collider2D collision)
{
if (collision.CompareTag("Monster")) // 적과 충돌 시 제거
if (before > 0f && CurrentCoolDown <= 0f)
{
// 기본 데미지 계산
// TODO: 장비 공격력 반영 필요
// float damage = damageCalculator.CalculateBaseDamage(playerData.attackPower, playerData.equipmentAttack, playerData.defensivePower);
// 몬스터 방어력
float monsterDefencePower = collision.GetComponent<MonsterBase>().defencePower;
float damage = damageCalculator.CalculateBaseDamage(playerData.attackPower * SkillData.damage, 0, monsterDefencePower);
// 치명타 적용
damage = damageCalculator.ApplyCriticalDamage(damage);
collision.GetComponent<IDamage>().ApplyDamage(damage);
ReleaseObject();
OnCooldownCompleted?.Invoke();
}
}
}
}

View File

@@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 9407c2d7c54dec74eac0fe37da48ef1d
guid: a10f8442459597342bf9e524b0942f34
MonoImporter:
externalObjects: {}
serializedVersion: 2

View File

@@ -1,6 +1,7 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Assertions;
namespace TON
{
@@ -9,10 +10,24 @@ namespace TON
public List<SkillData> skillDatas { get; private set; }
public SerializableDictionary<string, SkillBase> skillInstances { get; private set; }
protected override void Awake()
private List<SkillBase> equippedSkills = new List<SkillBase>();
public void Initalize()
{
base.Awake();
LoadSkillData();
SetSkillInstances();
// TODO: player skill data 초기화[셋팅]
// 예시) 1,4,5번 스킬을 EquippedSkills에 추가
}
private void Update()
{
// 씬이 인게임일때만 돌게 조건 추가 (stage 이름을 가지고 잇을대?)
foreach (var skill in equippedSkills)
{
UpdateSkillCoolDown(skill.SkillData.id);
}
}
private void LoadSkillData()
@@ -30,11 +45,10 @@ namespace TON
// skillData를 skillBase로 치환
foreach (var skillData in skillDatas)
{
skillInstances.Add(skillData.id, InitSkillData(skillData));
skillInstances.Add(skillData.id, new SkillBase(skillData));
}
}
// 스킬 슬롯에 배치할 수 있는 스킬 수 리턴하는 메소드
public int GetActiveSkillCount()
{
@@ -54,16 +68,14 @@ namespace TON
// 스킬 슬롯에 적용해야하는 스킬 리스트 리턴
public List<SkillBase> GetActiveSkillInstance()
{
List<SkillBase> filteredSkills = new List<SkillBase>();
foreach (SkillData skill in skillDatas)
{
if (skill.slotNumber == 1 || skill.slotNumber == 2 || skill.slotNumber == 3)
{
filteredSkills.Add(skillInstances.GetValueOrDefault(skill.id));
equippedSkills.Add(skillInstances.GetValueOrDefault(skill.id));
}
}
return filteredSkills;
return equippedSkills;
}
// 스킬 쿨타임 설정하는 메소드
@@ -97,46 +109,39 @@ namespace TON
}
}
// 스킬의 쿨타임 및 파괴 로직 실행 메소드
public void InvokeExcuteSkill(string skillId)
{
if (skillInstances.TryGetValue(skillId, out SkillBase skill))
{
skill.InvokeExcuteSkill();
}
}
// 스킬 발사(생성) 메소드 추가
public void ExecuteSkill(string skillId, Transform firePoint, float lastDirection)
{
// 스킬 생성
GameObject skill = ObjectPoolManager.Instance.GetEffect(skillId);
GameObject effectGameObject = ObjectPoolManager.Instance.GetEffect(skillId);
Projectile projectile = effectGameObject.GetComponent<Projectile>();
SkillBase targetSkillBase = GetSkillData(skillId);
targetSkillBase.SetCurrentCoolDown();
skill.transform.SetPositionAndRotation(firePoint.position, firePoint.rotation);
projectile.Init(targetSkillBase.SkillData.damage);
effectGameObject.transform.SetPositionAndRotation(firePoint.position, firePoint.rotation);
// 🔥 스킬 방향 반전
var bulletScale = skill.transform.localScale;
var bulletScale = effectGameObject.transform.localScale;
bulletScale.x = Mathf.Abs(bulletScale.x) * lastDirection;
skill.transform.localScale = bulletScale;
effectGameObject.transform.localScale = bulletScale;
// 스킬 이동 방향 설정
Rigidbody2D skillRb = skill.GetComponent<Rigidbody2D>();
Rigidbody2D skillRb = effectGameObject.GetComponent<Rigidbody2D>();
skillRb.velocity = new Vector2(lastDirection * 5f, 0f);
InvokeExcuteSkill(skillId);
targetSkillBase.OnSkillExecuted?.Invoke();
}
private SkillBase InitSkillData(SkillData skillData)
{
SkillBase skill = gameObject.AddComponent<SkillBase>();
skill.Init(skillData);
return skill;
}
public SkillBase GetSkillData(string skillId)
{
return skillInstances.GetValueOrDefault(skillId);
// 스킬 베이스가 null일때 방어로직 추가
SkillBase result = skillInstances.GetValueOrDefault(skillId);
Assert.IsNotNull(result, "SkillDataManager.ExecuteSkill() : targetSkillBase is null");
return result;
}
}
}

View File

@@ -15,45 +15,45 @@ namespace TON
public VariableJoystick joystick;
public CharacterBase linkedCharactor { get; set; }
public Button[] buttons; // UI 버튼 (3개)
[SerializeField]
private SerializableDictionary<int, ControllerUI_SkillButton> skillButtons;
private SerializableDictionary<string, SkillBase> skillInstances;
private List<SkillData> skillDatas;
private List<SkillBase> skillBases;
public Transform skillButtonGroup;
public ControllerUI_SkillButton skillButtonPrefab;
private List<ControllerUI_SkillButton> createdSkillButtons = new List<ControllerUI_SkillButton>();
private void Awake()
{
skillButtonPrefab.gameObject.SetActive(false);
}
public void Initalize()
{
int characterLevel = PlayerDataManager.Singleton.player.level;
skillInstances = SkillDataManager.Singleton.skillInstances;
// 내가 사용할 스킬은 스킬 매니저에서 가져오게 변경
if (skillInstances != null)
// 이미 기존에 UI가 생성되어 있다면 삭제
if (createdSkillButtons.Count > 0)
{
int skillSlotCount = SkillDataManager.Singleton.GetActiveSkillCount();
List<SkillBase> skillList = SkillDataManager.Singleton.GetActiveSkillInstance();
// 버튼 설정
for (int i = 0; i < buttons.Length; i++)
foreach (var button in createdSkillButtons)
{
if (i < skillSlotCount)
{
buttons[i].interactable = true; // 사용 가능
SkillBase skillData = skillList.Find(skill => skill.SkillData.slotNumber == i + 1);
skillButtons[i].Initalize(skillData);
}
else
{
buttons[i].interactable = false; // 사용 불가
}
Destroy(button.gameObject);
}
createdSkillButtons.Clear();
}
else
// 스킬 버튼을 생성
List<SkillBase> activatedSkills = SkillDataManager.Singleton.GetActiveSkillInstance();
for (int i = 0; i < 3; i++)
{
Debug.LogError("스킬 정보 로드 오류 발생");
ControllerUI_SkillButton newSkillButton = Instantiate(skillButtonPrefab, skillButtonGroup);
newSkillButton.gameObject.SetActive(true);
if (i < activatedSkills.Count) // 해당 인덱스에 활성화된 스킬이 있을 경우
{
newSkillButton.Initalize(activatedSkills[i]);
}
else
{
// 복제 됐을때 기본 상태가 잠금 상태
}
createdSkillButtons.Add(newSkillButton);
}
}
@@ -70,13 +70,7 @@ namespace TON
public void OnClickSkillButton(ControllerUI_SkillButton button)
{
bool skillAttack = linkedCharactor.SkillAttack(button.skillBase.SkillData.id);
// skill Attack 이 true 일때 만 쿨타임 흘러가게끔
if (skillAttack)
{
// SkillData skillData = skillDatas.Find(skill => skill.id == button.skillId);
button.SetCoolTime();
}
}
}

View File

@@ -2,6 +2,7 @@ using System.Collections;
using System.Collections.Generic;
using TMPro;
using UnityEngine;
using UnityEngine.Assertions;
using UnityEngine.UI;
namespace TON
@@ -13,51 +14,43 @@ namespace TON
[SerializeField] private GameObject skillIcon;
[SerializeField] private GameObject lockImage;
[SerializeField]
private SerializableDictionary<string, Sprite> skillSprite = new SerializableDictionary<string, Sprite>();
public float currentCoolDown;
public SkillBase skillBase;
public void Initalize(SkillBase skillData)
{
if (skillData != null)
{
skillData.OnSkillExecuted -= OnSkillExecuted;
// skillData.OnCooldownCompleted -= OnCooldownCompleted;
}
skillBase = skillData;
skillData.OnSkillExecuted += OnSkillExecuted;
// skillData.OnCooldownCompleted += OnCooldownCompleted;
skillIcon.SetActive(true);
skillIcon.GetComponent<Image>().sprite = skillSprite.GetValueOrDefault(skillBase.SkillData.id, null);
Assert.IsTrue(AssetManager.Singleton.LoadSkillIcon(skillBase.SkillData.id, out Sprite loadedSkillImage));
skillIcon.GetComponent<Image>().sprite = loadedSkillImage;
lockImage.SetActive(false);
}
public void SetCoolTime()
private void OnSkillExecuted()
{
SkillDataManager.Singleton.SetCoolTime(skillBase.SkillData.id);
if (skillBase.CurrentCoolDown <= 0)
{
// 현재 스킬의 스킬 쿨다운 값을 설정
skillBase.SetCurrentCoolDown();
currentCoolDown = skillBase.CurrentCoolDown;
UpdateCooldownUI();
}
UpdateCooldownUI();
}
private void UpdateCooldownUI()
{
coolTimeText.gameObject.SetActive(currentCoolDown > 0); // 남은 쿨타임이 있을 때만 표시
coolTimeText.text = $"{Mathf.CeilToInt(currentCoolDown)}s"; // 정수 초단위 표시
coolTimeDimd.fillAmount = currentCoolDown / skillBase.SkillData.coolDown; // 1 → 0 으로 감소
coolTimeText.gameObject.SetActive(skillBase.CurrentCoolDown > 0); // 남은 쿨타임이 있을 때만 표시
coolTimeText.text = $"{skillBase.CurrentCoolDown: 0}s"; // 정수 초단위 표시
coolTimeDimd.fillAmount = skillBase.CurrentCoolDown / skillBase.SkillCoolDown; // 1 → 0 으로 감소
}
void Update()
{
if (currentCoolDown > 0)
{
SkillDataManager.Singleton.UpdateSkillCoolDown(skillBase.SkillData.id); // 남은 쿨타임 감소
UpdateCooldownUI(); // UI 업데이트
}
else
{
}
UpdateCooldownUI(); // UI 업데이트
}
}

View File

@@ -1,13 +1,21 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
namespace TON
{
public class SkillSettingUI_SkillSlot : MonoBehaviour
{
public GameObject skillImage;
public GameObject lockerImage;
public void Initalize()
{
// 스킬 이미지 세팅하기
// skillImage = GetComponent<GameObject>();
}
public void SelectedSlot()
{
lockerImage.SetActive(true);