diff --git a/Assembly-CSharp.csproj b/Assembly-CSharp.csproj
index 3f03fe1..0d955b0 100644
--- a/Assembly-CSharp.csproj
+++ b/Assembly-CSharp.csproj
@@ -71,6 +71,7 @@
+
diff --git a/Assets/Data/BuildingData.asset b/Assets/Data/BuildingData.asset
index 884cb97..08d9b1b 100644
--- a/Assets/Data/BuildingData.asset
+++ b/Assets/Data/BuildingData.asset
@@ -12,10 +12,19 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 937e64980d44d6b46acb35b8046adf34, type: 3}
m_Name: BuildingData
m_EditorClassIdentifier: Assembly-CSharp::Northbound.BuildingData
- buildingName: BaseTower
- prefab: {fileID: 3733880183385667081, guid: 1979909431408184b9bc587877c5b4b4, type: 3}
- width: 1
- length: 1
- height: 2
+ buildingName: Wall
+ prefab: {fileID: 2938167817760513538, guid: 04e95700704d92248b63ce5674bd9638, type: 3}
+ width: 16
+ length: 4
+ height: 4
placementOffset: {x: 0, y: 0, z: 0}
allowRotation: 1
+ requiredWorkAmount: 100
+ workPerInteraction: 10
+ interactionCooldown: 1
+ maxHealth: 100
+ isIndestructible: 0
+ autoRegenerate: 0
+ regenPerSecond: 1
+ providesVision: 1
+ visionRange: 15
diff --git a/Assets/DefaultNetworkPrefabs.asset b/Assets/DefaultNetworkPrefabs.asset
index c94e3c0..05c6dec 100644
--- a/Assets/DefaultNetworkPrefabs.asset
+++ b/Assets/DefaultNetworkPrefabs.asset
@@ -54,3 +54,8 @@ MonoBehaviour:
SourcePrefabToOverride: {fileID: 0}
SourceHashToOverride: 0
OverridingTargetPrefab: {fileID: 0}
+ - Override: 0
+ Prefab: {fileID: 1340458267086560577, guid: d20c3ce6a3c39154aa033d0f61bd9a4d, type: 3}
+ SourcePrefabToOverride: {fileID: 0}
+ SourceHashToOverride: 0
+ OverridingTargetPrefab: {fileID: 0}
diff --git a/Assets/Materials/flatkit skeleton.mat b/Assets/Materials/flatkit skeleton.mat
new file mode 100644
index 0000000..c631ace
--- /dev/null
+++ b/Assets/Materials/flatkit skeleton.mat
@@ -0,0 +1,211 @@
+%YAML 1.1
+%TAG !u! tag:unity3d.com,2011:
+--- !u!21 &2100000
+Material:
+ serializedVersion: 8
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_Name: flatkit skeleton
+ m_Shader: {fileID: 4800000, guid: bee44b4a58655ee4cbff107302a3e131, type: 3}
+ m_Parent: {fileID: 0}
+ m_ModifiedSerializedProperties: 0
+ m_ValidKeywords:
+ - _CELPRIMARYMODE_SINGLE
+ - _DETAILMAPBLENDINGMODE_MULTIPLY
+ - _GRADIENTSPACE_WORLD
+ - _OUTLINESPACE_SCREEN
+ - _TEXTUREBLENDINGMODE_MULTIPLY
+ m_InvalidKeywords:
+ - _UNITYSHADOWMODE_NONE
+ m_LightmapFlags: 4
+ m_EnableInstancingVariants: 0
+ m_DoubleSidedGI: 0
+ m_CustomRenderQueue: -1
+ stringTagMap: {}
+ disabledShaderPasses:
+ - MOTIONVECTORS
+ m_LockedProperties:
+ m_SavedProperties:
+ serializedVersion: 3
+ m_TexEnvs:
+ - _BaseMap:
+ m_Texture: {fileID: 2800000, guid: 086eaf26cd45fdf409d47100c54bf1d4, type: 3}
+ 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}
+ - _CelCurveTexture:
+ m_Texture: {fileID: 0}
+ m_Scale: {x: 1, y: 1}
+ m_Offset: {x: 0, y: 0}
+ - _CelStepTexture:
+ 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}
+ - _DetailMap:
+ 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}
+ - _EmissionMap:
+ m_Texture: {fileID: 0}
+ m_Scale: {x: 1, y: 1}
+ m_Offset: {x: 0, y: 0}
+ - _MainTex:
+ m_Texture: {fileID: 2800000, guid: 086eaf26cd45fdf409d47100c54bf1d4, type: 3}
+ 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}
+ - _SpecGlossMap:
+ m_Texture: {fileID: 0}
+ m_Scale: {x: 1, y: 1}
+ m_Offset: {x: 0, y: 0}
+ - unity_Lightmaps:
+ m_Texture: {fileID: 0}
+ m_Scale: {x: 1, y: 1}
+ m_Offset: {x: 0, y: 0}
+ - unity_LightmapsInd:
+ m_Texture: {fileID: 0}
+ m_Scale: {x: 1, y: 1}
+ m_Offset: {x: 0, y: 0}
+ - unity_ShadowMasks:
+ m_Texture: {fileID: 0}
+ m_Scale: {x: 1, y: 1}
+ m_Offset: {x: 0, y: 0}
+ m_Ints: []
+ m_Floats:
+ - _AddPrecomputedVelocity: 0
+ - _AlphaClip: 0
+ - _AlphaToMask: 0
+ - _BaseMapPremultiply: 0
+ - _Blend: 0
+ - _BlendModePreserveSpecular: 1
+ - _BumpScale: 1
+ - _CameraDistanceImpact: 0
+ - _CelExtraEnabled: 0
+ - _CelNumSteps: 3
+ - _CelPrimaryMode: 1
+ - _ClearCoatMask: 0
+ - _ClearCoatSmoothness: 0
+ - _Cull: 2
+ - _Cutoff: 0.5
+ - _DetailAlbedoMapScale: 1
+ - _DetailMapBlendingMode: 0
+ - _DetailMapImpact: 0
+ - _DetailNormalMapScale: 1
+ - _DstBlend: 0
+ - _DstBlendAlpha: 0
+ - _EnvironmentReflections: 1
+ - _FlatRimEdgeSmoothness: 0.5
+ - _FlatRimLightAlign: 0
+ - _FlatRimSize: 0.5
+ - _FlatSpecularEdgeSmoothness: 0
+ - _FlatSpecularSize: 0.1
+ - _Flatness: 1
+ - _FlatnessExtra: 1
+ - _GlossMapScale: 1
+ - _Glossiness: 0.5
+ - _GlossyReflections: 1
+ - _GradientAngle: 0
+ - _GradientCenterX: 0
+ - _GradientCenterY: 0
+ - _GradientEnabled: 0
+ - _GradientSize: 10
+ - _GradientSpace: 0
+ - _LightContribution: 0
+ - _LightFalloffSize: 0
+ - _LightmapDirectionPitch: 0
+ - _LightmapDirectionYaw: 0
+ - _Metallic: 0
+ - _Mode: 0
+ - _OcclusionStrength: 1
+ - _OutlineDepthOffset: 0
+ - _OutlineEnabled: 0
+ - _OutlineScale: 1
+ - _OutlineSpace: 0
+ - _OutlineWidth: 1
+ - _OverrideLightmapDir: 0
+ - _Parallax: 0.02
+ - _QueueOffset: 0
+ - _ReceiveShadows: 1
+ - _RimEnabled: 0
+ - _SelfShadingSize: 0.5
+ - _SelfShadingSizeExtra: 0.6
+ - _ShadowEdgeSize: 0.05
+ - _ShadowEdgeSizeExtra: 0.05
+ - _Smoothness: 0.5
+ - _SmoothnessTextureChannel: 0
+ - _SpecularEnabled: 0
+ - _SpecularHighlights: 1
+ - _SrcBlend: 1
+ - _SrcBlendAlpha: 1
+ - _Surface: 0
+ - _TextureBlendingMode: 0
+ - _TextureImpact: 1
+ - _UVSec: 0
+ - _UnityShadowMode: 0
+ - _UnityShadowOcclusion: 0
+ - _UnityShadowPower: 0.2
+ - _UnityShadowSharpness: 1
+ - _VertexColorsEnabled: 0
+ - _VertexExtrusionSmoothNormals: 0
+ - _WorkflowMode: 1
+ - _XRMotionVectorsPass: 1
+ - _ZWrite: 1
+ m_Colors:
+ - _BaseColor: {r: 1, g: 1, b: 1, a: 1}
+ - _Color: {r: 1, g: 1, b: 1, a: 1}
+ - _ColorDim: {r: 0.39215687, g: 0, b: 0, a: 1}
+ - _ColorDimCurve: {r: 0.85023, g: 0.85034, b: 0.8504499, a: 0.85056}
+ - _ColorDimExtra: {r: 0.85023, g: 0.85034, b: 0.8504499, a: 0.85056}
+ - _ColorDimSteps: {r: 0.85023, g: 0.85034, b: 0.8504499, a: 0.85056}
+ - _ColorGradient: {r: 0.85023, g: 0.85034, b: 0.85045, a: 0.85056}
+ - _DetailMapColor: {r: 1, g: 1, b: 1, a: 1}
+ - _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
+ - _FlatRimColor: {r: 0.85023, g: 0.85034, b: 0.85045, a: 0.85056}
+ - _FlatSpecularColor: {r: 0.85023, g: 0.85034, b: 0.85045, a: 0.85056}
+ - _LightmapDirection: {r: 0, g: 1, b: 0, a: 0}
+ - _OutlineColor: {r: 1, g: 1, b: 1, a: 1}
+ - _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1}
+ - _UnityShadowColor: {r: 0.85023, g: 0.85034, b: 0.8504499, a: 0.85056}
+ m_BuildTextureStacks: []
+ m_AllowLocking: 1
+--- !u!114 &7018793274487416367
+MonoBehaviour:
+ m_ObjectHideFlags: 11
+ 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: d0353a89b1f911e48b9e16bdc9f2e058, type: 3}
+ m_Name:
+ m_EditorClassIdentifier: Unity.RenderPipelines.Universal.Editor::UnityEditor.Rendering.Universal.AssetVersion
+ version: 10
diff --git a/Assets/Materials/flatkit skeleton.mat.meta b/Assets/Materials/flatkit skeleton.mat.meta
new file mode 100644
index 0000000..65cd3b1
--- /dev/null
+++ b/Assets/Materials/flatkit skeleton.mat.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: fe22e32eacc91c848ae7a9b9b43e6629
+NativeFormatImporter:
+ externalObjects: {}
+ mainObjectFileID: 2100000
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Prefabs/BuildingFoundation.prefab b/Assets/Prefabs/BuildingFoundation.prefab
new file mode 100644
index 0000000..4e6ea6c
--- /dev/null
+++ b/Assets/Prefabs/BuildingFoundation.prefab
@@ -0,0 +1,150 @@
+%YAML 1.1
+%TAG !u! tag:unity3d.com,2011:
+--- !u!1 &1340458267086560577
+GameObject:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ serializedVersion: 6
+ m_Component:
+ - component: {fileID: 320439620877427584}
+ - component: {fileID: 7934051929434515110}
+ - component: {fileID: 1469866302769820338}
+ m_Layer: 7
+ m_Name: BuildingFoundation
+ m_TagString: Untagged
+ m_Icon: {fileID: 0}
+ m_NavMeshLayer: 0
+ m_StaticEditorFlags: 0
+ m_IsActive: 1
+--- !u!4 &320439620877427584
+Transform:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 1340458267086560577}
+ serializedVersion: 2
+ m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
+ m_LocalPosition: {x: -0.16642, y: 2.85937, z: -70.56466}
+ m_LocalScale: {x: 1, y: 1, z: 1}
+ m_ConstrainProportionsScale: 0
+ m_Children:
+ - {fileID: 3231547248474457999}
+ m_Father: {fileID: 0}
+ m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
+--- !u!114 &7934051929434515110
+MonoBehaviour:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 1340458267086560577}
+ m_Enabled: 1
+ m_EditorHideFlags: 0
+ m_Script: {fileID: 11500000, guid: d5a57f767e5e46a458fc5d3c628d0cbb, type: 3}
+ m_Name:
+ m_EditorClassIdentifier: Unity.Netcode.Runtime::Unity.Netcode.NetworkObject
+ GlobalObjectIdHash: 1879467101
+ InScenePlacedSourceGlobalObjectIdHash: 4292538740
+ DeferredDespawnTick: 0
+ Ownership: 1
+ AlwaysReplicateAsRoot: 0
+ SynchronizeTransform: 1
+ ActiveSceneSynchronization: 0
+ SceneMigrationSynchronization: 0
+ SpawnWithObservers: 1
+ DontDestroyWithOwner: 0
+ AutoObjectParentSync: 1
+ SyncOwnerTransformWhenParented: 1
+ AllowOwnerToParent: 0
+--- !u!114 &1469866302769820338
+MonoBehaviour:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 1340458267086560577}
+ m_Enabled: 1
+ m_EditorHideFlags: 0
+ m_Script: {fileID: 11500000, guid: cad87caf8c43a4b41911ae978c10ae0e, type: 3}
+ m_Name:
+ m_EditorClassIdentifier: Assembly-CSharp::Northbound.BuildingFoundation
+ ShowTopMostFoldoutHeaderGroup: 1
+ buildingData: {fileID: 11400000, guid: 23c12a82ea534b34299700b86fffd524, type: 2}
+ gridPosition: {x: 0, y: 0, z: 0}
+ rotation: 0
+ foundationVisual: {fileID: 2851644658348875061}
+ progressBarPrefab: {fileID: 0}
+--- !u!1001 &3121692064363536484
+PrefabInstance:
+ m_ObjectHideFlags: 0
+ serializedVersion: 2
+ m_Modification:
+ serializedVersion: 3
+ m_TransformParent: {fileID: 320439620877427584}
+ m_Modifications:
+ - target: {fileID: -8679921383154817045, guid: 68d9692df5fecb64f80d8ba660cf9a55, type: 3}
+ propertyPath: m_LocalPosition.x
+ value: 0
+ objectReference: {fileID: 0}
+ - target: {fileID: -8679921383154817045, guid: 68d9692df5fecb64f80d8ba660cf9a55, type: 3}
+ propertyPath: m_LocalPosition.y
+ value: 0
+ objectReference: {fileID: 0}
+ - target: {fileID: -8679921383154817045, guid: 68d9692df5fecb64f80d8ba660cf9a55, type: 3}
+ propertyPath: m_LocalPosition.z
+ value: 0
+ objectReference: {fileID: 0}
+ - target: {fileID: -8679921383154817045, guid: 68d9692df5fecb64f80d8ba660cf9a55, type: 3}
+ propertyPath: m_LocalRotation.w
+ value: 1
+ objectReference: {fileID: 0}
+ - target: {fileID: -8679921383154817045, guid: 68d9692df5fecb64f80d8ba660cf9a55, type: 3}
+ propertyPath: m_LocalRotation.x
+ value: 0.00000008146034
+ objectReference: {fileID: 0}
+ - target: {fileID: -8679921383154817045, guid: 68d9692df5fecb64f80d8ba660cf9a55, type: 3}
+ propertyPath: m_LocalRotation.y
+ value: 0
+ objectReference: {fileID: 0}
+ - target: {fileID: -8679921383154817045, guid: 68d9692df5fecb64f80d8ba660cf9a55, type: 3}
+ propertyPath: m_LocalRotation.z
+ value: -0
+ objectReference: {fileID: 0}
+ - target: {fileID: -8679921383154817045, guid: 68d9692df5fecb64f80d8ba660cf9a55, type: 3}
+ propertyPath: m_LocalEulerAnglesHint.x
+ value: 0
+ objectReference: {fileID: 0}
+ - target: {fileID: -8679921383154817045, guid: 68d9692df5fecb64f80d8ba660cf9a55, type: 3}
+ propertyPath: m_LocalEulerAnglesHint.y
+ value: 0
+ objectReference: {fileID: 0}
+ - target: {fileID: -8679921383154817045, guid: 68d9692df5fecb64f80d8ba660cf9a55, type: 3}
+ propertyPath: m_LocalEulerAnglesHint.z
+ value: 0
+ objectReference: {fileID: 0}
+ - target: {fileID: 919132149155446097, guid: 68d9692df5fecb64f80d8ba660cf9a55, type: 3}
+ propertyPath: m_Name
+ value: Parts_Pile_Large
+ objectReference: {fileID: 0}
+ - target: {fileID: 919132149155446097, guid: 68d9692df5fecb64f80d8ba660cf9a55, type: 3}
+ propertyPath: m_Layer
+ value: 7
+ objectReference: {fileID: 0}
+ m_RemovedComponents: []
+ m_RemovedGameObjects: []
+ m_AddedGameObjects: []
+ m_AddedComponents: []
+ m_SourcePrefab: {fileID: 100100000, guid: 68d9692df5fecb64f80d8ba660cf9a55, type: 3}
+--- !u!1 &2851644658348875061 stripped
+GameObject:
+ m_CorrespondingSourceObject: {fileID: 919132149155446097, guid: 68d9692df5fecb64f80d8ba660cf9a55, type: 3}
+ m_PrefabInstance: {fileID: 3121692064363536484}
+ m_PrefabAsset: {fileID: 0}
+--- !u!4 &3231547248474457999 stripped
+Transform:
+ m_CorrespondingSourceObject: {fileID: -8679921383154817045, guid: 68d9692df5fecb64f80d8ba660cf9a55, type: 3}
+ m_PrefabInstance: {fileID: 3121692064363536484}
+ m_PrefabAsset: {fileID: 0}
diff --git a/Assets/Prefabs/BuildingFoundation.prefab.meta b/Assets/Prefabs/BuildingFoundation.prefab.meta
new file mode 100644
index 0000000..9e26733
--- /dev/null
+++ b/Assets/Prefabs/BuildingFoundation.prefab.meta
@@ -0,0 +1,7 @@
+fileFormatVersion: 2
+guid: d20c3ce6a3c39154aa033d0f61bd9a4d
+PrefabImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Prefabs/Core.prefab b/Assets/Prefabs/Core.prefab
index 0ba0816..67a400d 100644
--- a/Assets/Prefabs/Core.prefab
+++ b/Assets/Prefabs/Core.prefab
@@ -12,7 +12,7 @@ GameObject:
- component: {fileID: 5173262576415873253}
- component: {fileID: 1287070985890992582}
- component: {fileID: 2964705630284685173}
- - component: {fileID: 5613501924847776270}
+ - component: {fileID: 2236804103334722056}
m_Layer: 7
m_Name: Core
m_TagString: Untagged
@@ -33,7 +33,7 @@ Transform:
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children:
- - {fileID: 2126198199081001988}
+ - {fileID: 1630774755871243086}
m_Father: {fileID: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &5173262576415873253
@@ -115,120 +115,13 @@ MonoBehaviour:
effectSpawnPoint: {fileID: 0}
showGridBounds: 1
gridBoundsColor: {r: 0, g: 1, b: 1, a: 1}
---- !u!114 &5613501924847776270
-MonoBehaviour:
+--- !u!65 &2236804103334722056
+BoxCollider:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8124290768227340041}
- m_Enabled: 1
- m_EditorHideFlags: 0
- m_Script: {fileID: 11500000, guid: 0ceedb9b012d848478813136b65738ae, type: 3}
- m_Name:
- m_EditorClassIdentifier: Assembly-CSharp::Northbound.Building
- ShowTopMostFoldoutHeaderGroup: 1
- buildingData: {fileID: 11400000, guid: 23c12a82ea534b34299700b86fffd524, type: 2}
- gridPosition: {x: 0, y: 0, z: 0}
- rotation: 0
- initialTeam: 1
- initialOwnerId: 0
- useInitialOwner: 0
- showHealthBar: 0
- healthBarPrefab: {fileID: 0}
- destroyEffectPrefab: {fileID: 0}
- damageEffectPrefab: {fileID: 0}
- effectSpawnPoint: {fileID: 0}
- showGridBounds: 1
- gridBoundsColor: {r: 0, g: 1, b: 1, a: 1}
---- !u!1001 &1876730568674182127
-PrefabInstance:
- m_ObjectHideFlags: 0
- serializedVersion: 2
- m_Modification:
- serializedVersion: 3
- m_TransformParent: {fileID: 8064559726283331702}
- m_Modifications:
- - target: {fileID: -8679921383154817045, guid: 5f64c4e10a9ac674c9d0b68790f2c859, type: 3}
- propertyPath: m_LocalScale.x
- value: 10
- objectReference: {fileID: 0}
- - target: {fileID: -8679921383154817045, guid: 5f64c4e10a9ac674c9d0b68790f2c859, type: 3}
- propertyPath: m_LocalScale.y
- value: 10
- objectReference: {fileID: 0}
- - target: {fileID: -8679921383154817045, guid: 5f64c4e10a9ac674c9d0b68790f2c859, type: 3}
- propertyPath: m_LocalScale.z
- value: 10
- objectReference: {fileID: 0}
- - target: {fileID: -8679921383154817045, guid: 5f64c4e10a9ac674c9d0b68790f2c859, type: 3}
- propertyPath: m_LocalPosition.x
- value: 0
- objectReference: {fileID: 0}
- - target: {fileID: -8679921383154817045, guid: 5f64c4e10a9ac674c9d0b68790f2c859, type: 3}
- propertyPath: m_LocalPosition.y
- value: 6
- objectReference: {fileID: 0}
- - target: {fileID: -8679921383154817045, guid: 5f64c4e10a9ac674c9d0b68790f2c859, type: 3}
- propertyPath: m_LocalPosition.z
- value: 0
- objectReference: {fileID: 0}
- - target: {fileID: -8679921383154817045, guid: 5f64c4e10a9ac674c9d0b68790f2c859, type: 3}
- propertyPath: m_LocalRotation.w
- value: 1
- objectReference: {fileID: 0}
- - target: {fileID: -8679921383154817045, guid: 5f64c4e10a9ac674c9d0b68790f2c859, type: 3}
- propertyPath: m_LocalRotation.x
- value: 0.000000021855694
- objectReference: {fileID: 0}
- - target: {fileID: -8679921383154817045, guid: 5f64c4e10a9ac674c9d0b68790f2c859, type: 3}
- propertyPath: m_LocalRotation.y
- value: 0
- objectReference: {fileID: 0}
- - target: {fileID: -8679921383154817045, guid: 5f64c4e10a9ac674c9d0b68790f2c859, type: 3}
- propertyPath: m_LocalRotation.z
- value: -0
- objectReference: {fileID: 0}
- - target: {fileID: -8679921383154817045, guid: 5f64c4e10a9ac674c9d0b68790f2c859, type: 3}
- propertyPath: m_LocalEulerAnglesHint.x
- value: 0
- objectReference: {fileID: 0}
- - target: {fileID: -8679921383154817045, guid: 5f64c4e10a9ac674c9d0b68790f2c859, type: 3}
- propertyPath: m_LocalEulerAnglesHint.y
- value: 0
- objectReference: {fileID: 0}
- - target: {fileID: -8679921383154817045, guid: 5f64c4e10a9ac674c9d0b68790f2c859, type: 3}
- propertyPath: m_LocalEulerAnglesHint.z
- value: 0
- objectReference: {fileID: 0}
- - target: {fileID: 919132149155446097, guid: 5f64c4e10a9ac674c9d0b68790f2c859, type: 3}
- propertyPath: m_Name
- value: Barrel_C
- objectReference: {fileID: 0}
- - target: {fileID: 919132149155446097, guid: 5f64c4e10a9ac674c9d0b68790f2c859, type: 3}
- propertyPath: m_Layer
- value: 7
- objectReference: {fileID: 0}
- m_RemovedComponents: []
- m_RemovedGameObjects: []
- m_AddedGameObjects: []
- m_AddedComponents:
- - targetCorrespondingSourceObject: {fileID: 919132149155446097, guid: 5f64c4e10a9ac674c9d0b68790f2c859, type: 3}
- insertIndex: -1
- addedObject: {fileID: 1061550929417117571}
- m_SourcePrefab: {fileID: 100100000, guid: 5f64c4e10a9ac674c9d0b68790f2c859, type: 3}
---- !u!1 &1642148463057321662 stripped
-GameObject:
- m_CorrespondingSourceObject: {fileID: 919132149155446097, guid: 5f64c4e10a9ac674c9d0b68790f2c859, type: 3}
- m_PrefabInstance: {fileID: 1876730568674182127}
- m_PrefabAsset: {fileID: 0}
---- !u!64 &1061550929417117571
-MeshCollider:
- m_ObjectHideFlags: 0
- m_CorrespondingSourceObject: {fileID: 0}
- m_PrefabInstance: {fileID: 0}
- m_PrefabAsset: {fileID: 0}
- m_GameObject: {fileID: 1642148463057321662}
m_Material: {fileID: 0}
m_IncludeLayers:
serializedVersion: 2
@@ -240,12 +133,84 @@ MeshCollider:
m_IsTrigger: 0
m_ProvidesContacts: 0
m_Enabled: 1
- serializedVersion: 5
- m_Convex: 1
- m_CookingOptions: 30
- m_Mesh: {fileID: -5282377409767143930, guid: 5f64c4e10a9ac674c9d0b68790f2c859, type: 3}
---- !u!4 &2126198199081001988 stripped
+ serializedVersion: 3
+ m_Size: {x: 10, y: 10, z: 10}
+ m_Center: {x: 0, y: 5, z: 0}
+--- !u!1001 &1237105051606736037
+PrefabInstance:
+ m_ObjectHideFlags: 0
+ serializedVersion: 2
+ m_Modification:
+ serializedVersion: 3
+ m_TransformParent: {fileID: 8064559726283331702}
+ m_Modifications:
+ - target: {fileID: -8679921383154817045, guid: 0402c4b1e07c04444b61bea1d63d7880, type: 3}
+ propertyPath: m_LocalScale.x
+ value: 5
+ objectReference: {fileID: 0}
+ - target: {fileID: -8679921383154817045, guid: 0402c4b1e07c04444b61bea1d63d7880, type: 3}
+ propertyPath: m_LocalScale.y
+ value: 5
+ objectReference: {fileID: 0}
+ - target: {fileID: -8679921383154817045, guid: 0402c4b1e07c04444b61bea1d63d7880, type: 3}
+ propertyPath: m_LocalScale.z
+ value: 5
+ objectReference: {fileID: 0}
+ - target: {fileID: -8679921383154817045, guid: 0402c4b1e07c04444b61bea1d63d7880, type: 3}
+ propertyPath: m_LocalPosition.x
+ value: 0
+ objectReference: {fileID: 0}
+ - target: {fileID: -8679921383154817045, guid: 0402c4b1e07c04444b61bea1d63d7880, type: 3}
+ propertyPath: m_LocalPosition.y
+ value: 0
+ objectReference: {fileID: 0}
+ - target: {fileID: -8679921383154817045, guid: 0402c4b1e07c04444b61bea1d63d7880, type: 3}
+ propertyPath: m_LocalPosition.z
+ value: 0
+ objectReference: {fileID: 0}
+ - target: {fileID: -8679921383154817045, guid: 0402c4b1e07c04444b61bea1d63d7880, type: 3}
+ propertyPath: m_LocalRotation.w
+ value: 1
+ objectReference: {fileID: 0}
+ - target: {fileID: -8679921383154817045, guid: 0402c4b1e07c04444b61bea1d63d7880, type: 3}
+ propertyPath: m_LocalRotation.x
+ value: 0.00000008146034
+ objectReference: {fileID: 0}
+ - target: {fileID: -8679921383154817045, guid: 0402c4b1e07c04444b61bea1d63d7880, type: 3}
+ propertyPath: m_LocalRotation.y
+ value: 0
+ objectReference: {fileID: 0}
+ - target: {fileID: -8679921383154817045, guid: 0402c4b1e07c04444b61bea1d63d7880, type: 3}
+ propertyPath: m_LocalRotation.z
+ value: -0
+ objectReference: {fileID: 0}
+ - target: {fileID: -8679921383154817045, guid: 0402c4b1e07c04444b61bea1d63d7880, type: 3}
+ propertyPath: m_LocalEulerAnglesHint.x
+ value: 0
+ objectReference: {fileID: 0}
+ - target: {fileID: -8679921383154817045, guid: 0402c4b1e07c04444b61bea1d63d7880, type: 3}
+ propertyPath: m_LocalEulerAnglesHint.y
+ value: 0
+ objectReference: {fileID: 0}
+ - target: {fileID: -8679921383154817045, guid: 0402c4b1e07c04444b61bea1d63d7880, type: 3}
+ propertyPath: m_LocalEulerAnglesHint.z
+ value: 0
+ objectReference: {fileID: 0}
+ - target: {fileID: -7511558181221131132, guid: 0402c4b1e07c04444b61bea1d63d7880, type: 3}
+ propertyPath: 'm_Materials.Array.data[0]'
+ value:
+ objectReference: {fileID: 2100000, guid: 91e05bbf1e5cbfb4d865c8e2febc4673, type: 2}
+ - target: {fileID: 919132149155446097, guid: 0402c4b1e07c04444b61bea1d63d7880, type: 3}
+ propertyPath: m_Name
+ value: building_castle_blue
+ objectReference: {fileID: 0}
+ m_RemovedComponents: []
+ m_RemovedGameObjects: []
+ m_AddedGameObjects: []
+ m_AddedComponents: []
+ m_SourcePrefab: {fileID: 100100000, guid: 0402c4b1e07c04444b61bea1d63d7880, type: 3}
+--- !u!4 &1630774755871243086 stripped
Transform:
- m_CorrespondingSourceObject: {fileID: -8679921383154817045, guid: 5f64c4e10a9ac674c9d0b68790f2c859, type: 3}
- m_PrefabInstance: {fileID: 1876730568674182127}
+ m_CorrespondingSourceObject: {fileID: -8679921383154817045, guid: 0402c4b1e07c04444b61bea1d63d7880, type: 3}
+ m_PrefabInstance: {fileID: 1237105051606736037}
m_PrefabAsset: {fileID: 0}
diff --git a/Assets/Prefabs/EnemyTest.prefab b/Assets/Prefabs/EnemyTest.prefab
index 63abd08..8b17066 100644
--- a/Assets/Prefabs/EnemyTest.prefab
+++ b/Assets/Prefabs/EnemyTest.prefab
@@ -154,7 +154,7 @@ CapsuleCollider:
m_Radius: 2.0893288
m_Height: 9.696183
m_Direction: 1
- m_Center: {x: 1.1155524, y: 0.45372725, z: -0.066551566}
+ m_Center: {x: 0, y: 0, z: 0}
--- !u!1001 &9138031816947745843
PrefabInstance:
m_ObjectHideFlags: 0
@@ -203,10 +203,42 @@ PrefabInstance:
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
+ - target: {fileID: -8380783556237360187, guid: 8b9b0f173a147b14eab929864ece863b, type: 3}
+ propertyPath: 'm_Materials.Array.data[0]'
+ value:
+ objectReference: {fileID: 2100000, guid: fe22e32eacc91c848ae7a9b9b43e6629, type: 2}
+ - target: {fileID: -6838469388590892448, guid: 8b9b0f173a147b14eab929864ece863b, type: 3}
+ propertyPath: 'm_Materials.Array.data[0]'
+ value:
+ objectReference: {fileID: 2100000, guid: fe22e32eacc91c848ae7a9b9b43e6629, type: 2}
+ - target: {fileID: -4408481997133810135, guid: 8b9b0f173a147b14eab929864ece863b, type: 3}
+ propertyPath: 'm_Materials.Array.data[0]'
+ value:
+ objectReference: {fileID: 2100000, guid: fe22e32eacc91c848ae7a9b9b43e6629, type: 2}
+ - target: {fileID: -2962718905970087091, guid: 8b9b0f173a147b14eab929864ece863b, type: 3}
+ propertyPath: 'm_Materials.Array.data[0]'
+ value:
+ objectReference: {fileID: 2100000, guid: fe22e32eacc91c848ae7a9b9b43e6629, type: 2}
+ - target: {fileID: -1547348769253965558, guid: 8b9b0f173a147b14eab929864ece863b, type: 3}
+ propertyPath: 'm_Materials.Array.data[0]'
+ value:
+ objectReference: {fileID: 2100000, guid: fe22e32eacc91c848ae7a9b9b43e6629, type: 2}
+ - target: {fileID: 796407376638139366, guid: 8b9b0f173a147b14eab929864ece863b, type: 3}
+ propertyPath: 'm_Materials.Array.data[0]'
+ value:
+ objectReference: {fileID: 2100000, guid: fe22e32eacc91c848ae7a9b9b43e6629, type: 2}
- target: {fileID: 919132149155446097, guid: 8b9b0f173a147b14eab929864ece863b, type: 3}
propertyPath: m_Name
value: Skeleton_Minion
objectReference: {fileID: 0}
+ - target: {fileID: 3000256035407954547, guid: 8b9b0f173a147b14eab929864ece863b, type: 3}
+ propertyPath: 'm_Materials.Array.data[0]'
+ value:
+ objectReference: {fileID: 2100000, guid: fe22e32eacc91c848ae7a9b9b43e6629, type: 2}
+ - target: {fileID: 4523480060844978375, guid: 8b9b0f173a147b14eab929864ece863b, type: 3}
+ propertyPath: 'm_Materials.Array.data[0]'
+ value:
+ objectReference: {fileID: 2100000, guid: fe22e32eacc91c848ae7a9b9b43e6629, type: 2}
m_RemovedComponents: []
m_RemovedGameObjects: []
m_AddedGameObjects: []
diff --git a/Assets/Prefabs/Wall.prefab b/Assets/Prefabs/Wall.prefab
index 77b7db9..0c1a57c 100644
--- a/Assets/Prefabs/Wall.prefab
+++ b/Assets/Prefabs/Wall.prefab
@@ -1,5 +1,113 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
+--- !u!1001 &142287175815043642
+PrefabInstance:
+ m_ObjectHideFlags: 0
+ serializedVersion: 2
+ m_Modification:
+ serializedVersion: 3
+ m_TransformParent: {fileID: 2561889291515577528}
+ m_Modifications:
+ - target: {fileID: -8679921383154817045, guid: 9925587cfc99e8148bfab9d8b22d9f87, type: 3}
+ propertyPath: m_LocalScale.x
+ value: 2
+ objectReference: {fileID: 0}
+ - target: {fileID: -8679921383154817045, guid: 9925587cfc99e8148bfab9d8b22d9f87, type: 3}
+ propertyPath: m_LocalScale.y
+ value: 2
+ objectReference: {fileID: 0}
+ - target: {fileID: -8679921383154817045, guid: 9925587cfc99e8148bfab9d8b22d9f87, type: 3}
+ propertyPath: m_LocalScale.z
+ value: 2
+ objectReference: {fileID: 0}
+ - target: {fileID: -8679921383154817045, guid: 9925587cfc99e8148bfab9d8b22d9f87, type: 3}
+ propertyPath: m_LocalPosition.x
+ value: -1
+ objectReference: {fileID: 0}
+ - target: {fileID: -8679921383154817045, guid: 9925587cfc99e8148bfab9d8b22d9f87, type: 3}
+ propertyPath: m_LocalPosition.y
+ value: 0
+ objectReference: {fileID: 0}
+ - target: {fileID: -8679921383154817045, guid: 9925587cfc99e8148bfab9d8b22d9f87, type: 3}
+ propertyPath: m_LocalPosition.z
+ value: 0
+ objectReference: {fileID: 0}
+ - target: {fileID: -8679921383154817045, guid: 9925587cfc99e8148bfab9d8b22d9f87, type: 3}
+ propertyPath: m_LocalRotation.w
+ value: 1
+ objectReference: {fileID: 0}
+ - target: {fileID: -8679921383154817045, guid: 9925587cfc99e8148bfab9d8b22d9f87, type: 3}
+ propertyPath: m_LocalRotation.x
+ value: 0.00000008146034
+ objectReference: {fileID: 0}
+ - target: {fileID: -8679921383154817045, guid: 9925587cfc99e8148bfab9d8b22d9f87, type: 3}
+ propertyPath: m_LocalRotation.y
+ value: 0
+ objectReference: {fileID: 0}
+ - target: {fileID: -8679921383154817045, guid: 9925587cfc99e8148bfab9d8b22d9f87, type: 3}
+ propertyPath: m_LocalRotation.z
+ value: -0
+ objectReference: {fileID: 0}
+ - target: {fileID: -8679921383154817045, guid: 9925587cfc99e8148bfab9d8b22d9f87, type: 3}
+ propertyPath: m_LocalEulerAnglesHint.x
+ value: 0
+ objectReference: {fileID: 0}
+ - target: {fileID: -8679921383154817045, guid: 9925587cfc99e8148bfab9d8b22d9f87, type: 3}
+ propertyPath: m_LocalEulerAnglesHint.y
+ value: 0
+ objectReference: {fileID: 0}
+ - target: {fileID: -8679921383154817045, guid: 9925587cfc99e8148bfab9d8b22d9f87, type: 3}
+ propertyPath: m_LocalEulerAnglesHint.z
+ value: 0
+ objectReference: {fileID: 0}
+ - target: {fileID: -7511558181221131132, guid: 9925587cfc99e8148bfab9d8b22d9f87, type: 3}
+ propertyPath: 'm_Materials.Array.data[0]'
+ value:
+ objectReference: {fileID: 2100000, guid: 91e05bbf1e5cbfb4d865c8e2febc4673, type: 2}
+ - target: {fileID: 919132149155446097, guid: 9925587cfc99e8148bfab9d8b22d9f87, type: 3}
+ propertyPath: m_Name
+ value: building_tower_base_blue (1)
+ objectReference: {fileID: 0}
+ m_RemovedComponents: []
+ m_RemovedGameObjects: []
+ m_AddedGameObjects: []
+ m_AddedComponents:
+ - targetCorrespondingSourceObject: {fileID: 919132149155446097, guid: 9925587cfc99e8148bfab9d8b22d9f87, type: 3}
+ insertIndex: -1
+ addedObject: {fileID: 3661722945847038968}
+ m_SourcePrefab: {fileID: 100100000, guid: 9925587cfc99e8148bfab9d8b22d9f87, type: 3}
+--- !u!4 &464776844096437713 stripped
+Transform:
+ m_CorrespondingSourceObject: {fileID: -8679921383154817045, guid: 9925587cfc99e8148bfab9d8b22d9f87, type: 3}
+ m_PrefabInstance: {fileID: 142287175815043642}
+ m_PrefabAsset: {fileID: 0}
+--- !u!1 &952767229810812779 stripped
+GameObject:
+ m_CorrespondingSourceObject: {fileID: 919132149155446097, guid: 9925587cfc99e8148bfab9d8b22d9f87, type: 3}
+ m_PrefabInstance: {fileID: 142287175815043642}
+ m_PrefabAsset: {fileID: 0}
+--- !u!64 &3661722945847038968
+MeshCollider:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 952767229810812779}
+ m_Material: {fileID: 0}
+ m_IncludeLayers:
+ serializedVersion: 2
+ m_Bits: 0
+ m_ExcludeLayers:
+ serializedVersion: 2
+ m_Bits: 0
+ m_LayerOverridePriority: 0
+ m_IsTrigger: 0
+ m_ProvidesContacts: 0
+ m_Enabled: 1
+ serializedVersion: 5
+ m_Convex: 1
+ m_CookingOptions: 30
+ m_Mesh: {fileID: 2231612616327559228, guid: 9925587cfc99e8148bfab9d8b22d9f87, type: 3}
--- !u!1001 &2596063234185536339
PrefabInstance:
m_ObjectHideFlags: 0
@@ -22,7 +130,7 @@ PrefabInstance:
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: 244a8d70d41b1a948beb2221c7c0efa9, type: 3}
propertyPath: m_LocalPosition.x
- value: -8
+ value: 0
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: 244a8d70d41b1a948beb2221c7c0efa9, type: 3}
propertyPath: m_LocalPosition.y
@@ -68,14 +176,37 @@ PrefabInstance:
propertyPath: m_Name
value: Wall
objectReference: {fileID: 0}
- m_RemovedComponents: []
+ - target: {fileID: 919132149155446097, guid: 244a8d70d41b1a948beb2221c7c0efa9, type: 3}
+ propertyPath: m_Layer
+ value: 9
+ objectReference: {fileID: 0}
+ m_RemovedComponents:
+ - {fileID: -5754084199372789682, guid: 244a8d70d41b1a948beb2221c7c0efa9, type: 3}
+ - {fileID: -7511558181221131132, guid: 244a8d70d41b1a948beb2221c7c0efa9, type: 3}
m_RemovedGameObjects: []
- m_AddedGameObjects: []
+ m_AddedGameObjects:
+ - targetCorrespondingSourceObject: {fileID: -8679921383154817045, guid: 244a8d70d41b1a948beb2221c7c0efa9, type: 3}
+ insertIndex: -1
+ addedObject: {fileID: 4245465523368885439}
+ - targetCorrespondingSourceObject: {fileID: -8679921383154817045, guid: 244a8d70d41b1a948beb2221c7c0efa9, type: 3}
+ insertIndex: -1
+ addedObject: {fileID: 464776844096437713}
+ - targetCorrespondingSourceObject: {fileID: -8679921383154817045, guid: 244a8d70d41b1a948beb2221c7c0efa9, type: 3}
+ insertIndex: -1
+ addedObject: {fileID: 8043314427461752821}
+ - targetCorrespondingSourceObject: {fileID: -8679921383154817045, guid: 244a8d70d41b1a948beb2221c7c0efa9, type: 3}
+ insertIndex: -1
+ addedObject: {fileID: 8478322201674504893}
m_AddedComponents:
- targetCorrespondingSourceObject: {fileID: 919132149155446097, guid: 244a8d70d41b1a948beb2221c7c0efa9, type: 3}
insertIndex: -1
addedObject: {fileID: 1591641544412467547}
m_SourcePrefab: {fileID: 100100000, guid: 244a8d70d41b1a948beb2221c7c0efa9, type: 3}
+--- !u!4 &2561889291515577528 stripped
+Transform:
+ m_CorrespondingSourceObject: {fileID: -8679921383154817045, guid: 244a8d70d41b1a948beb2221c7c0efa9, type: 3}
+ m_PrefabInstance: {fileID: 2596063234185536339}
+ m_PrefabAsset: {fileID: 0}
--- !u!1 &2938167817760513538 stripped
GameObject:
m_CorrespondingSourceObject: {fileID: 919132149155446097, guid: 244a8d70d41b1a948beb2221c7c0efa9, type: 3}
@@ -93,8 +224,8 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: d5a57f767e5e46a458fc5d3c628d0cbb, type: 3}
m_Name:
m_EditorClassIdentifier: Unity.Netcode.Runtime::Unity.Netcode.NetworkObject
- GlobalObjectIdHash: 2718147317
- InScenePlacedSourceGlobalObjectIdHash: 0
+ GlobalObjectIdHash: 752897239
+ InScenePlacedSourceGlobalObjectIdHash: 2718147317
DeferredDespawnTick: 0
Ownership: 1
AlwaysReplicateAsRoot: 0
@@ -106,3 +237,327 @@ MonoBehaviour:
AutoObjectParentSync: 1
SyncOwnerTransformWhenParented: 1
AllowOwnerToParent: 0
+--- !u!1001 &4422628408868772692
+PrefabInstance:
+ m_ObjectHideFlags: 0
+ serializedVersion: 2
+ m_Modification:
+ serializedVersion: 3
+ m_TransformParent: {fileID: 2561889291515577528}
+ m_Modifications:
+ - target: {fileID: -8679921383154817045, guid: 9925587cfc99e8148bfab9d8b22d9f87, type: 3}
+ propertyPath: m_LocalScale.x
+ value: 2
+ objectReference: {fileID: 0}
+ - target: {fileID: -8679921383154817045, guid: 9925587cfc99e8148bfab9d8b22d9f87, type: 3}
+ propertyPath: m_LocalScale.y
+ value: 2
+ objectReference: {fileID: 0}
+ - target: {fileID: -8679921383154817045, guid: 9925587cfc99e8148bfab9d8b22d9f87, type: 3}
+ propertyPath: m_LocalScale.z
+ value: 2
+ objectReference: {fileID: 0}
+ - target: {fileID: -8679921383154817045, guid: 9925587cfc99e8148bfab9d8b22d9f87, type: 3}
+ propertyPath: m_LocalPosition.x
+ value: -3
+ objectReference: {fileID: 0}
+ - target: {fileID: -8679921383154817045, guid: 9925587cfc99e8148bfab9d8b22d9f87, type: 3}
+ propertyPath: m_LocalPosition.y
+ value: 0
+ objectReference: {fileID: 0}
+ - target: {fileID: -8679921383154817045, guid: 9925587cfc99e8148bfab9d8b22d9f87, type: 3}
+ propertyPath: m_LocalPosition.z
+ value: 0
+ objectReference: {fileID: 0}
+ - target: {fileID: -8679921383154817045, guid: 9925587cfc99e8148bfab9d8b22d9f87, type: 3}
+ propertyPath: m_LocalRotation.w
+ value: 1
+ objectReference: {fileID: 0}
+ - target: {fileID: -8679921383154817045, guid: 9925587cfc99e8148bfab9d8b22d9f87, type: 3}
+ propertyPath: m_LocalRotation.x
+ value: 0.00000008146034
+ objectReference: {fileID: 0}
+ - target: {fileID: -8679921383154817045, guid: 9925587cfc99e8148bfab9d8b22d9f87, type: 3}
+ propertyPath: m_LocalRotation.y
+ value: 0
+ objectReference: {fileID: 0}
+ - target: {fileID: -8679921383154817045, guid: 9925587cfc99e8148bfab9d8b22d9f87, type: 3}
+ propertyPath: m_LocalRotation.z
+ value: -0
+ objectReference: {fileID: 0}
+ - target: {fileID: -8679921383154817045, guid: 9925587cfc99e8148bfab9d8b22d9f87, type: 3}
+ propertyPath: m_LocalEulerAnglesHint.x
+ value: 0
+ objectReference: {fileID: 0}
+ - target: {fileID: -8679921383154817045, guid: 9925587cfc99e8148bfab9d8b22d9f87, type: 3}
+ propertyPath: m_LocalEulerAnglesHint.y
+ value: 0
+ objectReference: {fileID: 0}
+ - target: {fileID: -8679921383154817045, guid: 9925587cfc99e8148bfab9d8b22d9f87, type: 3}
+ propertyPath: m_LocalEulerAnglesHint.z
+ value: 0
+ objectReference: {fileID: 0}
+ - target: {fileID: -7511558181221131132, guid: 9925587cfc99e8148bfab9d8b22d9f87, type: 3}
+ propertyPath: 'm_Materials.Array.data[0]'
+ value:
+ objectReference: {fileID: 2100000, guid: 91e05bbf1e5cbfb4d865c8e2febc4673, type: 2}
+ - target: {fileID: 919132149155446097, guid: 9925587cfc99e8148bfab9d8b22d9f87, type: 3}
+ propertyPath: m_Name
+ value: building_tower_base_blue
+ objectReference: {fileID: 0}
+ m_RemovedComponents: []
+ m_RemovedGameObjects: []
+ m_AddedGameObjects: []
+ m_AddedComponents:
+ - targetCorrespondingSourceObject: {fileID: 919132149155446097, guid: 9925587cfc99e8148bfab9d8b22d9f87, type: 3}
+ insertIndex: -1
+ addedObject: {fileID: 4121916576262726694}
+ m_SourcePrefab: {fileID: 100100000, guid: 9925587cfc99e8148bfab9d8b22d9f87, type: 3}
+--- !u!1 &3576206421418681861 stripped
+GameObject:
+ m_CorrespondingSourceObject: {fileID: 919132149155446097, guid: 9925587cfc99e8148bfab9d8b22d9f87, type: 3}
+ m_PrefabInstance: {fileID: 4422628408868772692}
+ m_PrefabAsset: {fileID: 0}
+--- !u!64 &4121916576262726694
+MeshCollider:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 3576206421418681861}
+ m_Material: {fileID: 0}
+ m_IncludeLayers:
+ serializedVersion: 2
+ m_Bits: 0
+ m_ExcludeLayers:
+ serializedVersion: 2
+ m_Bits: 0
+ m_LayerOverridePriority: 0
+ m_IsTrigger: 0
+ m_ProvidesContacts: 0
+ m_Enabled: 1
+ serializedVersion: 5
+ m_Convex: 1
+ m_CookingOptions: 30
+ m_Mesh: {fileID: 2231612616327559228, guid: 9925587cfc99e8148bfab9d8b22d9f87, type: 3}
+--- !u!4 &4245465523368885439 stripped
+Transform:
+ m_CorrespondingSourceObject: {fileID: -8679921383154817045, guid: 9925587cfc99e8148bfab9d8b22d9f87, type: 3}
+ m_PrefabInstance: {fileID: 4422628408868772692}
+ m_PrefabAsset: {fileID: 0}
+--- !u!1001 &7499952046013722654
+PrefabInstance:
+ m_ObjectHideFlags: 0
+ serializedVersion: 2
+ m_Modification:
+ serializedVersion: 3
+ m_TransformParent: {fileID: 2561889291515577528}
+ m_Modifications:
+ - target: {fileID: -8679921383154817045, guid: 9925587cfc99e8148bfab9d8b22d9f87, type: 3}
+ propertyPath: m_LocalScale.x
+ value: 2
+ objectReference: {fileID: 0}
+ - target: {fileID: -8679921383154817045, guid: 9925587cfc99e8148bfab9d8b22d9f87, type: 3}
+ propertyPath: m_LocalScale.y
+ value: 2
+ objectReference: {fileID: 0}
+ - target: {fileID: -8679921383154817045, guid: 9925587cfc99e8148bfab9d8b22d9f87, type: 3}
+ propertyPath: m_LocalScale.z
+ value: 2
+ objectReference: {fileID: 0}
+ - target: {fileID: -8679921383154817045, guid: 9925587cfc99e8148bfab9d8b22d9f87, type: 3}
+ propertyPath: m_LocalPosition.x
+ value: 1
+ objectReference: {fileID: 0}
+ - target: {fileID: -8679921383154817045, guid: 9925587cfc99e8148bfab9d8b22d9f87, type: 3}
+ propertyPath: m_LocalPosition.y
+ value: 0
+ objectReference: {fileID: 0}
+ - target: {fileID: -8679921383154817045, guid: 9925587cfc99e8148bfab9d8b22d9f87, type: 3}
+ propertyPath: m_LocalPosition.z
+ value: 0
+ objectReference: {fileID: 0}
+ - target: {fileID: -8679921383154817045, guid: 9925587cfc99e8148bfab9d8b22d9f87, type: 3}
+ propertyPath: m_LocalRotation.w
+ value: 1
+ objectReference: {fileID: 0}
+ - target: {fileID: -8679921383154817045, guid: 9925587cfc99e8148bfab9d8b22d9f87, type: 3}
+ propertyPath: m_LocalRotation.x
+ value: 0.00000008146034
+ objectReference: {fileID: 0}
+ - target: {fileID: -8679921383154817045, guid: 9925587cfc99e8148bfab9d8b22d9f87, type: 3}
+ propertyPath: m_LocalRotation.y
+ value: 0
+ objectReference: {fileID: 0}
+ - target: {fileID: -8679921383154817045, guid: 9925587cfc99e8148bfab9d8b22d9f87, type: 3}
+ propertyPath: m_LocalRotation.z
+ value: -0
+ objectReference: {fileID: 0}
+ - target: {fileID: -8679921383154817045, guid: 9925587cfc99e8148bfab9d8b22d9f87, type: 3}
+ propertyPath: m_LocalEulerAnglesHint.x
+ value: 0
+ objectReference: {fileID: 0}
+ - target: {fileID: -8679921383154817045, guid: 9925587cfc99e8148bfab9d8b22d9f87, type: 3}
+ propertyPath: m_LocalEulerAnglesHint.y
+ value: 0
+ objectReference: {fileID: 0}
+ - target: {fileID: -8679921383154817045, guid: 9925587cfc99e8148bfab9d8b22d9f87, type: 3}
+ propertyPath: m_LocalEulerAnglesHint.z
+ value: 0
+ objectReference: {fileID: 0}
+ - target: {fileID: -7511558181221131132, guid: 9925587cfc99e8148bfab9d8b22d9f87, type: 3}
+ propertyPath: 'm_Materials.Array.data[0]'
+ value:
+ objectReference: {fileID: 2100000, guid: 91e05bbf1e5cbfb4d865c8e2febc4673, type: 2}
+ - target: {fileID: 919132149155446097, guid: 9925587cfc99e8148bfab9d8b22d9f87, type: 3}
+ propertyPath: m_Name
+ value: building_tower_base_blue (2)
+ objectReference: {fileID: 0}
+ m_RemovedComponents: []
+ m_RemovedGameObjects: []
+ m_AddedGameObjects: []
+ m_AddedComponents:
+ - targetCorrespondingSourceObject: {fileID: 919132149155446097, guid: 9925587cfc99e8148bfab9d8b22d9f87, type: 3}
+ insertIndex: -1
+ addedObject: {fileID: 4293496545495519341}
+ m_SourcePrefab: {fileID: 100100000, guid: 9925587cfc99e8148bfab9d8b22d9f87, type: 3}
+--- !u!1 &7265510678957493583 stripped
+GameObject:
+ m_CorrespondingSourceObject: {fileID: 919132149155446097, guid: 9925587cfc99e8148bfab9d8b22d9f87, type: 3}
+ m_PrefabInstance: {fileID: 7499952046013722654}
+ m_PrefabAsset: {fileID: 0}
+--- !u!64 &4293496545495519341
+MeshCollider:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 7265510678957493583}
+ m_Material: {fileID: 0}
+ m_IncludeLayers:
+ serializedVersion: 2
+ m_Bits: 0
+ m_ExcludeLayers:
+ serializedVersion: 2
+ m_Bits: 0
+ m_LayerOverridePriority: 0
+ m_IsTrigger: 0
+ m_ProvidesContacts: 0
+ m_Enabled: 1
+ serializedVersion: 5
+ m_Convex: 1
+ m_CookingOptions: 30
+ m_Mesh: {fileID: 2231612616327559228, guid: 9925587cfc99e8148bfab9d8b22d9f87, type: 3}
+--- !u!4 &8043314427461752821 stripped
+Transform:
+ m_CorrespondingSourceObject: {fileID: -8679921383154817045, guid: 9925587cfc99e8148bfab9d8b22d9f87, type: 3}
+ m_PrefabInstance: {fileID: 7499952046013722654}
+ m_PrefabAsset: {fileID: 0}
+--- !u!1001 &8224615678257184086
+PrefabInstance:
+ m_ObjectHideFlags: 0
+ serializedVersion: 2
+ m_Modification:
+ serializedVersion: 3
+ m_TransformParent: {fileID: 2561889291515577528}
+ m_Modifications:
+ - target: {fileID: -8679921383154817045, guid: 9925587cfc99e8148bfab9d8b22d9f87, type: 3}
+ propertyPath: m_LocalScale.x
+ value: 2
+ objectReference: {fileID: 0}
+ - target: {fileID: -8679921383154817045, guid: 9925587cfc99e8148bfab9d8b22d9f87, type: 3}
+ propertyPath: m_LocalScale.y
+ value: 2
+ objectReference: {fileID: 0}
+ - target: {fileID: -8679921383154817045, guid: 9925587cfc99e8148bfab9d8b22d9f87, type: 3}
+ propertyPath: m_LocalScale.z
+ value: 2
+ objectReference: {fileID: 0}
+ - target: {fileID: -8679921383154817045, guid: 9925587cfc99e8148bfab9d8b22d9f87, type: 3}
+ propertyPath: m_LocalPosition.x
+ value: 3
+ objectReference: {fileID: 0}
+ - target: {fileID: -8679921383154817045, guid: 9925587cfc99e8148bfab9d8b22d9f87, type: 3}
+ propertyPath: m_LocalPosition.y
+ value: 0
+ objectReference: {fileID: 0}
+ - target: {fileID: -8679921383154817045, guid: 9925587cfc99e8148bfab9d8b22d9f87, type: 3}
+ propertyPath: m_LocalPosition.z
+ value: 0
+ objectReference: {fileID: 0}
+ - target: {fileID: -8679921383154817045, guid: 9925587cfc99e8148bfab9d8b22d9f87, type: 3}
+ propertyPath: m_LocalRotation.w
+ value: 1
+ objectReference: {fileID: 0}
+ - target: {fileID: -8679921383154817045, guid: 9925587cfc99e8148bfab9d8b22d9f87, type: 3}
+ propertyPath: m_LocalRotation.x
+ value: 0.00000008146034
+ objectReference: {fileID: 0}
+ - target: {fileID: -8679921383154817045, guid: 9925587cfc99e8148bfab9d8b22d9f87, type: 3}
+ propertyPath: m_LocalRotation.y
+ value: 0
+ objectReference: {fileID: 0}
+ - target: {fileID: -8679921383154817045, guid: 9925587cfc99e8148bfab9d8b22d9f87, type: 3}
+ propertyPath: m_LocalRotation.z
+ value: -0
+ objectReference: {fileID: 0}
+ - target: {fileID: -8679921383154817045, guid: 9925587cfc99e8148bfab9d8b22d9f87, type: 3}
+ propertyPath: m_LocalEulerAnglesHint.x
+ value: 0
+ objectReference: {fileID: 0}
+ - target: {fileID: -8679921383154817045, guid: 9925587cfc99e8148bfab9d8b22d9f87, type: 3}
+ propertyPath: m_LocalEulerAnglesHint.y
+ value: 0
+ objectReference: {fileID: 0}
+ - target: {fileID: -8679921383154817045, guid: 9925587cfc99e8148bfab9d8b22d9f87, type: 3}
+ propertyPath: m_LocalEulerAnglesHint.z
+ value: 0
+ objectReference: {fileID: 0}
+ - target: {fileID: -7511558181221131132, guid: 9925587cfc99e8148bfab9d8b22d9f87, type: 3}
+ propertyPath: 'm_Materials.Array.data[0]'
+ value:
+ objectReference: {fileID: 2100000, guid: 91e05bbf1e5cbfb4d865c8e2febc4673, type: 2}
+ - target: {fileID: 919132149155446097, guid: 9925587cfc99e8148bfab9d8b22d9f87, type: 3}
+ propertyPath: m_Name
+ value: building_tower_base_blue (3)
+ objectReference: {fileID: 0}
+ m_RemovedComponents: []
+ m_RemovedGameObjects: []
+ m_AddedGameObjects: []
+ m_AddedComponents:
+ - targetCorrespondingSourceObject: {fileID: 919132149155446097, guid: 9925587cfc99e8148bfab9d8b22d9f87, type: 3}
+ insertIndex: -1
+ addedObject: {fileID: 2595926384476268137}
+ m_SourcePrefab: {fileID: 100100000, guid: 9925587cfc99e8148bfab9d8b22d9f87, type: 3}
+--- !u!4 &8478322201674504893 stripped
+Transform:
+ m_CorrespondingSourceObject: {fileID: -8679921383154817045, guid: 9925587cfc99e8148bfab9d8b22d9f87, type: 3}
+ m_PrefabInstance: {fileID: 8224615678257184086}
+ m_PrefabAsset: {fileID: 0}
+--- !u!1 &9143113957751226375 stripped
+GameObject:
+ m_CorrespondingSourceObject: {fileID: 919132149155446097, guid: 9925587cfc99e8148bfab9d8b22d9f87, type: 3}
+ m_PrefabInstance: {fileID: 8224615678257184086}
+ m_PrefabAsset: {fileID: 0}
+--- !u!64 &2595926384476268137
+MeshCollider:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 9143113957751226375}
+ m_Material: {fileID: 0}
+ m_IncludeLayers:
+ serializedVersion: 2
+ m_Bits: 0
+ m_ExcludeLayers:
+ serializedVersion: 2
+ m_Bits: 0
+ m_LayerOverridePriority: 0
+ m_IsTrigger: 0
+ m_ProvidesContacts: 0
+ m_Enabled: 1
+ serializedVersion: 5
+ m_Convex: 1
+ m_CookingOptions: 30
+ m_Mesh: {fileID: 2231612616327559228, guid: 9925587cfc99e8148bfab9d8b22d9f87, type: 3}
diff --git a/Assets/Scenes/GameMain.unity b/Assets/Scenes/GameMain.unity
index e49a08c..17712ee 100644
--- a/Assets/Scenes/GameMain.unity
+++ b/Assets/Scenes/GameMain.unity
@@ -323,7 +323,7 @@ PrefabInstance:
objectReference: {fileID: 0}
- target: {fileID: 2561889291515577528, guid: 04e95700704d92248b63ce5674bd9638, type: 3}
propertyPath: m_LocalPosition.x
- value: -18.5
+ value: -22
objectReference: {fileID: 0}
- target: {fileID: 2561889291515577528, guid: 04e95700704d92248b63ce5674bd9638, type: 3}
propertyPath: m_LocalPosition.y
@@ -375,6 +375,79 @@ Transform:
m_CorrespondingSourceObject: {fileID: 2561889291515577528, guid: 04e95700704d92248b63ce5674bd9638, type: 3}
m_PrefabInstance: {fileID: 324420007}
m_PrefabAsset: {fileID: 0}
+--- !u!1001 &411374357
+PrefabInstance:
+ m_ObjectHideFlags: 0
+ serializedVersion: 2
+ m_Modification:
+ serializedVersion: 3
+ m_TransformParent: {fileID: 8940572951313384067}
+ m_Modifications:
+ - target: {fileID: -8679921383154817045, guid: 0402c4b1e07c04444b61bea1d63d7880, type: 3}
+ propertyPath: m_LocalScale.x
+ value: 5
+ objectReference: {fileID: 0}
+ - target: {fileID: -8679921383154817045, guid: 0402c4b1e07c04444b61bea1d63d7880, type: 3}
+ propertyPath: m_LocalScale.y
+ value: 5
+ objectReference: {fileID: 0}
+ - target: {fileID: -8679921383154817045, guid: 0402c4b1e07c04444b61bea1d63d7880, type: 3}
+ propertyPath: m_LocalScale.z
+ value: 5
+ objectReference: {fileID: 0}
+ - target: {fileID: -8679921383154817045, guid: 0402c4b1e07c04444b61bea1d63d7880, type: 3}
+ propertyPath: m_LocalPosition.x
+ value: 0
+ objectReference: {fileID: 0}
+ - target: {fileID: -8679921383154817045, guid: 0402c4b1e07c04444b61bea1d63d7880, type: 3}
+ propertyPath: m_LocalPosition.y
+ value: 0
+ objectReference: {fileID: 0}
+ - target: {fileID: -8679921383154817045, guid: 0402c4b1e07c04444b61bea1d63d7880, type: 3}
+ propertyPath: m_LocalPosition.z
+ value: 0
+ objectReference: {fileID: 0}
+ - target: {fileID: -8679921383154817045, guid: 0402c4b1e07c04444b61bea1d63d7880, type: 3}
+ propertyPath: m_LocalRotation.w
+ value: 1
+ objectReference: {fileID: 0}
+ - target: {fileID: -8679921383154817045, guid: 0402c4b1e07c04444b61bea1d63d7880, type: 3}
+ propertyPath: m_LocalRotation.x
+ value: 0.00000008146034
+ objectReference: {fileID: 0}
+ - target: {fileID: -8679921383154817045, guid: 0402c4b1e07c04444b61bea1d63d7880, type: 3}
+ propertyPath: m_LocalRotation.y
+ value: 0
+ objectReference: {fileID: 0}
+ - target: {fileID: -8679921383154817045, guid: 0402c4b1e07c04444b61bea1d63d7880, type: 3}
+ propertyPath: m_LocalRotation.z
+ value: -0
+ objectReference: {fileID: 0}
+ - target: {fileID: -8679921383154817045, guid: 0402c4b1e07c04444b61bea1d63d7880, type: 3}
+ propertyPath: m_LocalEulerAnglesHint.x
+ value: 0
+ objectReference: {fileID: 0}
+ - target: {fileID: -8679921383154817045, guid: 0402c4b1e07c04444b61bea1d63d7880, type: 3}
+ propertyPath: m_LocalEulerAnglesHint.y
+ value: 0
+ objectReference: {fileID: 0}
+ - target: {fileID: -8679921383154817045, guid: 0402c4b1e07c04444b61bea1d63d7880, type: 3}
+ propertyPath: m_LocalEulerAnglesHint.z
+ value: 0
+ objectReference: {fileID: 0}
+ - target: {fileID: -7511558181221131132, guid: 0402c4b1e07c04444b61bea1d63d7880, type: 3}
+ propertyPath: 'm_Materials.Array.data[0]'
+ value:
+ objectReference: {fileID: 2100000, guid: 91e05bbf1e5cbfb4d865c8e2febc4673, type: 2}
+ - target: {fileID: 919132149155446097, guid: 0402c4b1e07c04444b61bea1d63d7880, type: 3}
+ propertyPath: m_Name
+ value: building_castle_blue
+ objectReference: {fileID: 0}
+ m_RemovedComponents: []
+ m_RemovedGameObjects: []
+ m_AddedGameObjects: []
+ m_AddedComponents: []
+ m_SourcePrefab: {fileID: 100100000, guid: 0402c4b1e07c04444b61bea1d63d7880, type: 3}
--- !u!1 &447015514
GameObject:
m_ObjectHideFlags: 0
@@ -805,7 +878,7 @@ PrefabInstance:
objectReference: {fileID: 0}
- target: {fileID: 2561889291515577528, guid: 04e95700704d92248b63ce5674bd9638, type: 3}
propertyPath: m_LocalPosition.x
- value: 11
+ value: 10
objectReference: {fileID: 0}
- target: {fileID: 2561889291515577528, guid: 04e95700704d92248b63ce5674bd9638, type: 3}
propertyPath: m_LocalPosition.y
@@ -857,6 +930,11 @@ Transform:
m_CorrespondingSourceObject: {fileID: 2561889291515577528, guid: 04e95700704d92248b63ce5674bd9638, type: 3}
m_PrefabInstance: {fileID: 635112512}
m_PrefabAsset: {fileID: 0}
+--- !u!4 &702452987 stripped
+Transform:
+ m_CorrespondingSourceObject: {fileID: -8679921383154817045, guid: 0402c4b1e07c04444b61bea1d63d7880, type: 3}
+ m_PrefabInstance: {fileID: 411374357}
+ m_PrefabAsset: {fileID: 0}
--- !u!1 &782070680
GameObject:
m_ObjectHideFlags: 0
@@ -1598,6 +1676,7 @@ MonoBehaviour:
m_Bits: 64
availableBuildings:
- {fileID: 11400000, guid: 23c12a82ea534b34299700b86fffd524, type: 2}
+ foundationPrefab: {fileID: 1340458267086560577, guid: d20c3ce6a3c39154aa033d0f61bd9a4d, type: 3}
--- !u!4 &1199559224
Transform:
m_ObjectHideFlags: 0
@@ -1713,7 +1792,7 @@ MonoBehaviour:
m_DisconnectTimeoutMS: 30000
ConnectionData:
Address: 127.0.0.1
- Port: 7785
+ Port: 7790
ServerListenAddress: 127.0.0.1
ClientBindPort: 0
DebugSimulator:
@@ -1753,7 +1832,7 @@ PrefabInstance:
objectReference: {fileID: 0}
- target: {fileID: 2561889291515577528, guid: 04e95700704d92248b63ce5674bd9638, type: 3}
propertyPath: m_LocalPosition.x
- value: -29.3
+ value: -38
objectReference: {fileID: 0}
- target: {fileID: 2561889291515577528, guid: 04e95700704d92248b63ce5674bd9638, type: 3}
propertyPath: m_LocalPosition.y
@@ -2148,6 +2227,10 @@ PrefabInstance:
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
+ - target: {fileID: -7511558181221131132, guid: 19ca9afdd7bb3a64c9036c18e8cee5f2, type: 3}
+ propertyPath: 'm_Materials.Array.data[0]'
+ value:
+ objectReference: {fileID: 2100000, guid: d64c307f1b4197c44970c29f9845c245, type: 2}
- target: {fileID: 919132149155446097, guid: 19ca9afdd7bb3a64c9036c18e8cee5f2, type: 3}
propertyPath: m_Name
value: Primitive_Floor
@@ -2167,6 +2250,75 @@ PrefabInstance:
insertIndex: -1
addedObject: {fileID: 985764489}
m_SourcePrefab: {fileID: 100100000, guid: 19ca9afdd7bb3a64c9036c18e8cee5f2, type: 3}
+--- !u!1001 &2002721658
+PrefabInstance:
+ m_ObjectHideFlags: 0
+ serializedVersion: 2
+ m_Modification:
+ serializedVersion: 3
+ m_TransformParent: {fileID: 0}
+ m_Modifications:
+ - target: {fileID: 320439620877427584, guid: d20c3ce6a3c39154aa033d0f61bd9a4d, type: 3}
+ propertyPath: m_LocalPosition.x
+ value: 0
+ objectReference: {fileID: 0}
+ - target: {fileID: 320439620877427584, guid: d20c3ce6a3c39154aa033d0f61bd9a4d, type: 3}
+ propertyPath: m_LocalPosition.y
+ value: 0
+ objectReference: {fileID: 0}
+ - target: {fileID: 320439620877427584, guid: d20c3ce6a3c39154aa033d0f61bd9a4d, type: 3}
+ propertyPath: m_LocalPosition.z
+ value: 0
+ objectReference: {fileID: 0}
+ - target: {fileID: 320439620877427584, guid: d20c3ce6a3c39154aa033d0f61bd9a4d, type: 3}
+ propertyPath: m_LocalRotation.w
+ value: 1
+ objectReference: {fileID: 0}
+ - target: {fileID: 320439620877427584, guid: d20c3ce6a3c39154aa033d0f61bd9a4d, type: 3}
+ propertyPath: m_LocalRotation.x
+ value: 0
+ objectReference: {fileID: 0}
+ - target: {fileID: 320439620877427584, guid: d20c3ce6a3c39154aa033d0f61bd9a4d, type: 3}
+ propertyPath: m_LocalRotation.y
+ value: 0
+ objectReference: {fileID: 0}
+ - target: {fileID: 320439620877427584, guid: d20c3ce6a3c39154aa033d0f61bd9a4d, type: 3}
+ propertyPath: m_LocalRotation.z
+ value: 0
+ objectReference: {fileID: 0}
+ - target: {fileID: 320439620877427584, guid: d20c3ce6a3c39154aa033d0f61bd9a4d, type: 3}
+ propertyPath: m_LocalEulerAnglesHint.x
+ value: 0
+ objectReference: {fileID: 0}
+ - target: {fileID: 320439620877427584, guid: d20c3ce6a3c39154aa033d0f61bd9a4d, type: 3}
+ propertyPath: m_LocalEulerAnglesHint.y
+ value: 0
+ objectReference: {fileID: 0}
+ - target: {fileID: 320439620877427584, guid: d20c3ce6a3c39154aa033d0f61bd9a4d, type: 3}
+ propertyPath: m_LocalEulerAnglesHint.z
+ value: 0
+ objectReference: {fileID: 0}
+ - target: {fileID: 1340458267086560577, guid: d20c3ce6a3c39154aa033d0f61bd9a4d, type: 3}
+ propertyPath: m_Name
+ value: BuildingFoundation
+ objectReference: {fileID: 0}
+ - target: {fileID: 1340458267086560577, guid: d20c3ce6a3c39154aa033d0f61bd9a4d, type: 3}
+ propertyPath: m_Layer
+ value: 7
+ objectReference: {fileID: 0}
+ - target: {fileID: 2851644658348875061, guid: d20c3ce6a3c39154aa033d0f61bd9a4d, type: 3}
+ propertyPath: m_Layer
+ value: 7
+ objectReference: {fileID: 0}
+ - target: {fileID: 7934051929434515110, guid: d20c3ce6a3c39154aa033d0f61bd9a4d, type: 3}
+ propertyPath: GlobalObjectIdHash
+ value: 1879467101
+ objectReference: {fileID: 0}
+ m_RemovedComponents: []
+ m_RemovedGameObjects: []
+ m_AddedGameObjects: []
+ m_AddedComponents: []
+ m_SourcePrefab: {fileID: 100100000, guid: d20c3ce6a3c39154aa033d0f61bd9a4d, type: 3}
--- !u!1001 &2098115307
PrefabInstance:
m_ObjectHideFlags: 0
@@ -2253,18 +2405,6 @@ PrefabInstance:
propertyPath: GlobalObjectIdHash
value: 3777549664
objectReference: {fileID: 0}
- - target: {fileID: 2373278897370620787, guid: c92c9f1bf0ae6364f85409ecdc4aeaf3, type: 3}
- propertyPath: m_Center.x
- value: 0
- objectReference: {fileID: 0}
- - target: {fileID: 2373278897370620787, guid: c92c9f1bf0ae6364f85409ecdc4aeaf3, type: 3}
- propertyPath: m_Center.y
- value: 0
- objectReference: {fileID: 0}
- - target: {fileID: 2373278897370620787, guid: c92c9f1bf0ae6364f85409ecdc4aeaf3, type: 3}
- propertyPath: m_Center.z
- value: 0
- objectReference: {fileID: 0}
- target: {fileID: 4475204424913733113, guid: c92c9f1bf0ae6364f85409ecdc4aeaf3, type: 3}
propertyPath: m_LocalPosition.x
value: -20
@@ -2387,6 +2527,10 @@ PrefabInstance:
serializedVersion: 3
m_TransformParent: {fileID: 0}
m_Modifications:
+ - target: {fileID: 993863006843805547, guid: e56926eda34629f4fbf3e4c53f0f8bd4, type: 3}
+ propertyPath: 'm_Materials.Array.data[0]'
+ value:
+ objectReference: {fileID: 2100000, guid: d64c307f1b4197c44970c29f9845c245, type: 2}
- target: {fileID: 5173262576415873253, guid: e56926eda34629f4fbf3e4c53f0f8bd4, type: 3}
propertyPath: GlobalObjectIdHash
value: 3998537868
@@ -2435,10 +2579,18 @@ PrefabInstance:
propertyPath: m_Name
value: Core
objectReference: {fileID: 0}
- m_RemovedComponents: []
- m_RemovedGameObjects: []
- m_AddedGameObjects: []
- m_AddedComponents: []
+ m_RemovedComponents:
+ - {fileID: 5613501924847776270, guid: e56926eda34629f4fbf3e4c53f0f8bd4, type: 3}
+ m_RemovedGameObjects:
+ - {fileID: 1642148463057321662, guid: e56926eda34629f4fbf3e4c53f0f8bd4, type: 3}
+ m_AddedGameObjects:
+ - targetCorrespondingSourceObject: {fileID: 8064559726283331702, guid: e56926eda34629f4fbf3e4c53f0f8bd4, type: 3}
+ insertIndex: -1
+ addedObject: {fileID: 702452987}
+ m_AddedComponents:
+ - targetCorrespondingSourceObject: {fileID: 8124290768227340041, guid: e56926eda34629f4fbf3e4c53f0f8bd4, type: 3}
+ insertIndex: -1
+ addedObject: {fileID: 8940572951313384070}
m_SourcePrefab: {fileID: 100100000, guid: e56926eda34629f4fbf3e4c53f0f8bd4, type: 3}
--- !u!1001 &4875211098963642791
PrefabInstance:
@@ -2513,13 +2665,9 @@ PrefabInstance:
propertyPath: GlobalObjectIdHash
value: 2997679665
objectReference: {fileID: 0}
- - target: {fileID: 1591641544412467547, guid: 04e95700704d92248b63ce5674bd9638, type: 3}
- propertyPath: InScenePlacedSourceGlobalObjectIdHash
- value: 2718147317
- objectReference: {fileID: 0}
- target: {fileID: 2561889291515577528, guid: 04e95700704d92248b63ce5674bd9638, type: 3}
propertyPath: m_LocalPosition.x
- value: -8
+ value: -6
objectReference: {fileID: 0}
- target: {fileID: 2561889291515577528, guid: 04e95700704d92248b63ce5674bd9638, type: 3}
propertyPath: m_LocalPosition.y
@@ -2561,12 +2709,7 @@ PrefabInstance:
propertyPath: m_Name
value: Wall
objectReference: {fileID: 0}
- - target: {fileID: 2938167817760513538, guid: 04e95700704d92248b63ce5674bd9638, type: 3}
- propertyPath: m_Layer
- value: 9
- objectReference: {fileID: 0}
- m_RemovedComponents:
- - {fileID: 1638952835164862066, guid: 04e95700704d92248b63ce5674bd9638, type: 3}
+ m_RemovedComponents: []
m_RemovedGameObjects: []
m_AddedGameObjects: []
m_AddedComponents: []
@@ -2591,6 +2734,10 @@ PrefabInstance:
propertyPath: InScenePlacedSourceGlobalObjectIdHash
value: 1908952169
objectReference: {fileID: 0}
+ - target: {fileID: 6000478156043235415, guid: 8c45964a69bf8fa4ba461ed217bc052f, type: 3}
+ propertyPath: 'm_Materials.Array.data[0]'
+ value:
+ objectReference: {fileID: 2100000, guid: 726c1e9087356f74594664341c681f12, type: 2}
- target: {fileID: 8174164215098746841, guid: 8c45964a69bf8fa4ba461ed217bc052f, type: 3}
propertyPath: m_LocalPosition.x
value: -16.30842
@@ -2601,7 +2748,7 @@ PrefabInstance:
objectReference: {fileID: 0}
- target: {fileID: 8174164215098746841, guid: 8c45964a69bf8fa4ba461ed217bc052f, type: 3}
propertyPath: m_LocalPosition.z
- value: -49.26
+ value: -83.46
objectReference: {fileID: 0}
- target: {fileID: 8174164215098746841, guid: 8c45964a69bf8fa4ba461ed217bc052f, type: 3}
propertyPath: m_LocalRotation.w
@@ -2636,17 +2783,48 @@ PrefabInstance:
m_AddedGameObjects: []
m_AddedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 8c45964a69bf8fa4ba461ed217bc052f, type: 3}
+--- !u!1 &8940572951313384064 stripped
+GameObject:
+ m_CorrespondingSourceObject: {fileID: 8124290768227340041, guid: e56926eda34629f4fbf3e4c53f0f8bd4, type: 3}
+ m_PrefabInstance: {fileID: 4786254629656932894}
+ m_PrefabAsset: {fileID: 0}
--- !u!114 &8940572951313384066 stripped
MonoBehaviour:
m_CorrespondingSourceObject: {fileID: 1287070985890992582, guid: e56926eda34629f4fbf3e4c53f0f8bd4, type: 3}
m_PrefabInstance: {fileID: 4786254629656932894}
m_PrefabAsset: {fileID: 0}
- m_GameObject: {fileID: 0}
+ m_GameObject: {fileID: 8940572951313384064}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 7c94274e2af2c8d4f827fe52b26c4410, type: 3}
m_Name:
m_EditorClassIdentifier: Assembly-CSharp::Northbound.Core
+--- !u!4 &8940572951313384067 stripped
+Transform:
+ m_CorrespondingSourceObject: {fileID: 8064559726283331702, guid: e56926eda34629f4fbf3e4c53f0f8bd4, type: 3}
+ m_PrefabInstance: {fileID: 4786254629656932894}
+ m_PrefabAsset: {fileID: 0}
+--- !u!65 &8940572951313384070
+BoxCollider:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 8940572951313384064}
+ m_Material: {fileID: 0}
+ m_IncludeLayers:
+ serializedVersion: 2
+ m_Bits: 0
+ m_ExcludeLayers:
+ serializedVersion: 2
+ m_Bits: 0
+ m_LayerOverridePriority: 0
+ m_IsTrigger: 0
+ m_ProvidesContacts: 0
+ m_Enabled: 1
+ serializedVersion: 3
+ m_Size: {x: 10, y: 10, z: 10}
+ m_Center: {x: 0, y: 5, z: 0}
--- !u!1660057539 &9223372036854775807
SceneRoots:
m_ObjectHideFlags: 0
@@ -2668,3 +2846,4 @@ SceneRoots:
- {fileID: 1701756768}
- {fileID: 2264374033617737844}
- {fileID: 8643576426840390656}
+ - {fileID: 2002721658}
diff --git a/Assets/Scripts/BuildingData.cs b/Assets/Scripts/BuildingData.cs
index 723f9bd..3dde479 100644
--- a/Assets/Scripts/BuildingData.cs
+++ b/Assets/Scripts/BuildingData.cs
@@ -23,6 +23,18 @@ namespace Northbound
[Tooltip("Can rotate this building?")]
public bool allowRotation = true;
+ [Header("Construction Settings")]
+ [Tooltip("건설 완료에 필요한 총 작업량")]
+ public float requiredWorkAmount = 100f;
+ [Tooltip("1회 상호작용당 작업량")]
+ public float workPerInteraction = 10f;
+ [Tooltip("상호작용 쿨다운 (초)")]
+ public float interactionCooldown = 1f;
+ [Tooltip("건설 시 플레이어가 재생할 애니메이션 트리거 (예: Build, Hammer, Construct)")]
+ public string constructionAnimationTrigger = "Build";
+ [Tooltip("건설 시 사용할 도구 (선택사항)")]
+ public InteractionEquipmentData constructionEquipment;
+
[Header("Health Settings")]
[Tooltip("Maximum health of the building")]
public int maxHealth = 100;
diff --git a/Assets/Scripts/BuildingFoundation.cs b/Assets/Scripts/BuildingFoundation.cs
new file mode 100644
index 0000000..5ea1d0b
--- /dev/null
+++ b/Assets/Scripts/BuildingFoundation.cs
@@ -0,0 +1,353 @@
+using System;
+using Unity.Netcode;
+using UnityEngine;
+
+namespace Northbound
+{
+ ///
+ /// 건물 토대 - 플레이어가 상호작용하여 건물을 완성시킴
+ ///
+ public class BuildingFoundation : NetworkBehaviour, IInteractable, ITeamMember
+ {
+ [Header("Building Info")]
+ public BuildingData buildingData;
+ public Vector3Int gridPosition;
+ public int rotation;
+
+ [Header("Visual")]
+ public GameObject foundationVisual;
+ public GameObject progressBarPrefab;
+
+ // 현재 건설 진행도
+ private NetworkVariable _currentProgress = new NetworkVariable(
+ 0f,
+ NetworkVariableReadPermission.Everyone,
+ NetworkVariableWritePermission.Server
+ );
+
+ // 건물 소유자
+ private NetworkVariable _ownerId = new NetworkVariable(
+ 0,
+ NetworkVariableReadPermission.Everyone,
+ NetworkVariableWritePermission.Server
+ );
+
+ // 팀
+ private NetworkVariable _team = new NetworkVariable(
+ TeamType.Neutral,
+ NetworkVariableReadPermission.Everyone,
+ NetworkVariableWritePermission.Server
+ );
+
+ // 이벤트
+ public event Action OnProgressChanged; // (current, max)
+ public event Action OnConstructionComplete;
+
+ private GameObject _progressBarInstance;
+ private float _lastInteractionTime;
+ private BoxCollider _collider;
+
+ public ulong OwnerId => _ownerId.Value;
+
+ public override void OnNetworkSpawn()
+ {
+ base.OnNetworkSpawn();
+
+ _currentProgress.OnValueChanged += OnProgressValueChanged;
+
+ // 진행 UI 생성
+ if (progressBarPrefab != null)
+ {
+ _progressBarInstance = Instantiate(progressBarPrefab, transform);
+ UpdateProgressBar();
+ }
+ }
+
+ public override void OnNetworkDespawn()
+ {
+ _currentProgress.OnValueChanged -= OnProgressValueChanged;
+
+ base.OnNetworkDespawn();
+ }
+
+ ///
+ /// 토대 초기화
+ ///
+ public void Initialize(BuildingData data, Vector3Int pos, int rot, ulong ownerId, TeamType team)
+ {
+ if (!IsServer) return;
+
+ buildingData = data;
+ gridPosition = pos;
+ rotation = rot;
+ _ownerId.Value = ownerId;
+ _team.Value = team;
+ _currentProgress.Value = 0f;
+
+ // BuildingData의 크기를 기반으로 스케일 설정
+ Vector3 size = data.GetSize(rot);
+
+ // foundationVisual의 스케일만 조정 (토대 자체의 pivot은 중앙에 유지)
+ if (foundationVisual != null)
+ {
+ // 토대 비주얼을 건물 크기에 맞게 조정 (높이는 얇게)
+ foundationVisual.transform.localScale = new Vector3(size.x, 0.2f, size.z);
+ foundationVisual.transform.localPosition = new Vector3(0, 0.1f, 0); // 바닥에서 약간 위
+ }
+
+ // BoxCollider 추가 및 크기 설정 (상호작용용)
+ _collider = GetComponent();
+ if (_collider == null)
+ {
+ _collider = gameObject.AddComponent();
+ }
+
+ // 상호작용 가능한 크기로 설정 (전체 건물 높이가 아닌 접근 가능한 크기)
+ _collider.size = new Vector3(size.x, 2f, size.z); // 높이를 2m로 설정하여 상호작용 가능
+ _collider.center = new Vector3(0, 1f, 0); // 중심을 1m 높이에 배치
+ _collider.isTrigger = false; // Trigger가 아닌 일반 Collider로 설정
+
+ Debug.Log($"[BuildingFoundation] 토대 생성: {data.buildingName}, 크기: {size}, 위치: {transform.position}, Collider: {_collider.size}, 소유자: {ownerId}, 팀: {team}");
+ }
+
+ ///
+ /// 토대의 그리드 경계 가져오기 (BuildingManager의 충돌 체크용)
+ ///
+ public Bounds GetGridBounds()
+ {
+ if (buildingData == null)
+ return new Bounds(transform.position, Vector3.one);
+
+ Vector3 size = buildingData.GetSize(rotation);
+ // 토대의 위치를 중심으로 건물이 차지할 공간 반환
+ return new Bounds(transform.position + Vector3.up * size.y * 0.5f, size);
+ }
+
+ #region IInteractable Implementation
+
+ public bool CanInteract(ulong playerId)
+ {
+ if (buildingData == null)
+ {
+ Debug.LogWarning($"[BuildingFoundation] buildingData is null");
+ return false;
+ }
+
+ // 쿨다운 체크
+ if (Time.time - _lastInteractionTime < buildingData.interactionCooldown)
+ {
+ Debug.Log($"[BuildingFoundation] Cooldown active: {Time.time - _lastInteractionTime}/{buildingData.interactionCooldown}");
+ return false;
+ }
+
+ // 이미 완성됨
+ if (_currentProgress.Value >= buildingData.requiredWorkAmount)
+ {
+ Debug.Log($"[BuildingFoundation] Already completed");
+ return false;
+ }
+
+ // 같은 팀만 건설 가능 - 플레이어의 팀을 가져와서 비교
+ TeamType playerTeam = GetPlayerTeam(playerId);
+ if (playerTeam != _team.Value)
+ {
+ Debug.LogWarning($"[BuildingFoundation] Wrong team: player={playerTeam}, foundation={_team.Value}");
+ return false;
+ }
+
+ Debug.Log($"[BuildingFoundation] CanInteract = true");
+ return true;
+ }
+
+ public void Interact(ulong playerId)
+ {
+ if (!IsServer || buildingData == null) return;
+
+ if (!CanInteract(playerId))
+ return;
+
+ _lastInteractionTime = Time.time;
+
+ // 건설 진행
+ _currentProgress.Value += buildingData.workPerInteraction;
+
+ Debug.Log($"[BuildingFoundation] 건설 진행: {_currentProgress.Value}/{buildingData.requiredWorkAmount} ({(_currentProgress.Value / buildingData.requiredWorkAmount * 100f):F1}%)");
+
+ // 완성 체크
+ if (_currentProgress.Value >= buildingData.requiredWorkAmount)
+ {
+ CompleteConstruction();
+ }
+ }
+
+ public string GetInteractionPrompt()
+ {
+ if (buildingData == null)
+ return "[E] 건설하기";
+
+ float percentage = (_currentProgress.Value / buildingData.requiredWorkAmount) * 100f;
+ return $"[E] 건설하기 ({percentage:F0}%)";
+ }
+
+ public string GetInteractionAnimation()
+ {
+ // BuildingData에서 애니메이션 트리거 가져오기
+ if (buildingData != null && !string.IsNullOrEmpty(buildingData.constructionAnimationTrigger))
+ {
+ return buildingData.constructionAnimationTrigger;
+ }
+
+ // 기본값: 빈 문자열 (애니메이션 없음)
+ return "";
+ }
+
+ public InteractionEquipmentData GetEquipmentData()
+ {
+ // BuildingData에 건설 도구가 정의되어 있으면 반환
+ if (buildingData != null && buildingData.constructionEquipment != null)
+ {
+ return buildingData.constructionEquipment;
+ }
+
+ return null; // 특별한 도구 불필요
+ }
+
+ public Transform GetTransform()
+ {
+ return transform;
+ }
+
+ #endregion
+
+ #region ITeamMember Implementation
+
+ public TeamType GetTeam()
+ {
+ return _team.Value;
+ }
+
+ public void SetTeam(TeamType team)
+ {
+ if (!IsServer) return;
+ _team.Value = team;
+ }
+
+ #endregion
+
+ ///
+ /// 플레이어의 팀 가져오기
+ ///
+ private TeamType GetPlayerTeam(ulong playerId)
+ {
+ // 플레이어의 NetworkObject 찾기
+ if (NetworkManager.Singleton != null && NetworkManager.Singleton.SpawnManager != null)
+ {
+ if (NetworkManager.Singleton.SpawnManager.SpawnedObjects.TryGetValue(playerId, out NetworkObject playerNetObj))
+ {
+ var teamMember = playerNetObj.GetComponent();
+ if (teamMember != null)
+ {
+ return teamMember.GetTeam();
+ }
+ }
+ }
+
+ // 기본값: 플레이어 팀
+ return TeamType.Player;
+ }
+
+ private void CompleteConstruction()
+ {
+ if (!IsServer) return;
+
+ Debug.Log($"[BuildingFoundation] 건물 완성! {buildingData.buildingName}");
+
+ OnConstructionComplete?.Invoke();
+
+ // BuildingManager에서 토대 제거
+ var buildingManager = BuildingManager.Instance;
+ if (buildingManager != null)
+ {
+ buildingManager.RemoveFoundation(this);
+ }
+
+ // 완성된 건물 생성
+ SpawnCompletedBuilding();
+
+ // 토대 제거
+ if (NetworkObject != null)
+ {
+ NetworkObject.Despawn(true);
+ }
+ }
+
+ private void SpawnCompletedBuilding()
+ {
+ if (!IsServer || buildingData == null || buildingData.prefab == null)
+ return;
+
+ // BuildingManager를 통해 건물 생성
+ var buildingManager = BuildingManager.Instance;
+ if (buildingManager != null)
+ {
+ buildingManager.SpawnCompletedBuildingServerRpc(
+ buildingData.name,
+ gridPosition,
+ rotation,
+ _ownerId.Value,
+ _team.Value
+ );
+ }
+ else
+ {
+ Debug.LogError("[BuildingFoundation] BuildingManager를 찾을 수 없습니다!");
+ }
+ }
+
+ private void OnProgressValueChanged(float oldValue, float newValue)
+ {
+ if (buildingData != null)
+ {
+ OnProgressChanged?.Invoke(newValue, buildingData.requiredWorkAmount);
+ }
+ UpdateProgressBar();
+ }
+
+ private void UpdateProgressBar()
+ {
+ if (_progressBarInstance == null || buildingData == null) return;
+
+ // 진행바 UI 업데이트 (BuildingHealthBar와 유사한 구조 사용 가능)
+ var progressBar = _progressBarInstance.GetComponent();
+ if (progressBar != null)
+ {
+ // BuildingHealthBar를 재사용하여 진행도 표시
+ progressBar.UpdateHealth((int)_currentProgress.Value, (int)buildingData.requiredWorkAmount);
+ }
+ }
+
+ private void OnDrawGizmos()
+ {
+ if (buildingData == null) return;
+
+ // 건물 경계 표시 (노란색)
+ Gizmos.color = Color.yellow;
+ Vector3 size = buildingData.GetSize(rotation);
+ Gizmos.DrawWireCube(transform.position + Vector3.up * size.y * 0.5f, size);
+
+ // Collider 경계 표시 (초록색)
+ if (_collider != null)
+ {
+ Gizmos.color = Color.green;
+ Gizmos.DrawWireCube(transform.position + _collider.center, _collider.size);
+ }
+
+ // 상호작용 가능 여부 표시
+ if (_currentProgress.Value < (buildingData?.requiredWorkAmount ?? 100f))
+ {
+ Gizmos.color = Color.cyan;
+ Gizmos.DrawSphere(transform.position + Vector3.up, 0.3f);
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/Assets/Scripts/BuildingFoundation.cs.meta b/Assets/Scripts/BuildingFoundation.cs.meta
new file mode 100644
index 0000000..8b7258c
--- /dev/null
+++ b/Assets/Scripts/BuildingFoundation.cs.meta
@@ -0,0 +1,2 @@
+fileFormatVersion: 2
+guid: cad87caf8c43a4b41911ae978c10ae0e
\ No newline at end of file
diff --git a/Assets/Scripts/BuildingManager.cs b/Assets/Scripts/BuildingManager.cs
index a083cb3..eacdb03 100644
--- a/Assets/Scripts/BuildingManager.cs
+++ b/Assets/Scripts/BuildingManager.cs
@@ -15,7 +15,11 @@ namespace Northbound
[Header("Building Database")]
public List availableBuildings = new List();
+ [Header("Foundation Settings")]
+ public GameObject foundationPrefab; // 토대 프리팹 (Inspector에서 할당)
+
private List placedBuildings = new List();
+ private List placedFoundations = new List();
private void Awake()
{
@@ -70,11 +74,18 @@ namespace Northbound
// Overlap check using GRID SIZE from BuildingData (not actual colliders)
Vector3 gridSize = data.GetSize(rotation);
+ // 프리팹의 실제 배치 위치 계산 (placementOffset 포함)
+ Vector3 actualBuildingPosition = snappedPosition + data.placementOffset;
+
+ // Bounds의 중심을 실제 건물/토대 위치를 기준으로 계산
+ Vector3 boundsCenter = actualBuildingPosition + Vector3.up * gridSize.y * 0.5f;
+
// Shrink bounds slightly to allow buildings to touch without overlapping
// This prevents Bounds.Intersects() from returning true for adjacent buildings
Vector3 shrunkSize = gridSize - Vector3.one * 0.01f;
- Bounds checkBounds = new Bounds(snappedPosition + Vector3.up * gridSize.y * 0.5f, shrunkSize);
+ Bounds checkBounds = new Bounds(boundsCenter, shrunkSize);
+ // 기존 건물과의 충돌 체크
foreach (var building in placedBuildings)
{
if (building == null) continue;
@@ -86,6 +97,17 @@ namespace Northbound
return false;
}
+ // 토대와의 충돌 체크
+ foreach (var foundation in placedFoundations)
+ {
+ if (foundation == null) continue;
+
+ Bounds foundationGridBounds = foundation.GetGridBounds();
+
+ if (checkBounds.Intersects(foundationGridBounds))
+ return false;
+ }
+
return true;
}
@@ -96,6 +118,7 @@ namespace Northbound
public Bounds GetPlacementBounds(BuildingData data, Vector3 position, int rotation)
{
Vector3 gridSize = data.GetSize(rotation);
+ // position은 이미 placementOffset이 적용된 위치
return new Bounds(position + Vector3.up * gridSize.y * 0.5f, gridSize);
}
@@ -200,6 +223,18 @@ namespace Northbound
}
}
+ ///
+ /// 토대 제거 (건설 완료 또는 취소 시)
+ ///
+ public void RemoveFoundation(BuildingFoundation foundation)
+ {
+ if (placedFoundations.Contains(foundation))
+ {
+ placedFoundations.Remove(foundation);
+ Debug.Log($"[BuildingManager] 토대 제거됨: {foundation.buildingData?.buildingName ?? "Unknown"}");
+ }
+ }
+
///
/// 사전 배치 건물 등록 (씬에 미리 있는 건물용)
///
@@ -244,5 +279,158 @@ namespace Northbound
return ownedBuildings;
}
+
+ ///
+ /// 건물 토대 배치 요청 (클라이언트에서 호출)
+ ///
+ public void RequestPlaceFoundation(int buildingIndex, Vector3 position, int rotation)
+ {
+ if (!NetworkManager.Singleton.IsClient)
+ {
+ Debug.LogWarning("[BuildingManager] 클라이언트가 아닙니다.");
+ return;
+ }
+
+ ulong clientId = NetworkManager.Singleton.LocalClientId;
+ PlaceFoundationServerRpc(buildingIndex, position, rotation, clientId);
+ }
+
+ [Rpc(SendTo.Server, InvokePermission = RpcInvokePermission.Everyone)]
+ private void PlaceFoundationServerRpc(int buildingIndex, Vector3 position, int rotation, ulong requestingClientId)
+ {
+ // 보안 검증 1: 유효한 클라이언트인지 확인
+ if (!NetworkManager.Singleton.ConnectedClients.ContainsKey(requestingClientId))
+ {
+ Debug.LogWarning($"[BuildingManager] 유효하지 않은 클라이언트 ID: {requestingClientId}");
+ return;
+ }
+
+ // 보안 검증 2: 건물 인덱스 유효성 확인
+ if (buildingIndex < 0 || buildingIndex >= availableBuildings.Count)
+ {
+ Debug.LogWarning($"[BuildingManager] 유효하지 않은 건물 인덱스: {buildingIndex}");
+ return;
+ }
+
+ BuildingData data = availableBuildings[buildingIndex];
+
+ // 보안 검증 3: 건물 데이터 유효성 확인
+ if (data == null)
+ {
+ Debug.LogWarning($"[BuildingManager] 건물 데이터가 유효하지 않습니다.");
+ return;
+ }
+
+ // 토대 프리팹 확인
+ if (foundationPrefab == null)
+ {
+ Debug.LogError("[BuildingManager] foundationPrefab이 설정되지 않았습니다!");
+ return;
+ }
+
+ // 배치 가능 여부 확인
+ if (!IsValidPlacement(data, position, rotation, out Vector3 snappedPosition))
+ {
+ Debug.LogWarning($"[BuildingManager] 토대 배치 불가능 위치");
+ return;
+ }
+
+ Vector3Int gridPosition = WorldToGrid(snappedPosition);
+
+ // 플레이어 팀 가져오기
+ TeamType playerTeam = GetPlayerTeam(requestingClientId);
+
+ // 토대 생성
+ GameObject foundationObj = Instantiate(foundationPrefab, snappedPosition + data.placementOffset, Quaternion.Euler(0, rotation * 90f, 0));
+ NetworkObject netObj = foundationObj.GetComponent();
+
+ if (netObj != null)
+ {
+ netObj.SpawnWithOwnership(requestingClientId);
+
+ BuildingFoundation foundation = foundationObj.GetComponent();
+ if (foundation != null)
+ {
+ foundation.Initialize(data, gridPosition, rotation, requestingClientId, playerTeam);
+ placedFoundations.Add(foundation); // 토대 목록에 추가
+ Debug.Log($"[BuildingManager] {data.buildingName} 토대 생성 (소유자: {requestingClientId}, 위치: {gridPosition})");
+ }
+ else
+ {
+ Debug.LogError("[BuildingManager] BuildingFoundation 컴포넌트가 없습니다!");
+ netObj.Despawn(true);
+ }
+ }
+ else
+ {
+ Debug.LogError("[BuildingManager] NetworkObject 컴포넌트가 없습니다!");
+ Destroy(foundationObj);
+ }
+ }
+
+ ///
+ /// 플레이어의 팀 가져오기
+ ///
+ private TeamType GetPlayerTeam(ulong playerId)
+ {
+ // 플레이어의 NetworkObject 찾기
+ if (NetworkManager.Singleton != null && NetworkManager.Singleton.SpawnManager != null)
+ {
+ if (NetworkManager.Singleton.SpawnManager.SpawnedObjects.TryGetValue(playerId, out NetworkObject playerNetObj))
+ {
+ var teamMember = playerNetObj.GetComponent();
+ if (teamMember != null)
+ {
+ return teamMember.GetTeam();
+ }
+ }
+ }
+
+ // 기본값: 플레이어 팀
+ return TeamType.Player;
+ }
+
+ ///
+ /// 건설 완료 시 완성된 건물 생성 (BuildingFoundation에서 호출)
+ ///
+ [Rpc(SendTo.Server, InvokePermission = RpcInvokePermission.Everyone)]
+ public void SpawnCompletedBuildingServerRpc(string buildingDataName, Vector3Int gridPosition, int rotation, ulong ownerId, TeamType team)
+ {
+ // BuildingData 찾기
+ BuildingData data = availableBuildings.Find(b => b.name == buildingDataName);
+ if (data == null || data.prefab == null)
+ {
+ Debug.LogError($"[BuildingManager] 건물 데이터를 찾을 수 없습니다: {buildingDataName}");
+ return;
+ }
+
+ Vector3 worldPosition = GridToWorld(gridPosition);
+
+ // 완성된 건물 생성
+ GameObject buildingObj = Instantiate(data.prefab, worldPosition + data.placementOffset, Quaternion.Euler(0, rotation * 90f, 0));
+ NetworkObject netObj = buildingObj.GetComponent();
+
+ if (netObj != null)
+ {
+ netObj.SpawnWithOwnership(ownerId);
+
+ Building building = buildingObj.GetComponent();
+ if (building == null)
+ {
+ building = buildingObj.AddComponent();
+ }
+
+ // 건물 초기화
+ building.Initialize(data, gridPosition, rotation, ownerId);
+ placedBuildings.Add(building);
+
+ Debug.Log($"[BuildingManager] {data.buildingName} 건설 완료! (소유자: {ownerId}, 위치: {gridPosition}, 팀: {team})");
+ }
+ else
+ {
+ Debug.LogError($"[BuildingManager] NetworkObject 컴포넌트가 없습니다!");
+ Destroy(buildingObj);
+ }
+ }
}
}
diff --git a/Assets/Scripts/BuildingPlacement.cs b/Assets/Scripts/BuildingPlacement.cs
index 046387b..46d8c18 100644
--- a/Assets/Scripts/BuildingPlacement.cs
+++ b/Assets/Scripts/BuildingPlacement.cs
@@ -153,6 +153,7 @@ namespace Northbound
return;
}
+ // 완성 건물 프리팹으로 프리뷰 생성 (사용자가 완성 모습을 볼 수 있도록)
previewObject = Instantiate(data.prefab);
// Remove NetworkObject component from preview
@@ -162,6 +163,13 @@ namespace Northbound
Destroy(netObj);
}
+ // Remove Building component from preview
+ Building building = previewObject.GetComponent();
+ if (building != null)
+ {
+ Destroy(building);
+ }
+
// Apply ghost materials
previewRenderers = previewObject.GetComponentsInChildren();
foreach (var renderer in previewRenderers)
@@ -204,7 +212,7 @@ namespace Northbound
// Check if placement is valid
bool isValid = BuildingManager.Instance.IsValidPlacement(data, hit.point, currentRotation, out Vector3 snappedPosition);
- // Update preview position
+ // Update preview position (placementOffset 적용)
previewObject.transform.position = snappedPosition + data.placementOffset;
previewObject.transform.rotation = Quaternion.Euler(0, currentRotation * 90f, 0);
@@ -231,23 +239,25 @@ namespace Northbound
private void OnBuild(InputAction.CallbackContext context)
{
- if (!isBuildModeActive || previewObject == null || BuildingManager.Instance == null)
- return;
+ if (!isBuildModeActive || previewObject == null) return;
- BuildingData data = BuildingManager.Instance.availableBuildings[selectedBuildingIndex];
- Vector3 placementPosition = previewObject.transform.position - data.placementOffset;
-
- // Validate placement one more time
- if (BuildingManager.Instance.IsValidPlacement(data, placementPosition, currentRotation, out Vector3 snappedPosition))
+ // Get placement position
+ Ray ray = Camera.main.ScreenPointToRay(Mouse.current.position.ReadValue());
+ if (Physics.Raycast(ray, out RaycastHit hit, maxPlacementDistance, groundLayer))
{
- // 🔥 변경: PlaceBuildingServerRpc 대신 RequestPlaceBuilding 호출
- BuildingManager.Instance.RequestPlaceBuilding(selectedBuildingIndex, snappedPosition, currentRotation);
+ BuildingData selectedData = BuildingManager.Instance.availableBuildings[selectedBuildingIndex];
- Debug.Log($"[BuildingPlacement] 건물 배치 요청: {data.buildingName}");
- }
- else
- {
- Debug.LogWarning("[BuildingPlacement] 건물을 배치할 수 없는 위치입니다.");
+ if (BuildingManager.Instance.IsValidPlacement(selectedData, hit.point, currentRotation, out Vector3 groundPosition))
+ {
+ // 토대 배치 요청 (실제로는 토대가 생성됨)
+ BuildingManager.Instance.RequestPlaceFoundation(selectedBuildingIndex, groundPosition, currentRotation);
+
+ Debug.Log($"[BuildingPlacement] 토대 배치 요청: {selectedData.buildingName}");
+ }
+ else
+ {
+ Debug.LogWarning("[BuildingPlacement] 배치할 수 없는 위치입니다.");
+ }
}
}
diff --git a/Assets/Scripts/PlayerInteraction.cs b/Assets/Scripts/PlayerInteraction.cs
index fa74a1e..5d2bddc 100644
--- a/Assets/Scripts/PlayerInteraction.cs
+++ b/Assets/Scripts/PlayerInteraction.cs
@@ -109,7 +109,11 @@ namespace Northbound
{
_isInteracting = true;
_pendingEquipmentData = _currentInteractable.GetEquipmentData();
+
+ string animTrigger = _currentInteractable.GetInteractionAnimation();
+ bool hasAnimation = !string.IsNullOrEmpty(animTrigger);
+ // 장비 장착 (애니메이션 이벤트 사용 안 할 경우)
if (!useAnimationEvents && useEquipment && _equipmentSocket != null && _pendingEquipmentData != null)
{
if (_pendingEquipmentData.attachOnStart && _pendingEquipmentData.equipmentPrefab != null)
@@ -123,15 +127,18 @@ namespace Northbound
}
}
- if (playAnimations && _animator != null)
+ // 애니메이션 재생
+ if (playAnimations && _animator != null && hasAnimation)
{
- string animTrigger = _currentInteractable.GetInteractionAnimation();
- if (!string.IsNullOrEmpty(animTrigger))
- {
- _animator.SetTrigger(animTrigger);
- }
+ _animator.SetTrigger(animTrigger);
+ }
+ else
+ {
+ // 애니메이션이 없으면 즉시 상호작용 완료
+ _isInteracting = false;
}
+ // 상호작용 실행 (서버에서 처리)
_currentInteractable.Interact(OwnerClientId);
}
}
@@ -167,6 +174,7 @@ namespace Northbound
public void OnInteractionComplete()
{
_isInteracting = false;
+ Debug.Log("[PlayerInteraction] 상호작용 완료");
}
// ========================================