#25 카드시스템과 유닛 컨트롤러 연동 작업 중
Utils.LoadPrefabFromFolder() 폴더 내에서 프리팹 찾는 기능 추가
This commit is contained in:
parent
099520203e
commit
e066f0ea52
@ -53411,6 +53411,107 @@ Transform:
|
||||
- {fileID: 1816780052}
|
||||
m_Father: {fileID: 2123479144}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!1001 &184561802
|
||||
PrefabInstance:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 2
|
||||
m_Modification:
|
||||
serializedVersion: 3
|
||||
m_TransformParent: {fileID: 1017464164}
|
||||
m_Modifications:
|
||||
- target: {fileID: 4895273044672475838, guid: 2c88609e9752cd0449589fa539820435,
|
||||
type: 3}
|
||||
propertyPath: m_Name
|
||||
value: Unit
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5207057600910007092, guid: 2c88609e9752cd0449589fa539820435,
|
||||
type: 3}
|
||||
propertyPath: m_LocalPosition.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5207057600910007092, guid: 2c88609e9752cd0449589fa539820435,
|
||||
type: 3}
|
||||
propertyPath: m_LocalPosition.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5207057600910007092, guid: 2c88609e9752cd0449589fa539820435,
|
||||
type: 3}
|
||||
propertyPath: m_LocalPosition.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5207057600910007092, guid: 2c88609e9752cd0449589fa539820435,
|
||||
type: 3}
|
||||
propertyPath: m_LocalRotation.w
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5207057600910007092, guid: 2c88609e9752cd0449589fa539820435,
|
||||
type: 3}
|
||||
propertyPath: m_LocalRotation.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5207057600910007092, guid: 2c88609e9752cd0449589fa539820435,
|
||||
type: 3}
|
||||
propertyPath: m_LocalRotation.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5207057600910007092, guid: 2c88609e9752cd0449589fa539820435,
|
||||
type: 3}
|
||||
propertyPath: m_LocalRotation.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5207057600910007092, guid: 2c88609e9752cd0449589fa539820435,
|
||||
type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5207057600910007092, guid: 2c88609e9752cd0449589fa539820435,
|
||||
type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5207057600910007092, guid: 2c88609e9752cd0449589fa539820435,
|
||||
type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8302608207570708049, guid: 2c88609e9752cd0449589fa539820435,
|
||||
type: 3}
|
||||
propertyPath: unit.unitName
|
||||
value: "\uAD81\uC218\uC601\uC6C51"
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8302608207570708049, guid: 2c88609e9752cd0449589fa539820435,
|
||||
type: 3}
|
||||
propertyPath: unit.unitType
|
||||
value: 6
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8302608207570708049, guid: 2c88609e9752cd0449589fa539820435,
|
||||
type: 3}
|
||||
propertyPath: unit.soliderCount
|
||||
value: 4
|
||||
objectReference: {fileID: 0}
|
||||
m_RemovedComponents: []
|
||||
m_RemovedGameObjects: []
|
||||
m_AddedGameObjects: []
|
||||
m_AddedComponents: []
|
||||
m_SourcePrefab: {fileID: 100100000, guid: 2c88609e9752cd0449589fa539820435, type: 3}
|
||||
--- !u!4 &184561803 stripped
|
||||
Transform:
|
||||
m_CorrespondingSourceObject: {fileID: 5207057600910007092, guid: 2c88609e9752cd0449589fa539820435,
|
||||
type: 3}
|
||||
m_PrefabInstance: {fileID: 184561802}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
--- !u!114 &184561804 stripped
|
||||
MonoBehaviour:
|
||||
m_CorrespondingSourceObject: {fileID: 8302608207570708049, guid: 2c88609e9752cd0449589fa539820435,
|
||||
type: 3}
|
||||
m_PrefabInstance: {fileID: 184561802}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 8ed17fd326510c349a4daf1dac3d88cc, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
--- !u!1 &184609653
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@ -82992,7 +83093,7 @@ MonoBehaviour:
|
||||
- soldiers: 16
|
||||
rows: 4
|
||||
columns: 4
|
||||
soliderPrefabList:
|
||||
soldierPrefabList:
|
||||
- {fileID: 155132, guid: 25af9c2aefb2cd34ea733ee06ad8a534, type: 3}
|
||||
- {fileID: 155132, guid: 0ddeb76317ca897498fc825a9a9a74ce, type: 3}
|
||||
- {fileID: 155132, guid: 7e0ea87a2d94f6640aae491b196a3ec3, type: 3}
|
||||
@ -83003,6 +83104,14 @@ MonoBehaviour:
|
||||
- {fileID: 155132, guid: 8de8ad973f667e5428c46cadada4a7ae, type: 3}
|
||||
- {fileID: 155132, guid: bd84a878dca96f04298af6f38f8ed287, type: 3}
|
||||
- {fileID: 155132, guid: e9da43296777a344989154961e912c04, type: 3}
|
||||
playerUnitList:
|
||||
- {fileID: 184561804}
|
||||
- {fileID: 1547948246}
|
||||
- {fileID: 2066978726}
|
||||
- {fileID: 459640577}
|
||||
- {fileID: 506017707}
|
||||
- {fileID: 2112571291}
|
||||
- {fileID: 1393976333}
|
||||
--- !u!4 &278557066
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
@ -136412,6 +136521,107 @@ SkinnedMeshRenderer:
|
||||
m_Center: {x: -0.099886596, y: 0.020403951, z: 0.00000014901161}
|
||||
m_Extent: {x: 0.5492589, y: 0.28703, z: 0.7707151}
|
||||
m_DirtyAABB: 0
|
||||
--- !u!1001 &459640575
|
||||
PrefabInstance:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 2
|
||||
m_Modification:
|
||||
serializedVersion: 3
|
||||
m_TransformParent: {fileID: 1017464164}
|
||||
m_Modifications:
|
||||
- target: {fileID: 4895273044672475838, guid: 2c88609e9752cd0449589fa539820435,
|
||||
type: 3}
|
||||
propertyPath: m_Name
|
||||
value: Unit (3)
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5207057600910007092, guid: 2c88609e9752cd0449589fa539820435,
|
||||
type: 3}
|
||||
propertyPath: m_LocalPosition.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5207057600910007092, guid: 2c88609e9752cd0449589fa539820435,
|
||||
type: 3}
|
||||
propertyPath: m_LocalPosition.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5207057600910007092, guid: 2c88609e9752cd0449589fa539820435,
|
||||
type: 3}
|
||||
propertyPath: m_LocalPosition.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5207057600910007092, guid: 2c88609e9752cd0449589fa539820435,
|
||||
type: 3}
|
||||
propertyPath: m_LocalRotation.w
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5207057600910007092, guid: 2c88609e9752cd0449589fa539820435,
|
||||
type: 3}
|
||||
propertyPath: m_LocalRotation.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5207057600910007092, guid: 2c88609e9752cd0449589fa539820435,
|
||||
type: 3}
|
||||
propertyPath: m_LocalRotation.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5207057600910007092, guid: 2c88609e9752cd0449589fa539820435,
|
||||
type: 3}
|
||||
propertyPath: m_LocalRotation.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5207057600910007092, guid: 2c88609e9752cd0449589fa539820435,
|
||||
type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5207057600910007092, guid: 2c88609e9752cd0449589fa539820435,
|
||||
type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5207057600910007092, guid: 2c88609e9752cd0449589fa539820435,
|
||||
type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8302608207570708049, guid: 2c88609e9752cd0449589fa539820435,
|
||||
type: 3}
|
||||
propertyPath: unit.unitName
|
||||
value: "\uAD81\uC218\uC601\uC6C52"
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8302608207570708049, guid: 2c88609e9752cd0449589fa539820435,
|
||||
type: 3}
|
||||
propertyPath: unit.unitType
|
||||
value: 6
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8302608207570708049, guid: 2c88609e9752cd0449589fa539820435,
|
||||
type: 3}
|
||||
propertyPath: unit.soliderCount
|
||||
value: 6
|
||||
objectReference: {fileID: 0}
|
||||
m_RemovedComponents: []
|
||||
m_RemovedGameObjects: []
|
||||
m_AddedGameObjects: []
|
||||
m_AddedComponents: []
|
||||
m_SourcePrefab: {fileID: 100100000, guid: 2c88609e9752cd0449589fa539820435, type: 3}
|
||||
--- !u!4 &459640576 stripped
|
||||
Transform:
|
||||
m_CorrespondingSourceObject: {fileID: 5207057600910007092, guid: 2c88609e9752cd0449589fa539820435,
|
||||
type: 3}
|
||||
m_PrefabInstance: {fileID: 459640575}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
--- !u!114 &459640577 stripped
|
||||
MonoBehaviour:
|
||||
m_CorrespondingSourceObject: {fileID: 8302608207570708049, guid: 2c88609e9752cd0449589fa539820435,
|
||||
type: 3}
|
||||
m_PrefabInstance: {fileID: 459640575}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 8ed17fd326510c349a4daf1dac3d88cc, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
--- !u!1 &459666950
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@ -149216,6 +149426,107 @@ MeshFilter:
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 505972558}
|
||||
m_Mesh: {fileID: 4300898, guid: 02ded044b8e0963439276550f50be6f9, type: 3}
|
||||
--- !u!1001 &506017705
|
||||
PrefabInstance:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 2
|
||||
m_Modification:
|
||||
serializedVersion: 3
|
||||
m_TransformParent: {fileID: 1017464164}
|
||||
m_Modifications:
|
||||
- target: {fileID: 4895273044672475838, guid: 2c88609e9752cd0449589fa539820435,
|
||||
type: 3}
|
||||
propertyPath: m_Name
|
||||
value: Unit (4)
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5207057600910007092, guid: 2c88609e9752cd0449589fa539820435,
|
||||
type: 3}
|
||||
propertyPath: m_LocalPosition.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5207057600910007092, guid: 2c88609e9752cd0449589fa539820435,
|
||||
type: 3}
|
||||
propertyPath: m_LocalPosition.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5207057600910007092, guid: 2c88609e9752cd0449589fa539820435,
|
||||
type: 3}
|
||||
propertyPath: m_LocalPosition.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5207057600910007092, guid: 2c88609e9752cd0449589fa539820435,
|
||||
type: 3}
|
||||
propertyPath: m_LocalRotation.w
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5207057600910007092, guid: 2c88609e9752cd0449589fa539820435,
|
||||
type: 3}
|
||||
propertyPath: m_LocalRotation.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5207057600910007092, guid: 2c88609e9752cd0449589fa539820435,
|
||||
type: 3}
|
||||
propertyPath: m_LocalRotation.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5207057600910007092, guid: 2c88609e9752cd0449589fa539820435,
|
||||
type: 3}
|
||||
propertyPath: m_LocalRotation.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5207057600910007092, guid: 2c88609e9752cd0449589fa539820435,
|
||||
type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5207057600910007092, guid: 2c88609e9752cd0449589fa539820435,
|
||||
type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5207057600910007092, guid: 2c88609e9752cd0449589fa539820435,
|
||||
type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8302608207570708049, guid: 2c88609e9752cd0449589fa539820435,
|
||||
type: 3}
|
||||
propertyPath: unit.unitName
|
||||
value: "\uAC80\uBCD1\uC601\uC6C51"
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8302608207570708049, guid: 2c88609e9752cd0449589fa539820435,
|
||||
type: 3}
|
||||
propertyPath: unit.unitType
|
||||
value: 10
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8302608207570708049, guid: 2c88609e9752cd0449589fa539820435,
|
||||
type: 3}
|
||||
propertyPath: unit.soliderCount
|
||||
value: 9
|
||||
objectReference: {fileID: 0}
|
||||
m_RemovedComponents: []
|
||||
m_RemovedGameObjects: []
|
||||
m_AddedGameObjects: []
|
||||
m_AddedComponents: []
|
||||
m_SourcePrefab: {fileID: 100100000, guid: 2c88609e9752cd0449589fa539820435, type: 3}
|
||||
--- !u!4 &506017706 stripped
|
||||
Transform:
|
||||
m_CorrespondingSourceObject: {fileID: 5207057600910007092, guid: 2c88609e9752cd0449589fa539820435,
|
||||
type: 3}
|
||||
m_PrefabInstance: {fileID: 506017705}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
--- !u!114 &506017707 stripped
|
||||
MonoBehaviour:
|
||||
m_CorrespondingSourceObject: {fileID: 8302608207570708049, guid: 2c88609e9752cd0449589fa539820435,
|
||||
type: 3}
|
||||
m_PrefabInstance: {fileID: 506017705}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 8ed17fd326510c349a4daf1dac3d88cc, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
--- !u!1 &506044883
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@ -308514,6 +308825,44 @@ SkinnedMeshRenderer:
|
||||
m_Center: {x: -0.06498811, y: 0.020641163, z: 0.00000014901161}
|
||||
m_Extent: {x: 0.5143604, y: 0.28673673, z: 0.7707151}
|
||||
m_DirtyAABB: 0
|
||||
--- !u!1 &1017464163
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 1017464164}
|
||||
m_Layer: 0
|
||||
m_Name: PlayerUnits
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &1017464164
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1017464163}
|
||||
serializedVersion: 2
|
||||
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:
|
||||
- {fileID: 184561803}
|
||||
- {fileID: 1547948245}
|
||||
- {fileID: 2066978725}
|
||||
- {fileID: 459640576}
|
||||
- {fileID: 506017706}
|
||||
- {fileID: 2112571290}
|
||||
- {fileID: 1393976332}
|
||||
m_Father: {fileID: 0}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!1 &1018085772
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@ -419675,6 +420024,102 @@ MeshFilter:
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1393955160}
|
||||
m_Mesh: {fileID: 4300454, guid: 02ded044b8e0963439276550f50be6f9, type: 3}
|
||||
--- !u!1001 &1393976331
|
||||
PrefabInstance:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 2
|
||||
m_Modification:
|
||||
serializedVersion: 3
|
||||
m_TransformParent: {fileID: 1017464164}
|
||||
m_Modifications:
|
||||
- target: {fileID: 4895273044672475838, guid: 2c88609e9752cd0449589fa539820435,
|
||||
type: 3}
|
||||
propertyPath: m_Name
|
||||
value: Unit (6)
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5207057600910007092, guid: 2c88609e9752cd0449589fa539820435,
|
||||
type: 3}
|
||||
propertyPath: m_LocalPosition.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5207057600910007092, guid: 2c88609e9752cd0449589fa539820435,
|
||||
type: 3}
|
||||
propertyPath: m_LocalPosition.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5207057600910007092, guid: 2c88609e9752cd0449589fa539820435,
|
||||
type: 3}
|
||||
propertyPath: m_LocalPosition.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5207057600910007092, guid: 2c88609e9752cd0449589fa539820435,
|
||||
type: 3}
|
||||
propertyPath: m_LocalRotation.w
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5207057600910007092, guid: 2c88609e9752cd0449589fa539820435,
|
||||
type: 3}
|
||||
propertyPath: m_LocalRotation.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5207057600910007092, guid: 2c88609e9752cd0449589fa539820435,
|
||||
type: 3}
|
||||
propertyPath: m_LocalRotation.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5207057600910007092, guid: 2c88609e9752cd0449589fa539820435,
|
||||
type: 3}
|
||||
propertyPath: m_LocalRotation.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5207057600910007092, guid: 2c88609e9752cd0449589fa539820435,
|
||||
type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5207057600910007092, guid: 2c88609e9752cd0449589fa539820435,
|
||||
type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5207057600910007092, guid: 2c88609e9752cd0449589fa539820435,
|
||||
type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8302608207570708049, guid: 2c88609e9752cd0449589fa539820435,
|
||||
type: 3}
|
||||
propertyPath: unit.unitName
|
||||
value: "\uAC80\uBCD1\uC601\uC6C52"
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8302608207570708049, guid: 2c88609e9752cd0449589fa539820435,
|
||||
type: 3}
|
||||
propertyPath: unit.soliderCount
|
||||
value: 6
|
||||
objectReference: {fileID: 0}
|
||||
m_RemovedComponents: []
|
||||
m_RemovedGameObjects: []
|
||||
m_AddedGameObjects: []
|
||||
m_AddedComponents: []
|
||||
m_SourcePrefab: {fileID: 100100000, guid: 2c88609e9752cd0449589fa539820435, type: 3}
|
||||
--- !u!4 &1393976332 stripped
|
||||
Transform:
|
||||
m_CorrespondingSourceObject: {fileID: 5207057600910007092, guid: 2c88609e9752cd0449589fa539820435,
|
||||
type: 3}
|
||||
m_PrefabInstance: {fileID: 1393976331}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
--- !u!114 &1393976333 stripped
|
||||
MonoBehaviour:
|
||||
m_CorrespondingSourceObject: {fileID: 8302608207570708049, guid: 2c88609e9752cd0449589fa539820435,
|
||||
type: 3}
|
||||
m_PrefabInstance: {fileID: 1393976331}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 8ed17fd326510c349a4daf1dac3d88cc, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
--- !u!1 &1394526485
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@ -466354,6 +466799,107 @@ SkinnedMeshRenderer:
|
||||
m_Center: {x: -0.06498811, y: 0.020641163, z: 0.00000014901161}
|
||||
m_Extent: {x: 0.5143604, y: 0.28673673, z: 0.7707151}
|
||||
m_DirtyAABB: 0
|
||||
--- !u!1001 &1547948244
|
||||
PrefabInstance:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 2
|
||||
m_Modification:
|
||||
serializedVersion: 3
|
||||
m_TransformParent: {fileID: 1017464164}
|
||||
m_Modifications:
|
||||
- target: {fileID: 4895273044672475838, guid: 2c88609e9752cd0449589fa539820435,
|
||||
type: 3}
|
||||
propertyPath: m_Name
|
||||
value: Unit (1)
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5207057600910007092, guid: 2c88609e9752cd0449589fa539820435,
|
||||
type: 3}
|
||||
propertyPath: m_LocalPosition.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5207057600910007092, guid: 2c88609e9752cd0449589fa539820435,
|
||||
type: 3}
|
||||
propertyPath: m_LocalPosition.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5207057600910007092, guid: 2c88609e9752cd0449589fa539820435,
|
||||
type: 3}
|
||||
propertyPath: m_LocalPosition.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5207057600910007092, guid: 2c88609e9752cd0449589fa539820435,
|
||||
type: 3}
|
||||
propertyPath: m_LocalRotation.w
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5207057600910007092, guid: 2c88609e9752cd0449589fa539820435,
|
||||
type: 3}
|
||||
propertyPath: m_LocalRotation.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5207057600910007092, guid: 2c88609e9752cd0449589fa539820435,
|
||||
type: 3}
|
||||
propertyPath: m_LocalRotation.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5207057600910007092, guid: 2c88609e9752cd0449589fa539820435,
|
||||
type: 3}
|
||||
propertyPath: m_LocalRotation.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5207057600910007092, guid: 2c88609e9752cd0449589fa539820435,
|
||||
type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5207057600910007092, guid: 2c88609e9752cd0449589fa539820435,
|
||||
type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5207057600910007092, guid: 2c88609e9752cd0449589fa539820435,
|
||||
type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8302608207570708049, guid: 2c88609e9752cd0449589fa539820435,
|
||||
type: 3}
|
||||
propertyPath: unit.unitName
|
||||
value: "\uB3C4\uB07C\uC601\uC6C51"
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8302608207570708049, guid: 2c88609e9752cd0449589fa539820435,
|
||||
type: 3}
|
||||
propertyPath: unit.unitType
|
||||
value: 7
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8302608207570708049, guid: 2c88609e9752cd0449589fa539820435,
|
||||
type: 3}
|
||||
propertyPath: unit.soliderCount
|
||||
value: 6
|
||||
objectReference: {fileID: 0}
|
||||
m_RemovedComponents: []
|
||||
m_RemovedGameObjects: []
|
||||
m_AddedGameObjects: []
|
||||
m_AddedComponents: []
|
||||
m_SourcePrefab: {fileID: 100100000, guid: 2c88609e9752cd0449589fa539820435, type: 3}
|
||||
--- !u!4 &1547948245 stripped
|
||||
Transform:
|
||||
m_CorrespondingSourceObject: {fileID: 5207057600910007092, guid: 2c88609e9752cd0449589fa539820435,
|
||||
type: 3}
|
||||
m_PrefabInstance: {fileID: 1547948244}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
--- !u!114 &1547948246 stripped
|
||||
MonoBehaviour:
|
||||
m_CorrespondingSourceObject: {fileID: 8302608207570708049, guid: 2c88609e9752cd0449589fa539820435,
|
||||
type: 3}
|
||||
m_PrefabInstance: {fileID: 1547948244}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 8ed17fd326510c349a4daf1dac3d88cc, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
--- !u!1 &1548074816
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@ -618865,6 +619411,107 @@ SkinnedMeshRenderer:
|
||||
m_Center: {x: -0.06498808, y: 0.020641088, z: 0.00000014901161}
|
||||
m_Extent: {x: 0.51436037, y: 0.28673667, z: 0.7707151}
|
||||
m_DirtyAABB: 0
|
||||
--- !u!1001 &2066978724
|
||||
PrefabInstance:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 2
|
||||
m_Modification:
|
||||
serializedVersion: 3
|
||||
m_TransformParent: {fileID: 1017464164}
|
||||
m_Modifications:
|
||||
- target: {fileID: 4895273044672475838, guid: 2c88609e9752cd0449589fa539820435,
|
||||
type: 3}
|
||||
propertyPath: m_Name
|
||||
value: Unit (2)
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5207057600910007092, guid: 2c88609e9752cd0449589fa539820435,
|
||||
type: 3}
|
||||
propertyPath: m_LocalPosition.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5207057600910007092, guid: 2c88609e9752cd0449589fa539820435,
|
||||
type: 3}
|
||||
propertyPath: m_LocalPosition.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5207057600910007092, guid: 2c88609e9752cd0449589fa539820435,
|
||||
type: 3}
|
||||
propertyPath: m_LocalPosition.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5207057600910007092, guid: 2c88609e9752cd0449589fa539820435,
|
||||
type: 3}
|
||||
propertyPath: m_LocalRotation.w
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5207057600910007092, guid: 2c88609e9752cd0449589fa539820435,
|
||||
type: 3}
|
||||
propertyPath: m_LocalRotation.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5207057600910007092, guid: 2c88609e9752cd0449589fa539820435,
|
||||
type: 3}
|
||||
propertyPath: m_LocalRotation.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5207057600910007092, guid: 2c88609e9752cd0449589fa539820435,
|
||||
type: 3}
|
||||
propertyPath: m_LocalRotation.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5207057600910007092, guid: 2c88609e9752cd0449589fa539820435,
|
||||
type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5207057600910007092, guid: 2c88609e9752cd0449589fa539820435,
|
||||
type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5207057600910007092, guid: 2c88609e9752cd0449589fa539820435,
|
||||
type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8302608207570708049, guid: 2c88609e9752cd0449589fa539820435,
|
||||
type: 3}
|
||||
propertyPath: unit.unitName
|
||||
value: "\uAC80\uBC29\uC601\uC6C51"
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8302608207570708049, guid: 2c88609e9752cd0449589fa539820435,
|
||||
type: 3}
|
||||
propertyPath: unit.unitType
|
||||
value: 9
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8302608207570708049, guid: 2c88609e9752cd0449589fa539820435,
|
||||
type: 3}
|
||||
propertyPath: unit.soliderCount
|
||||
value: 3
|
||||
objectReference: {fileID: 0}
|
||||
m_RemovedComponents: []
|
||||
m_RemovedGameObjects: []
|
||||
m_AddedGameObjects: []
|
||||
m_AddedComponents: []
|
||||
m_SourcePrefab: {fileID: 100100000, guid: 2c88609e9752cd0449589fa539820435, type: 3}
|
||||
--- !u!4 &2066978725 stripped
|
||||
Transform:
|
||||
m_CorrespondingSourceObject: {fileID: 5207057600910007092, guid: 2c88609e9752cd0449589fa539820435,
|
||||
type: 3}
|
||||
m_PrefabInstance: {fileID: 2066978724}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
--- !u!114 &2066978726 stripped
|
||||
MonoBehaviour:
|
||||
m_CorrespondingSourceObject: {fileID: 8302608207570708049, guid: 2c88609e9752cd0449589fa539820435,
|
||||
type: 3}
|
||||
m_PrefabInstance: {fileID: 2066978724}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 8ed17fd326510c349a4daf1dac3d88cc, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
--- !u!1 &2067284989
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@ -631105,6 +631752,107 @@ MeshFilter:
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2112311664}
|
||||
m_Mesh: {fileID: 4300792, guid: 02ded044b8e0963439276550f50be6f9, type: 3}
|
||||
--- !u!1001 &2112571289
|
||||
PrefabInstance:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 2
|
||||
m_Modification:
|
||||
serializedVersion: 3
|
||||
m_TransformParent: {fileID: 1017464164}
|
||||
m_Modifications:
|
||||
- target: {fileID: 4895273044672475838, guid: 2c88609e9752cd0449589fa539820435,
|
||||
type: 3}
|
||||
propertyPath: m_Name
|
||||
value: Unit (5)
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5207057600910007092, guid: 2c88609e9752cd0449589fa539820435,
|
||||
type: 3}
|
||||
propertyPath: m_LocalPosition.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5207057600910007092, guid: 2c88609e9752cd0449589fa539820435,
|
||||
type: 3}
|
||||
propertyPath: m_LocalPosition.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5207057600910007092, guid: 2c88609e9752cd0449589fa539820435,
|
||||
type: 3}
|
||||
propertyPath: m_LocalPosition.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5207057600910007092, guid: 2c88609e9752cd0449589fa539820435,
|
||||
type: 3}
|
||||
propertyPath: m_LocalRotation.w
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5207057600910007092, guid: 2c88609e9752cd0449589fa539820435,
|
||||
type: 3}
|
||||
propertyPath: m_LocalRotation.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5207057600910007092, guid: 2c88609e9752cd0449589fa539820435,
|
||||
type: 3}
|
||||
propertyPath: m_LocalRotation.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5207057600910007092, guid: 2c88609e9752cd0449589fa539820435,
|
||||
type: 3}
|
||||
propertyPath: m_LocalRotation.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5207057600910007092, guid: 2c88609e9752cd0449589fa539820435,
|
||||
type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5207057600910007092, guid: 2c88609e9752cd0449589fa539820435,
|
||||
type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5207057600910007092, guid: 2c88609e9752cd0449589fa539820435,
|
||||
type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8302608207570708049, guid: 2c88609e9752cd0449589fa539820435,
|
||||
type: 3}
|
||||
propertyPath: unit.unitName
|
||||
value: "\uCC3D\uBCD1\uC601\uC6C51"
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8302608207570708049, guid: 2c88609e9752cd0449589fa539820435,
|
||||
type: 3}
|
||||
propertyPath: unit.unitType
|
||||
value: 8
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8302608207570708049, guid: 2c88609e9752cd0449589fa539820435,
|
||||
type: 3}
|
||||
propertyPath: unit.soliderCount
|
||||
value: 6
|
||||
objectReference: {fileID: 0}
|
||||
m_RemovedComponents: []
|
||||
m_RemovedGameObjects: []
|
||||
m_AddedGameObjects: []
|
||||
m_AddedComponents: []
|
||||
m_SourcePrefab: {fileID: 100100000, guid: 2c88609e9752cd0449589fa539820435, type: 3}
|
||||
--- !u!4 &2112571290 stripped
|
||||
Transform:
|
||||
m_CorrespondingSourceObject: {fileID: 5207057600910007092, guid: 2c88609e9752cd0449589fa539820435,
|
||||
type: 3}
|
||||
m_PrefabInstance: {fileID: 2112571289}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
--- !u!114 &2112571291 stripped
|
||||
MonoBehaviour:
|
||||
m_CorrespondingSourceObject: {fileID: 8302608207570708049, guid: 2c88609e9752cd0449589fa539820435,
|
||||
type: 3}
|
||||
m_PrefabInstance: {fileID: 2112571289}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 8ed17fd326510c349a4daf1dac3d88cc, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
--- !u!1 &2112658282
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@ -641619,3 +642367,4 @@ SceneRoots:
|
||||
- {fileID: 1332541640}
|
||||
- {fileID: 979588904}
|
||||
- {fileID: 1877670855}
|
||||
- {fileID: 1017464164}
|
||||
|
@ -115,34 +115,42 @@ namespace BlueWaterProject
|
||||
{
|
||||
var unitManager = FindObjectOfType<UnitManager>();
|
||||
unitManager.CreateUnit(this);
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
UnitManager.Inst.CreateUnit(this);
|
||||
}
|
||||
|
||||
UnitManager.Inst.CreateUnit(this);
|
||||
}
|
||||
|
||||
[PropertyOrder(-8)]
|
||||
[HorizontalGroup("Split", 0.5f)]
|
||||
[EnableIf("@unit.soliderCount > 0")]
|
||||
[GUIColor("GetAttackerTypeButtonColor")]
|
||||
[Button("공격 타입 자동 설정")]
|
||||
private void SetAttackerType()
|
||||
[EnableIf("CanAssignUnit")]
|
||||
[Button("유닛 배치")]
|
||||
private void SetAssignUnitInScene()
|
||||
{
|
||||
if (unit.unitType.ToString().Contains("_E"))
|
||||
if (UnitManager.Inst.CanAssignUnit(this, transform.position))
|
||||
{
|
||||
attackerType = AttackerType.DEFENSE;
|
||||
foreach (var soldier in unit.soldierList)
|
||||
{
|
||||
soldier.SetAttackerType(attackerType);
|
||||
}
|
||||
UnitManager.Inst.AssignUnit(this, transform.position);
|
||||
}
|
||||
else if (unit.unitType.ToString().Contains("_P"))
|
||||
}
|
||||
|
||||
private bool CanAssignUnit()
|
||||
{
|
||||
return UnitManager.Inst.CanAssignUnit(this, transform.position);
|
||||
}
|
||||
|
||||
[PropertyOrder(2)]
|
||||
[Button("테스트 배치")]
|
||||
public void SetAssignUnit(Vector3 assignPos)
|
||||
{
|
||||
if (UnitManager.Inst.CanAssignUnit(this, assignPos))
|
||||
{
|
||||
attackerType = AttackerType.OFFENSE;
|
||||
foreach (var soldier in unit.soldierList)
|
||||
{
|
||||
soldier.SetAttackerType(attackerType);
|
||||
}
|
||||
UnitManager.Inst.AssignUnit(this, assignPos);
|
||||
}
|
||||
else
|
||||
{
|
||||
print("병력이 땅과 맞닿아 있지 않아 배치할 수 없는 위치입니다.");
|
||||
}
|
||||
}
|
||||
|
||||
@ -237,6 +245,7 @@ namespace BlueWaterProject
|
||||
}
|
||||
private Color GetTypeAllButtonColor() => isClickedTypeAllButton ? Color.white : Color.green;
|
||||
private void OnTypeChanged() => isClickedTypeAllButton = false;
|
||||
public void SetAttackerType(AttackerType value) => attackerType = value;
|
||||
|
||||
#endregion
|
||||
}
|
||||
|
@ -1,6 +1,7 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using System.Linq;
|
||||
using Sirenix.OdinInspector;
|
||||
using UnityEngine;
|
||||
|
||||
// ReSharper disable once CheckNamespace
|
||||
@ -36,10 +37,21 @@ namespace BlueWaterProject
|
||||
[field: SerializeField] public float SoldierSpacing { get; private set; } = 0.5f;
|
||||
|
||||
[Tooltip("부대 배치 행렬")]
|
||||
[field: SerializeField] public List<UnitMatrix> UnitMatrices { get; private set; } = new(9);
|
||||
[field: SerializeField] public List<UnitMatrix> UnitMatrices { get; private set; } = new(MATRICES_CAPACITY);
|
||||
|
||||
[Tooltip("병력들의 프리팹 리스트(순서 중요)")]
|
||||
[SerializeField] private List<GameObject> soliderPrefabList = new(10);
|
||||
[SerializeField] private List<GameObject> soldierPrefabList = new(SOLDIER_PREFAB_CAPACITY);
|
||||
|
||||
[Tooltip("플레이어가 가지고 있는 부대리스트")]
|
||||
[SerializeField] private List<UnitController> playerUnitList = new(PLAYER_UNIT_CAPACITY);
|
||||
|
||||
public IReadOnlyList<UnitController> PlayerUnitList => playerUnitList;
|
||||
|
||||
private Transform playerUnits;
|
||||
|
||||
private const int MATRICES_CAPACITY = 9;
|
||||
private const int SOLDIER_PREFAB_CAPACITY = 10;
|
||||
private const int PLAYER_UNIT_CAPACITY = 50;
|
||||
|
||||
#endregion
|
||||
|
||||
@ -50,6 +62,7 @@ namespace BlueWaterProject
|
||||
base.Awake();
|
||||
GroundLayer = LayerMask.GetMask("Ground");
|
||||
InitUnitMatrices();
|
||||
InitPlayerUnitList();
|
||||
}
|
||||
|
||||
private void Reset()
|
||||
@ -57,8 +70,10 @@ namespace BlueWaterProject
|
||||
GroundLayer = LayerMask.GetMask("Ground");
|
||||
MaxGroundDistance = 0.5f;
|
||||
SoldierSpacing = 0.5f;
|
||||
soliderPrefabList = new List<GameObject>(10); // TODO : 프리팹 자동 리셋화 필요
|
||||
soldierPrefabList = new List<GameObject>(SOLDIER_PREFAB_CAPACITY); // TODO : 프리팹 자동 리셋화 필요
|
||||
InitUnitMatrices();
|
||||
InitSoldierPrefabList();
|
||||
InitPlayerUnitList();
|
||||
}
|
||||
|
||||
#endregion
|
||||
@ -68,10 +83,12 @@ namespace BlueWaterProject
|
||||
/// <summary>
|
||||
/// 부대 배치 행렬 초기화 함수
|
||||
/// </summary>
|
||||
[ContextMenu("InitUnitMatrices")]
|
||||
public void InitUnitMatrices()
|
||||
[GUIColor(0, 1, 0)]
|
||||
[ShowIf("@UnitMatrices.Count != MATRICES_CAPACITY")]
|
||||
[Button("행렬 초기화")]
|
||||
private void InitUnitMatrices()
|
||||
{
|
||||
UnitMatrices = new List<UnitMatrix>(9)
|
||||
UnitMatrices = new List<UnitMatrix>(MATRICES_CAPACITY)
|
||||
{
|
||||
new(1, 1, 1),
|
||||
new(2, 1, 2),
|
||||
@ -85,6 +102,60 @@ namespace BlueWaterProject
|
||||
};
|
||||
}
|
||||
|
||||
#if UNITY_EDITOR
|
||||
/// <summary>
|
||||
/// 프리팹 초기화 함수
|
||||
/// </summary>
|
||||
[GUIColor(0, 1, 0)]
|
||||
[ShowIf("@soldierPrefabList.Count != SOLDIER_PREFAB_CAPACITY")]
|
||||
[Button("프리팹 초기화")]
|
||||
private void InitSoldierPrefabList()
|
||||
{
|
||||
soldierPrefabList = new List<GameObject>(SOLDIER_PREFAB_CAPACITY)
|
||||
{
|
||||
Utils.LoadPrefabFromFolder("Assets/05.Prefabs/Character/Enemy", "Archer_E"),
|
||||
Utils.LoadPrefabFromFolder("Assets/05.Prefabs/Character/Enemy", "SpearKnight_E"),
|
||||
Utils.LoadPrefabFromFolder("Assets/05.Prefabs/Character/Enemy", "Spearman_E"),
|
||||
Utils.LoadPrefabFromFolder("Assets/05.Prefabs/Character/Enemy", "SwordKnight_E"),
|
||||
Utils.LoadPrefabFromFolder("Assets/05.Prefabs/Character/Enemy", "Swordman_E"),
|
||||
Utils.LoadPrefabFromFolder("Assets/05.Prefabs/Character/Pirate", "Archer_P"),
|
||||
Utils.LoadPrefabFromFolder("Assets/05.Prefabs/Character/Pirate", "Axeman_P"),
|
||||
Utils.LoadPrefabFromFolder("Assets/05.Prefabs/Character/Pirate", "Spearman_P"),
|
||||
Utils.LoadPrefabFromFolder("Assets/05.Prefabs/Character/Pirate", "SwordKnight_P"),
|
||||
Utils.LoadPrefabFromFolder("Assets/05.Prefabs/Character/Pirate", "Swordman_P")
|
||||
};
|
||||
}
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// 플레이어가 가진 유닛 리스트 초기화
|
||||
/// </summary>
|
||||
[GUIColor(0, 1, 0)]
|
||||
[Button("플레이어 유닛 가져오기")]
|
||||
private void InitPlayerUnitList()
|
||||
{
|
||||
var playerUnitsObj = GameObject.Find("PlayerUnits");
|
||||
if (playerUnitsObj)
|
||||
{
|
||||
playerUnits = playerUnitsObj.transform;
|
||||
}
|
||||
else
|
||||
{
|
||||
playerUnitsObj = new GameObject("PlayerUnits");
|
||||
playerUnitsObj.transform.SetPositionAndRotation(Vector3.zero, Quaternion.identity);
|
||||
playerUnits = playerUnitsObj.transform;
|
||||
}
|
||||
|
||||
playerUnitList = new List<UnitController>(PLAYER_UNIT_CAPACITY);
|
||||
|
||||
foreach (Transform item in playerUnits)
|
||||
{
|
||||
if (!item.gameObject.activeSelf) continue;
|
||||
|
||||
playerUnitList.Add(item.GetComponent<UnitController>());
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 부대 생성 함수
|
||||
/// </summary>
|
||||
@ -92,7 +163,7 @@ namespace BlueWaterProject
|
||||
{
|
||||
DestroyDeployedSoldiers(unitController);
|
||||
|
||||
var baseName = soliderPrefabList[(int)unitController.unit.unitType - 1].name;
|
||||
var baseName = soldierPrefabList[(int)unitController.unit.unitType - 1].name;
|
||||
|
||||
if (string.IsNullOrEmpty(unitController.unit.unitName))
|
||||
{
|
||||
@ -140,30 +211,70 @@ namespace BlueWaterProject
|
||||
|
||||
var xOffset = (column - (matrix.columns - 1) / 2.0f) * SoldierSpacing;
|
||||
var zOffset = (row - (matrix.rows - 1) / 2.0f) * SoldierSpacing;
|
||||
var spawnPosition = unitController.transform.position + new Vector3(xOffset, 0, zOffset);
|
||||
var spawnPosition = unitControllerTransform.position + new Vector3(xOffset, 0, zOffset);
|
||||
|
||||
var ray = new Ray(spawnPosition, Vector3.down);
|
||||
if (Physics.Raycast(ray, out var hit, MaxGroundDistance, GroundLayer))
|
||||
{
|
||||
spawnPosition.y = hit.point.y;
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.LogError("병력이 땅과 맞닿아 있지 않아 배치할 수 없는 위치입니다.");
|
||||
DestroyDeployedSoldiers(unitController);
|
||||
return;
|
||||
}
|
||||
|
||||
var soldierObject = Instantiate(soliderPrefabList[(int)unitController.unit.unitType - 1], spawnPosition,
|
||||
var soldierObject = Instantiate(soldierPrefabList[(int)unitController.unit.unitType - 1], spawnPosition,
|
||||
Quaternion.identity, unitController.transform).GetComponent<AiController>();
|
||||
soldierObject.transform.localRotation = Quaternion.identity;
|
||||
|
||||
var newSoldierName = $"{baseName}_{i + 1:00}";
|
||||
|
||||
soldierObject.name = newSoldierName;
|
||||
unitController.unit.soldierList.Add(soldierObject);
|
||||
soldierObject.gameObject.SetActive(false);
|
||||
}
|
||||
unitController.transform.rotation *= unitControllerRotation;
|
||||
|
||||
if (unitController.unit.unitType.ToString().Contains("_E"))
|
||||
{
|
||||
unitController.SetAttackerType(AttackerType.DEFENSE);
|
||||
foreach (var soldier in unitController.unit.soldierList)
|
||||
{
|
||||
soldier.SetAttackerType(AttackerType.DEFENSE);
|
||||
}
|
||||
}
|
||||
else if (unitController.unit.unitType.ToString().Contains("_P"))
|
||||
{
|
||||
unitController.SetAttackerType(AttackerType.OFFENSE);
|
||||
foreach (var soldier in unitController.unit.soldierList)
|
||||
{
|
||||
soldier.SetAttackerType(AttackerType.DEFENSE);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 유닛 배치 함수
|
||||
/// </summary>
|
||||
public bool CanAssignUnit(UnitController unitController, Vector3 assignPos)
|
||||
{
|
||||
if (unitController.unit.soldierList.Count <= 0) return false;
|
||||
|
||||
unitController.transform.position = assignPos;
|
||||
|
||||
for (var i = 0; i < unitController.unit.soliderCount; i++)
|
||||
{
|
||||
var soldierPos = unitController.unit.soldierList[i].transform.position;
|
||||
var ray = new Ray(soldierPos, Vector3.down);
|
||||
if (Physics.Raycast(ray, out var hit, MaxGroundDistance, GroundLayer))
|
||||
{
|
||||
soldierPos.y = hit.point.y;
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public void AssignUnit(UnitController unitController, Vector3 assignPos)
|
||||
{
|
||||
unitController.transform.position = assignPos;
|
||||
foreach (var item in unitController.unit.soldierList)
|
||||
{
|
||||
item.gameObject.SetActive(true);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -186,6 +297,21 @@ namespace BlueWaterProject
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// playerUnitList 내의 속성
|
||||
/// </summary>
|
||||
public void RemovePlayerUnitListElement(UnitController unitController)
|
||||
{
|
||||
if (playerUnitList.Contains(unitController))
|
||||
{
|
||||
playerUnitList.Remove(unitController);
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.Log("제거하려는 속성이 리스트 내에 존재하지 않습니다.");
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
@ -1,5 +1,6 @@
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
using UnityEngine.AI;
|
||||
using UnityEngine.Assertions;
|
||||
@ -112,5 +113,14 @@ namespace BlueWaterProject
|
||||
|
||||
return finalDamage;
|
||||
}
|
||||
|
||||
#if UNITY_EDITOR
|
||||
public static GameObject LoadPrefabFromFolder(string folderPath, string prefabName)
|
||||
{
|
||||
var fullPath = System.IO.Path.Combine(folderPath, prefabName + ".prefab");
|
||||
var prefab = AssetDatabase.LoadAssetAtPath<GameObject>(fullPath);
|
||||
return prefab;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
@ -1,7 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a55ee4efaad27d948ba5f03fc6d7bc80
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -1,7 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: ed9b95dc6ed6d0647ad7f1a8f305385d
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -1,7 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 4ff1f29eab234cf4490d9bb383892c44
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -1,7 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 697b6e7dea1fde146b7e3e5cf3ed9e9f
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -1,7 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 078b8f13a17171b49892ad10426d5af0
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -1,7 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f9406a33814af9c47b352e77f079d798
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -1,7 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 9aacf6f3043624194bb6f6fe9a580786
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -1,7 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f4227764308e84f89a765fbf315e2945
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -1,7 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 41e59f562b69648719f2424c438758f3
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -1,7 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: b044a2387a61dac41bdf204adffdce9d
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -1,7 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: cd287c84e887ea24a8679e67aac7c074
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -1,7 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 5f3f53ee059b45a4d9a5b9fc75e8aea9
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -1,7 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f211254f5bfad224ba88868f2c75432c
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -1,7 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 4368c9be31b3c174dbfd80f2caf98889
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -1,7 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f597f19f656ba56eae4f6a3a7cc528f4
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -1,7 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 48e08dc33330d11e9d4a1b246c52e4f6
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -1,7 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: ed09910c0094cb27be8f3ca264680da3
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -1,7 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: cc355dd4cf1e6173beaeb22c2858cbe1
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
Loading…
Reference in New Issue
Block a user