(Feat) Add build cost
This commit is contained in:
@@ -1,203 +0,0 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!1 &1238521633607646317
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 525373661776312631}
|
||||
- component: {fileID: 4990764154519191519}
|
||||
m_Layer: 0
|
||||
m_Name: WoodChest
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &525373661776312631
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1238521633607646317}
|
||||
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: 0.9999999, z: 0.9999999}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 7408694083014735}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!137 &4990764154519191519
|
||||
SkinnedMeshRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1238521633607646317}
|
||||
m_Enabled: 1
|
||||
m_CastShadows: 1
|
||||
m_ReceiveShadows: 1
|
||||
m_DynamicOccludee: 1
|
||||
m_StaticShadowCaster: 0
|
||||
m_MotionVectors: 1
|
||||
m_LightProbeUsage: 1
|
||||
m_ReflectionProbeUsage: 1
|
||||
m_RayTracingMode: 3
|
||||
m_RayTraceProcedural: 0
|
||||
m_RayTracingAccelStructBuildFlagsOverride: 0
|
||||
m_RayTracingAccelStructBuildFlags: 1
|
||||
m_SmallMeshCulling: 1
|
||||
m_ForceMeshLod: -1
|
||||
m_MeshLodSelectionBias: 0
|
||||
m_RenderingLayerMask: 1
|
||||
m_RendererPriority: 0
|
||||
m_Materials:
|
||||
- {fileID: 2100000, guid: 0e771690fad43914fb256fd021ff1796, type: 2}
|
||||
m_StaticBatchInfo:
|
||||
firstSubMesh: 0
|
||||
subMeshCount: 0
|
||||
m_StaticBatchRoot: {fileID: 0}
|
||||
m_ProbeAnchor: {fileID: 0}
|
||||
m_LightProbeVolumeOverride: {fileID: 0}
|
||||
m_ScaleInLightmap: 1
|
||||
m_ReceiveGI: 1
|
||||
m_PreserveUVs: 0
|
||||
m_IgnoreNormalsForChartDetection: 0
|
||||
m_ImportantGI: 0
|
||||
m_StitchLightmapSeams: 0
|
||||
m_SelectedEditorRenderState: 3
|
||||
m_MinimumChartSize: 4
|
||||
m_AutoUVMaxDistance: 0.5
|
||||
m_AutoUVMaxAngle: 89
|
||||
m_LightmapParameters: {fileID: 0}
|
||||
m_GlobalIlluminationMeshLod: 0
|
||||
m_SortingLayerID: 0
|
||||
m_SortingLayer: 0
|
||||
m_SortingOrder: 0
|
||||
m_MaskInteraction: 0
|
||||
serializedVersion: 2
|
||||
m_Quality: 0
|
||||
m_UpdateWhenOffscreen: 0
|
||||
m_SkinnedMotionVectors: 1
|
||||
m_Mesh: {fileID: 4300000, guid: 1cc6cc20abc7a464a9dec49ee02361cf, type: 3}
|
||||
m_Bones: []
|
||||
m_BlendShapeWeights: []
|
||||
m_RootBone: {fileID: 0}
|
||||
m_AABB:
|
||||
m_Center: {x: -0.00000011920929, y: 0.9934905, z: 0.046147406}
|
||||
m_Extent: {x: 1.4447958, y: 0.99102205, z: 0.86538196}
|
||||
m_DirtyAABB: 0
|
||||
--- !u!1 &8724245919954373429
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 1140867685286266164}
|
||||
m_Layer: 0
|
||||
m_Name: Base
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &1140867685286266164
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 8724245919954373429}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: 0.000000067179414, y: -0, z: -0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: -0.0022011993, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 7408694083014735}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!1 &9108319890109776348
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 7408694083014735}
|
||||
- component: {fileID: 5167602068127165240}
|
||||
- component: {fileID: 4639091196094287924}
|
||||
m_Layer: 0
|
||||
m_Name: Chest
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &7408694083014735
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 9108319890109776348}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 607.9671, y: 470.98746, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children:
|
||||
- {fileID: 1140867685286266164}
|
||||
- {fileID: 525373661776312631}
|
||||
m_Father: {fileID: 0}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!95 &5167602068127165240
|
||||
Animator:
|
||||
serializedVersion: 7
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 9108319890109776348}
|
||||
m_Enabled: 1
|
||||
m_Avatar: {fileID: 9000000, guid: 1cc6cc20abc7a464a9dec49ee02361cf, type: 3}
|
||||
m_Controller: {fileID: 0}
|
||||
m_CullingMode: 1
|
||||
m_UpdateMode: 0
|
||||
m_ApplyRootMotion: 0
|
||||
m_LinearVelocityBlending: 0
|
||||
m_StabilizeFeet: 0
|
||||
m_AnimatePhysics: 0
|
||||
m_WarningMessage:
|
||||
m_HasTransformHierarchy: 0
|
||||
m_AllowConstantClipSamplingOptimization: 1
|
||||
m_KeepAnimatorStateOnDisable: 0
|
||||
m_WriteDefaultValuesOnDisable: 0
|
||||
--- !u!65 &4639091196094287924
|
||||
BoxCollider:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 9108319890109776348}
|
||||
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: 2.8880982, y: 2.0247374, z: 1.8538849}
|
||||
m_Center: {x: 0, y: 1.0007629, z: 0.01897195}
|
||||
@@ -9,7 +9,7 @@ GameObject:
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 5155531265051259965}
|
||||
m_Layer: 9
|
||||
m_Layer: 6
|
||||
m_Name: Respanw Point
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
@@ -25,7 +25,7 @@ Transform:
|
||||
m_GameObject: {fileID: 80555091247393707}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 1.185}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 1.64}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
@@ -42,7 +42,7 @@ GameObject:
|
||||
- component: {fileID: 1974791568506913495}
|
||||
- component: {fileID: 7121555757307145449}
|
||||
- component: {fileID: 8025352644449905843}
|
||||
m_Layer: 9
|
||||
m_Layer: 6
|
||||
m_Name: Dual Bed
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
@@ -167,7 +167,7 @@ PrefabInstance:
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 919132149155446097, guid: daccda73d2db7124db470c2a2f478fcf, type: 3}
|
||||
propertyPath: m_Layer
|
||||
value: 9
|
||||
value: 6
|
||||
objectReference: {fileID: 0}
|
||||
m_RemovedComponents: []
|
||||
m_RemovedGameObjects: []
|
||||
|
||||
@@ -25,7 +25,7 @@ Transform:
|
||||
m_GameObject: {fileID: 480736328517298862}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalPosition: {x: 0, y: 0.197, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children:
|
||||
@@ -215,7 +215,7 @@ BoxCollider:
|
||||
m_Enabled: 1
|
||||
serializedVersion: 3
|
||||
m_Size: {x: 2.4893725, y: 0.279638, z: 2.4685874}
|
||||
m_Center: {x: 0.0011386871, y: -0.07322356, z: -0.012834609}
|
||||
m_Center: {x: 0.0011386871, y: 0.15, z: -0.012834609}
|
||||
--- !u!114 &6057546317908917559
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
|
||||
@@ -1,295 +0,0 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!1 &1238521633607646317
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 525373661776312631}
|
||||
- component: {fileID: 4990764154519191519}
|
||||
m_Layer: 9
|
||||
m_Name: WoodChest
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &525373661776312631
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1238521633607646317}
|
||||
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: 0.9999999, z: 0.9999999}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 7408694083014735}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!137 &4990764154519191519
|
||||
SkinnedMeshRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1238521633607646317}
|
||||
m_Enabled: 1
|
||||
m_CastShadows: 1
|
||||
m_ReceiveShadows: 1
|
||||
m_DynamicOccludee: 1
|
||||
m_StaticShadowCaster: 0
|
||||
m_MotionVectors: 1
|
||||
m_LightProbeUsage: 1
|
||||
m_ReflectionProbeUsage: 1
|
||||
m_RayTracingMode: 3
|
||||
m_RayTraceProcedural: 0
|
||||
m_RayTracingAccelStructBuildFlagsOverride: 0
|
||||
m_RayTracingAccelStructBuildFlags: 1
|
||||
m_SmallMeshCulling: 1
|
||||
m_ForceMeshLod: -1
|
||||
m_MeshLodSelectionBias: 0
|
||||
m_RenderingLayerMask: 1
|
||||
m_RendererPriority: 0
|
||||
m_Materials:
|
||||
- {fileID: 2100000, guid: 0e771690fad43914fb256fd021ff1796, type: 2}
|
||||
m_StaticBatchInfo:
|
||||
firstSubMesh: 0
|
||||
subMeshCount: 0
|
||||
m_StaticBatchRoot: {fileID: 0}
|
||||
m_ProbeAnchor: {fileID: 0}
|
||||
m_LightProbeVolumeOverride: {fileID: 0}
|
||||
m_ScaleInLightmap: 1
|
||||
m_ReceiveGI: 1
|
||||
m_PreserveUVs: 0
|
||||
m_IgnoreNormalsForChartDetection: 0
|
||||
m_ImportantGI: 0
|
||||
m_StitchLightmapSeams: 0
|
||||
m_SelectedEditorRenderState: 3
|
||||
m_MinimumChartSize: 4
|
||||
m_AutoUVMaxDistance: 0.5
|
||||
m_AutoUVMaxAngle: 89
|
||||
m_LightmapParameters: {fileID: 0}
|
||||
m_GlobalIlluminationMeshLod: 0
|
||||
m_SortingLayerID: 0
|
||||
m_SortingLayer: 0
|
||||
m_SortingOrder: 0
|
||||
m_MaskInteraction: 0
|
||||
serializedVersion: 2
|
||||
m_Quality: 0
|
||||
m_UpdateWhenOffscreen: 0
|
||||
m_SkinnedMotionVectors: 1
|
||||
m_Mesh: {fileID: 4300000, guid: 1cc6cc20abc7a464a9dec49ee02361cf, type: 3}
|
||||
m_Bones: []
|
||||
m_BlendShapeWeights: []
|
||||
m_RootBone: {fileID: 0}
|
||||
m_AABB:
|
||||
m_Center: {x: -0.00000011920929, y: 0.9934905, z: 0.046147406}
|
||||
m_Extent: {x: 1.4447958, y: 0.99102205, z: 0.86538196}
|
||||
m_DirtyAABB: 0
|
||||
--- !u!1 &9108319890109776348
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 7408694083014735}
|
||||
- component: {fileID: 5167602068127165240}
|
||||
- component: {fileID: -2412342725436568620}
|
||||
- component: {fileID: 2400817911942652581}
|
||||
- component: {fileID: -1698316822263000860}
|
||||
- component: {fileID: 1293470452171110175}
|
||||
m_Layer: 9
|
||||
m_Name: Chest_Ghost
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &7408694083014735
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 9108319890109776348}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 607.9671, y: 470.98746, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children:
|
||||
- {fileID: 525373661776312631}
|
||||
m_Father: {fileID: 0}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!95 &5167602068127165240
|
||||
Animator:
|
||||
serializedVersion: 7
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 9108319890109776348}
|
||||
m_Enabled: 1
|
||||
m_Avatar: {fileID: 9000000, guid: 1cc6cc20abc7a464a9dec49ee02361cf, type: 3}
|
||||
m_Controller: {fileID: 0}
|
||||
m_CullingMode: 1
|
||||
m_UpdateMode: 0
|
||||
m_ApplyRootMotion: 0
|
||||
m_LinearVelocityBlending: 0
|
||||
m_StabilizeFeet: 0
|
||||
m_AnimatePhysics: 0
|
||||
m_WarningMessage:
|
||||
m_HasTransformHierarchy: 0
|
||||
m_AllowConstantClipSamplingOptimization: 1
|
||||
m_KeepAnimatorStateOnDisable: 0
|
||||
m_WriteDefaultValuesOnDisable: 0
|
||||
--- !u!114 &-2412342725436568620
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 9108319890109776348}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 3da63aae88fc0f547b84e1d74e927e39, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier: Assembly-CSharp::Ashwild.Building.BuildGhost
|
||||
footprint: {fileID: 2400817911942652581}
|
||||
renderers:
|
||||
- {fileID: 4990764154519191519}
|
||||
validOverlay: {fileID: 2100000, guid: 0e580295bcb9d8e4ab68d1a7f11efa63, type: 2}
|
||||
invalidOverlay: {fileID: 2100000, guid: 0a594aa41ef0d7e428398c2c32772c64, type: 2}
|
||||
--- !u!65 &2400817911942652581
|
||||
BoxCollider:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 9108319890109776348}
|
||||
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: 0
|
||||
serializedVersion: 3
|
||||
m_Size: {x: 2.9945784, y: 2.2094421, z: 1.9498258}
|
||||
m_Center: {x: 0.014221191, y: 1.0410919, z: 0}
|
||||
--- !u!114 &-1698316822263000860
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 9108319890109776348}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: a2836e36774ca1c4bbbee976e17b649c, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier: FishNet.Runtime::FishNet.Component.Transforming.NetworkTransform
|
||||
_componentIndexCache: 0
|
||||
_addedNetworkObject: {fileID: 1293470452171110175}
|
||||
_networkObjectCache: {fileID: 1293470452171110175}
|
||||
_componentConfiguration: 0
|
||||
_synchronizeParent: 0
|
||||
_packing:
|
||||
Position: 1
|
||||
Rotation: 1
|
||||
Scale: 0
|
||||
_useScaledTime: 1
|
||||
_interpolation: 2
|
||||
_extrapolation: 2
|
||||
_enableTeleport: 0
|
||||
_teleportThreshold: 1
|
||||
_clientAuthoritative: 1
|
||||
_sendToOwner: 1
|
||||
_interval: 1
|
||||
_synchronizePosition: 1
|
||||
_positionSensitivity: 0.001
|
||||
_positionSnapping:
|
||||
X: 0
|
||||
Y: 0
|
||||
Z: 0
|
||||
_synchronizeRotation: 1
|
||||
_rotationSnapping:
|
||||
X: 0
|
||||
Y: 0
|
||||
Z: 0
|
||||
_synchronizeScale: 1
|
||||
_scaleSensitivity: 0.001
|
||||
_scaleSnapping:
|
||||
X: 0
|
||||
Y: 0
|
||||
Z: 0
|
||||
--- !u!114 &1293470452171110175
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 9108319890109776348}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 26b716c41e9b56b4baafaf13a523ba2e, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier: FishNet.Runtime::FishNet.Object.NetworkObject
|
||||
_localLevelOfDetailCalculationType: 0
|
||||
_useLevelOfDetail: 0
|
||||
_useRootLevelOfDetail: 1
|
||||
NetworkObserver: {fileID: 0}
|
||||
_enablePrediction: 0
|
||||
_predictionType: 0
|
||||
_localReconcileCorrectionType: 2
|
||||
_graphicalObject: {fileID: 0}
|
||||
_detachGraphicalObject: 0
|
||||
_enableStateForwarding: 1
|
||||
_networkTransform: {fileID: 0}
|
||||
_ownerInterpolation: 1
|
||||
_ownerSmoothedProperties: 255
|
||||
_adaptiveInterpolation: 3
|
||||
_spectatorSmoothedProperties: 255
|
||||
_spectatorInterpolation: 2
|
||||
_enableTeleport: 0
|
||||
_teleportThreshold: 1
|
||||
<PrefabId>k__BackingField: 6
|
||||
<SpawnableCollectionId>k__BackingField: 0
|
||||
<AssetPathHash>k__BackingField: 5141669014942263323
|
||||
SceneId: 0
|
||||
SerializedTransformProperties:
|
||||
Position: {x: 607.9671, y: 470.98746, z: 0}
|
||||
Rotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
Scale: {x: 1, y: 1, z: 1}
|
||||
IsValid: 1
|
||||
<IsNested>k__BackingField: 0
|
||||
WasActiveDuringEdit: 0
|
||||
WasActiveDuringEdit_Set1: 1
|
||||
<ComponentIndex>k__BackingField: 0
|
||||
<PredictedSpawn>k__BackingField: {fileID: 0}
|
||||
<PredictedOwner>k__BackingField: {fileID: 0}
|
||||
NetworkBehaviours:
|
||||
- {fileID: -1698316822263000860}
|
||||
InitializedParentNetworkBehaviour: {fileID: 0}
|
||||
InitializedNestedNetworkObjects: []
|
||||
RuntimeParentNetworkBehaviour: {fileID: 0}
|
||||
RuntimeChildNetworkBehaviours: []
|
||||
_isNetworked: 1
|
||||
_isSpawnable: 1
|
||||
_isGlobal: 0
|
||||
_initializeOrder: 0
|
||||
_preventDespawnOnDisconnect: 0
|
||||
_defaultDespawnType: 0
|
||||
_initializedTimestamp: -8584181721604556210
|
||||
@@ -92,7 +92,7 @@ Transform:
|
||||
m_GameObject: {fileID: 689960121515206631}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalPosition: {x: 0, y: 0.231, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children:
|
||||
@@ -200,7 +200,7 @@ Transform:
|
||||
m_GameObject: {fileID: 3305094920675404345}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 72.18446, y: -0.55225, z: 91.49081}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children:
|
||||
@@ -284,7 +284,7 @@ BoxCollider:
|
||||
m_Enabled: 0
|
||||
serializedVersion: 3
|
||||
m_Size: {x: 2.4893725, y: 0.279638, z: 2.4685874}
|
||||
m_Center: {x: 0.0011386871, y: -0.07322356, z: -0.012834609}
|
||||
m_Center: {x: 0.0011386871, y: 0.15, z: -0.012834609}
|
||||
--- !u!114 &8958413773651828551
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
|
||||
+3
-2
@@ -1,6 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: d2b6fea7c913fb844a1939788445af18
|
||||
PrefabImporter:
|
||||
guid: 8a1eefc9cd60bd542b6bbe907c6348bd
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
@@ -0,0 +1,327 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!1 &1449196833709694992
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 607827644847487143}
|
||||
- component: {fileID: 3963579599117951989}
|
||||
- component: {fileID: 5725644289869038764}
|
||||
- component: {fileID: 7776490238597678248}
|
||||
m_Layer: 5
|
||||
m_Name: Text (TMP)
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &607827644847487143
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1449196833709694992}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 8500789918531834058}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchoredPosition: {x: 85.313095, y: -31.504}
|
||||
m_SizeDelta: {x: 44.61, y: 63.008}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &3963579599117951989
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1449196833709694992}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!114 &5725644289869038764
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1449196833709694992}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier: Unity.TextMeshPro::TMPro.TextMeshProUGUI
|
||||
m_Material: {fileID: 0}
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_RaycastTarget: 1
|
||||
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_Maskable: 1
|
||||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_text: '10/10
|
||||
|
||||
'
|
||||
m_isRightToLeft: 0
|
||||
m_fontAsset: {fileID: 11400000, guid: dc221f629ad2625429da3920b6f9a348, type: 2}
|
||||
m_sharedMaterial: {fileID: 3767062857633432899, guid: dc221f629ad2625429da3920b6f9a348, type: 2}
|
||||
m_fontSharedMaterials: []
|
||||
m_fontMaterial: {fileID: 0}
|
||||
m_fontMaterials: []
|
||||
m_fontColor32:
|
||||
serializedVersion: 2
|
||||
rgba: 4294967295
|
||||
m_fontColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_enableVertexGradient: 0
|
||||
m_colorMode: 3
|
||||
m_fontColorGradient:
|
||||
topLeft: {r: 1, g: 1, b: 1, a: 1}
|
||||
topRight: {r: 1, g: 1, b: 1, a: 1}
|
||||
bottomLeft: {r: 1, g: 1, b: 1, a: 1}
|
||||
bottomRight: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_fontColorGradientPreset: {fileID: 0}
|
||||
m_spriteAsset: {fileID: 0}
|
||||
m_tintAllSprites: 0
|
||||
m_StyleSheet: {fileID: 0}
|
||||
m_TextStyleHashCode: -1183493901
|
||||
m_overrideHtmlColors: 0
|
||||
m_faceColor:
|
||||
serializedVersion: 2
|
||||
rgba: 4294967295
|
||||
m_fontSize: 20
|
||||
m_fontSizeBase: 20
|
||||
m_fontWeight: 400
|
||||
m_enableAutoSizing: 0
|
||||
m_fontSizeMin: 18
|
||||
m_fontSizeMax: 72
|
||||
m_fontStyle: 0
|
||||
m_HorizontalAlignment: 2
|
||||
m_VerticalAlignment: 512
|
||||
m_textAlignment: 65535
|
||||
m_characterSpacing: 0
|
||||
m_characterHorizontalScale: 1
|
||||
m_wordSpacing: 0
|
||||
m_lineSpacing: 0
|
||||
m_lineSpacingMax: 0
|
||||
m_paragraphSpacing: 0
|
||||
m_charWidthMaxAdj: 0
|
||||
m_TextWrappingMode: 1
|
||||
m_wordWrappingRatios: 0.4
|
||||
m_overflowMode: 0
|
||||
m_linkedTextComponent: {fileID: 0}
|
||||
parentLinkedComponent: {fileID: 0}
|
||||
m_enableKerning: 0
|
||||
m_ActiveFontFeatures: 6e72656b
|
||||
m_enableExtraPadding: 0
|
||||
checkPaddingRequired: 0
|
||||
m_isRichText: 1
|
||||
m_EmojiFallbackSupport: 1
|
||||
m_parseCtrlCharacters: 1
|
||||
m_isOrthographic: 1
|
||||
m_isCullingEnabled: 0
|
||||
m_horizontalMapping: 0
|
||||
m_verticalMapping: 0
|
||||
m_uvLineOffset: 0
|
||||
m_geometrySortingOrder: 0
|
||||
m_IsTextObjectScaleStatic: 0
|
||||
m_VertexBufferAutoSizeReduction: 0
|
||||
m_useMaxVisibleDescender: 1
|
||||
m_pageToDisplay: 1
|
||||
m_margin: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_isUsingLegacyAnimationComponent: 0
|
||||
m_isVolumetricText: 0
|
||||
m_hasFontAssetChanged: 0
|
||||
m_baseMaterial: {fileID: 0}
|
||||
m_maskOffset: {x: 0, y: 0, z: 0, w: 0}
|
||||
--- !u!114 &7776490238597678248
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1449196833709694992}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 3245ec927659c4140ac4f8d17403cc18, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier: UnityEngine.UI::UnityEngine.UI.ContentSizeFitter
|
||||
m_HorizontalFit: 2
|
||||
m_VerticalFit: 0
|
||||
--- !u!1 &3796616338314271085
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 67615937123066110}
|
||||
- component: {fileID: 2248708403780224795}
|
||||
- component: {fileID: 824788329508477661}
|
||||
m_Layer: 5
|
||||
m_Name: Image
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &67615937123066110
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 3796616338314271085}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 8500789918531834058}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 0, y: 0}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 63.0081, y: 63.0081}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &2248708403780224795
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 3796616338314271085}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!114 &824788329508477661
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 3796616338314271085}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier: UnityEngine.UI::UnityEngine.UI.Image
|
||||
m_Material: {fileID: 0}
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_RaycastTarget: 1
|
||||
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_Maskable: 1
|
||||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_Sprite: {fileID: 21300000, guid: aac71bc72b8e8ce4da73028769c1b20a, type: 3}
|
||||
m_Type: 0
|
||||
m_PreserveAspect: 1
|
||||
m_FillCenter: 1
|
||||
m_FillMethod: 4
|
||||
m_FillAmount: 1
|
||||
m_FillClockwise: 1
|
||||
m_FillOrigin: 0
|
||||
m_UseSpriteMesh: 0
|
||||
m_PixelsPerUnitMultiplier: 1
|
||||
--- !u!1 &6992362772493703696
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 8500789918531834058}
|
||||
- component: {fileID: 7137866051671997104}
|
||||
- component: {fileID: 1408010592961239319}
|
||||
- component: {fileID: 9158453950938887334}
|
||||
m_Layer: 5
|
||||
m_Name: Ressources Needed
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &8500789918531834058
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 6992362772493703696}
|
||||
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: 67615937123066110}
|
||||
- {fileID: 607827644847487143}
|
||||
m_Father: {fileID: 0}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchoredPosition: {x: 36.999268, y: -14.694519}
|
||||
m_SizeDelta: {x: 0, y: 0}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!114 &7137866051671997104
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 6992362772493703696}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 30649d3a9faa99c48a7b1166b86bf2a0, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier: UnityEngine.UI::UnityEngine.UI.HorizontalLayoutGroup
|
||||
m_Padding:
|
||||
m_Left: 0
|
||||
m_Right: 0
|
||||
m_Top: 0
|
||||
m_Bottom: 0
|
||||
m_ChildAlignment: 0
|
||||
m_Spacing: 0
|
||||
m_ChildForceExpandWidth: 1
|
||||
m_ChildForceExpandHeight: 1
|
||||
m_ChildControlWidth: 0
|
||||
m_ChildControlHeight: 0
|
||||
m_ChildScaleWidth: 0
|
||||
m_ChildScaleHeight: 0
|
||||
m_ReverseArrangement: 0
|
||||
--- !u!114 &1408010592961239319
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 6992362772493703696}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 3245ec927659c4140ac4f8d17403cc18, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier: UnityEngine.UI::UnityEngine.UI.ContentSizeFitter
|
||||
m_HorizontalFit: 2
|
||||
m_VerticalFit: 2
|
||||
--- !u!114 &9158453950938887334
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 6992362772493703696}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: b197776c5c48d19409d8b73a5f77bcfb, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier: Assembly-CSharp::Ashwild.UI.BuildCostEntryUI
|
||||
icon: {fileID: 824788329508477661}
|
||||
amountLabel: {fileID: 5725644289869038764}
|
||||
affordColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
missingColor: {r: 1, g: 0.35, b: 0.35, a: 1}
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 041dab0de12a5854898716d7eecf3a38
|
||||
guid: fb3189f697e11534299fe0ff296e53bc
|
||||
PrefabImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
@@ -576,6 +576,9 @@ MonoBehaviour:
|
||||
lossColor: {r: 1, g: 0.45, b: 0.45, a: 1}
|
||||
discoveryLabel: NEW
|
||||
discoveryColor: {r: 1, g: 0.85, b: 0.3, a: 1}
|
||||
spawnDelay: 0.2
|
||||
maxActiveNotifications: 5
|
||||
maxQueuedNotifications: 20
|
||||
--- !u!1 &727521436841129546
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -2543,6 +2546,7 @@ RectTransform:
|
||||
m_Children:
|
||||
- {fileID: 5384293275684618147}
|
||||
- {fileID: 1596723111164776776}
|
||||
- {fileID: 8481609622609388703}
|
||||
m_Father: {fileID: 1274985355461043127}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0.5, y: 1}
|
||||
@@ -3060,6 +3064,83 @@ MonoBehaviour:
|
||||
m_Name:
|
||||
m_EditorClassIdentifier: UnityEngine.UI::UnityEngine.UI.Mask
|
||||
m_ShowMaskGraphic: 1
|
||||
--- !u!1 &4437702633090290063
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 8481609622609388703}
|
||||
- component: {fileID: 3834215647302423569}
|
||||
- component: {fileID: 4722122648630739765}
|
||||
m_Layer: 5
|
||||
m_Name: Ressoureces needed Holder
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &8481609622609388703
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 4437702633090290063}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 7857481831142227221}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchoredPosition: {x: 110.48, y: -46.7}
|
||||
m_SizeDelta: {x: 0, y: 0}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!114 &3834215647302423569
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 4437702633090290063}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 30649d3a9faa99c48a7b1166b86bf2a0, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier: UnityEngine.UI::UnityEngine.UI.HorizontalLayoutGroup
|
||||
m_Padding:
|
||||
m_Left: 0
|
||||
m_Right: 0
|
||||
m_Top: 0
|
||||
m_Bottom: 0
|
||||
m_ChildAlignment: 0
|
||||
m_Spacing: 5
|
||||
m_ChildForceExpandWidth: 1
|
||||
m_ChildForceExpandHeight: 1
|
||||
m_ChildControlWidth: 0
|
||||
m_ChildControlHeight: 0
|
||||
m_ChildScaleWidth: 0
|
||||
m_ChildScaleHeight: 0
|
||||
m_ReverseArrangement: 0
|
||||
--- !u!114 &4722122648630739765
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 4437702633090290063}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 3245ec927659c4140ac4f8d17403cc18, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier: UnityEngine.UI::UnityEngine.UI.ContentSizeFitter
|
||||
m_HorizontalFit: 2
|
||||
m_VerticalFit: 2
|
||||
--- !u!1 &4441217771617946248
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -5873,6 +5954,8 @@ MonoBehaviour:
|
||||
m_EditorClassIdentifier: Assembly-CSharp::CrosshairManager
|
||||
icon: {fileID: 8955712843149927660}
|
||||
promptLabel: {fileID: 65970657491887858}
|
||||
costHolder: {fileID: 8481609622609388703}
|
||||
costEntryPrefab: {fileID: 9158453950938887334, guid: fb3189f697e11534299fe0ff296e53bc, type: 3}
|
||||
idleState: {fileID: 11400000, guid: e6730ffd626cf7240951b398e0521454, type: 2}
|
||||
hoverState: {fileID: 11400000, guid: 7bbc76d322beed84282f97531e2230e3, type: 2}
|
||||
transitionDuration: 0.25
|
||||
|
||||
@@ -1056,6 +1056,120 @@ GameObject:
|
||||
m_CorrespondingSourceObject: {fileID: 3552718611955523198, guid: 56f986943fa82864394e61d72414fd0a, type: 3}
|
||||
m_PrefabInstance: {fileID: 143560321}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
--- !u!1001 &148523959
|
||||
PrefabInstance:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 2
|
||||
m_Modification:
|
||||
serializedVersion: 3
|
||||
m_TransformParent: {fileID: 0}
|
||||
m_Modifications:
|
||||
- target: {fileID: 1205429200353802584, guid: 6a1de89366a3f0741877f7cd3ca11cd9, type: 3}
|
||||
propertyPath: m_Layer
|
||||
value: 6
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2488455438653353329, guid: 6a1de89366a3f0741877f7cd3ca11cd9, type: 3}
|
||||
propertyPath: m_Layer
|
||||
value: 6
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2834765333546211928, guid: 6a1de89366a3f0741877f7cd3ca11cd9, type: 3}
|
||||
propertyPath: m_Layer
|
||||
value: 6
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 3477519202729442059, guid: 6a1de89366a3f0741877f7cd3ca11cd9, type: 3}
|
||||
propertyPath: m_Layer
|
||||
value: 6
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 3730502645607281877, guid: 6a1de89366a3f0741877f7cd3ca11cd9, type: 3}
|
||||
propertyPath: m_Layer
|
||||
value: 6
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4380831863138714029, guid: 6a1de89366a3f0741877f7cd3ca11cd9, type: 3}
|
||||
propertyPath: m_Layer
|
||||
value: 6
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8111840307215440919, guid: 6a1de89366a3f0741877f7cd3ca11cd9, type: 3}
|
||||
propertyPath: m_Name
|
||||
value: Chest (1)
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8111840307215440919, guid: 6a1de89366a3f0741877f7cd3ca11cd9, type: 3}
|
||||
propertyPath: m_Layer
|
||||
value: 6
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8924123916003559085, guid: 6a1de89366a3f0741877f7cd3ca11cd9, type: 3}
|
||||
propertyPath: m_LocalPosition.x
|
||||
value: 49.04
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8924123916003559085, guid: 6a1de89366a3f0741877f7cd3ca11cd9, type: 3}
|
||||
propertyPath: m_LocalPosition.y
|
||||
value: 0.000000573877
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8924123916003559085, guid: 6a1de89366a3f0741877f7cd3ca11cd9, type: 3}
|
||||
propertyPath: m_LocalPosition.z
|
||||
value: 58.57
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8924123916003559085, guid: 6a1de89366a3f0741877f7cd3ca11cd9, type: 3}
|
||||
propertyPath: m_LocalRotation.w
|
||||
value: 0.70710653
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8924123916003559085, guid: 6a1de89366a3f0741877f7cd3ca11cd9, type: 3}
|
||||
propertyPath: m_LocalRotation.x
|
||||
value: -0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8924123916003559085, guid: 6a1de89366a3f0741877f7cd3ca11cd9, type: 3}
|
||||
propertyPath: m_LocalRotation.y
|
||||
value: -0.7071071
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8924123916003559085, guid: 6a1de89366a3f0741877f7cd3ca11cd9, type: 3}
|
||||
propertyPath: m_LocalRotation.z
|
||||
value: -0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8924123916003559085, guid: 6a1de89366a3f0741877f7cd3ca11cd9, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8924123916003559085, guid: 6a1de89366a3f0741877f7cd3ca11cd9, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.y
|
||||
value: -90
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8924123916003559085, guid: 6a1de89366a3f0741877f7cd3ca11cd9, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
m_RemovedComponents: []
|
||||
m_RemovedGameObjects: []
|
||||
m_AddedGameObjects: []
|
||||
m_AddedComponents:
|
||||
- targetCorrespondingSourceObject: {fileID: 8111840307215440919, guid: 6a1de89366a3f0741877f7cd3ca11cd9, type: 3}
|
||||
insertIndex: -1
|
||||
addedObject: {fileID: 148523961}
|
||||
m_SourcePrefab: {fileID: 100100000, guid: 6a1de89366a3f0741877f7cd3ca11cd9, type: 3}
|
||||
--- !u!1 &148523960 stripped
|
||||
GameObject:
|
||||
m_CorrespondingSourceObject: {fileID: 8111840307215440919, guid: 6a1de89366a3f0741877f7cd3ca11cd9, type: 3}
|
||||
m_PrefabInstance: {fileID: 148523959}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
--- !u!65 &148523961
|
||||
BoxCollider:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 148523960}
|
||||
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: 1.2667743, y: 0.93599886, z: 0.7035593}
|
||||
m_Center: {x: 0, y: 0.37556878, z: 0}
|
||||
--- !u!1001 &150458585
|
||||
PrefabInstance:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -2510,6 +2624,7 @@ MonoBehaviour:
|
||||
useGrid: 0
|
||||
gridSize: 1
|
||||
rotationStep: 90
|
||||
continuousBuild: 1
|
||||
snapRadius: 1.25
|
||||
snapPointMask:
|
||||
serializedVersion: 2
|
||||
@@ -4237,6 +4352,30 @@ PrefabInstance:
|
||||
propertyPath: m_Name
|
||||
value: Canvas
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8481609622609388703, guid: fc052529108a2854aa09a1d295778ef4, type: 3}
|
||||
propertyPath: m_AnchorMax.y
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8481609622609388703, guid: fc052529108a2854aa09a1d295778ef4, type: 3}
|
||||
propertyPath: m_AnchorMin.y
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8481609622609388703, guid: fc052529108a2854aa09a1d295778ef4, type: 3}
|
||||
propertyPath: m_SizeDelta.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8481609622609388703, guid: fc052529108a2854aa09a1d295778ef4, type: 3}
|
||||
propertyPath: m_SizeDelta.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8481609622609388703, guid: fc052529108a2854aa09a1d295778ef4, type: 3}
|
||||
propertyPath: m_AnchoredPosition.x
|
||||
value: 110.48
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8481609622609388703, guid: fc052529108a2854aa09a1d295778ef4, type: 3}
|
||||
propertyPath: m_AnchoredPosition.y
|
||||
value: -46.7
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8814077816998036631, guid: fc052529108a2854aa09a1d295778ef4, type: 3}
|
||||
propertyPath: m_AnchorMax.y
|
||||
value: 0
|
||||
@@ -6309,6 +6448,12 @@ MonoBehaviour:
|
||||
_prefab: Assets/External/VFXPACK_FIRE_WALLCOEUR/Prefab/VFX_Fire.prefab
|
||||
- _gameObject: {fileID: 668733574}
|
||||
_prefab: Assets/External/Static Soul Studio/Crafting Statinos/Built-in/Prefabs/Stations_5.prefab
|
||||
- _gameObject: {fileID: 148523960}
|
||||
_prefab: Assets/External/Raygeas/Grasslands - Stylized Nature/Assets/Prefabs/Environment/Chest.prefab
|
||||
- _gameObject: {fileID: 5966294047732575298}
|
||||
_prefab: Assets/GAME/Prefabs/Structure/Build/Build/Dual Bed.prefab
|
||||
- _gameObject: {fileID: 5966294047732575299}
|
||||
_prefab: Assets/GAME/3D/Build/dual bed.fbx
|
||||
--- !u!4 &740572252
|
||||
Transform:
|
||||
m_ObjectHideFlags: 11
|
||||
@@ -29603,6 +29748,73 @@ Transform:
|
||||
m_CorrespondingSourceObject: {fileID: 2400332513845409276, guid: 7d11390e8f41d214396bc57f3c34e265, type: 3}
|
||||
m_PrefabInstance: {fileID: 2451676570416092130}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
--- !u!1001 &5966294047732575297
|
||||
PrefabInstance:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 2
|
||||
m_Modification:
|
||||
serializedVersion: 3
|
||||
m_TransformParent: {fileID: 0}
|
||||
m_Modifications:
|
||||
- target: {fileID: 1410034494400494434, guid: 75709898450916748958db6a8ae2a48f, type: 3}
|
||||
propertyPath: m_Name
|
||||
value: Dual Bed
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1974791568506913495, guid: 75709898450916748958db6a8ae2a48f, type: 3}
|
||||
propertyPath: m_LocalPosition.x
|
||||
value: 48.722908
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1974791568506913495, guid: 75709898450916748958db6a8ae2a48f, type: 3}
|
||||
propertyPath: m_LocalPosition.y
|
||||
value: 0.0000015367737
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1974791568506913495, guid: 75709898450916748958db6a8ae2a48f, type: 3}
|
||||
propertyPath: m_LocalPosition.z
|
||||
value: 60.984703
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1974791568506913495, guid: 75709898450916748958db6a8ae2a48f, type: 3}
|
||||
propertyPath: m_LocalRotation.w
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1974791568506913495, guid: 75709898450916748958db6a8ae2a48f, type: 3}
|
||||
propertyPath: m_LocalRotation.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1974791568506913495, guid: 75709898450916748958db6a8ae2a48f, type: 3}
|
||||
propertyPath: m_LocalRotation.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1974791568506913495, guid: 75709898450916748958db6a8ae2a48f, type: 3}
|
||||
propertyPath: m_LocalRotation.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1974791568506913495, guid: 75709898450916748958db6a8ae2a48f, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1974791568506913495, guid: 75709898450916748958db6a8ae2a48f, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1974791568506913495, guid: 75709898450916748958db6a8ae2a48f, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
m_RemovedComponents: []
|
||||
m_RemovedGameObjects: []
|
||||
m_AddedGameObjects: []
|
||||
m_AddedComponents: []
|
||||
m_SourcePrefab: {fileID: 100100000, guid: 75709898450916748958db6a8ae2a48f, type: 3}
|
||||
--- !u!1 &5966294047732575298 stripped
|
||||
GameObject:
|
||||
m_CorrespondingSourceObject: {fileID: 1410034494400494434, guid: 75709898450916748958db6a8ae2a48f, type: 3}
|
||||
m_PrefabInstance: {fileID: 5966294047732575297}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
--- !u!1 &5966294047732575299 stripped
|
||||
GameObject:
|
||||
m_CorrespondingSourceObject: {fileID: 3269686860533390028, guid: 75709898450916748958db6a8ae2a48f, type: 3}
|
||||
m_PrefabInstance: {fileID: 5966294047732575297}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
--- !u!1660057539 &9223372036854775807
|
||||
SceneRoots:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -29617,3 +29829,5 @@ SceneRoots:
|
||||
- {fileID: 1902801754}
|
||||
- {fileID: 1957565059}
|
||||
- {fileID: 668733573}
|
||||
- {fileID: 148523959}
|
||||
- {fileID: 5966294047732575297}
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
using Ashwild.Inventory;
|
||||
|
||||
namespace Ashwild.Building
|
||||
{
|
||||
/// <summary>
|
||||
/// One resource line of a buildable's price: an authored item and how many of it a single
|
||||
/// placement consumes. Mirrors CraftingIngredient — plain authoring data, no behaviour.
|
||||
/// </summary>
|
||||
[System.Serializable]
|
||||
public struct BuildCost
|
||||
{
|
||||
public ItemData item;
|
||||
public int quantity;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 2915c8306391c7e40a840a6b4ade5a41
|
||||
@@ -0,0 +1,26 @@
|
||||
using UnityEngine;
|
||||
|
||||
namespace Ashwild.Building
|
||||
{
|
||||
/// <summary>
|
||||
/// Lightweight, data-agnostic view payload for one line of a build's cost, handed to the crosshair
|
||||
/// so it can render the price without ever touching BuildableData/ItemData. Carries the icon, how
|
||||
/// many the local player currently holds, the required amount, and whether the line is affordable —
|
||||
/// the manager decides the numbers, the view just renders "owned / required" and colours it.
|
||||
/// </summary>
|
||||
public readonly struct BuildCostView
|
||||
{
|
||||
public readonly Sprite Icon;
|
||||
public readonly int Owned;
|
||||
public readonly int Amount;
|
||||
public readonly bool Affordable;
|
||||
|
||||
public BuildCostView(Sprite icon, int owned, int amount, bool affordable)
|
||||
{
|
||||
Icon = icon;
|
||||
Owned = owned;
|
||||
Amount = amount;
|
||||
Affordable = affordable;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 9d5f455513b7a8345b86ee9f8f2fcaa0
|
||||
@@ -1,6 +1,7 @@
|
||||
using System.Collections.Generic;
|
||||
using FishNet.Object;
|
||||
using UnityEngine;
|
||||
using Ashwild.Inventory;
|
||||
using Ashwild.Player;
|
||||
|
||||
namespace Ashwild.Building
|
||||
@@ -51,6 +52,10 @@ namespace Ashwild.Building
|
||||
[Tooltip("Degrees the ghost yaws per scroll notch while placing.")]
|
||||
[SerializeField] private float rotationStep = 90f;
|
||||
|
||||
[Header("Placement Mode")]
|
||||
[Tooltip("Continuous build: after confirming a placement, immediately re-arm another ghost of the same structure (to chain walls/floors) instead of returning to idle. Off = place one at a time.")]
|
||||
[SerializeField] private bool continuousBuild = false;
|
||||
|
||||
[Header("Snapping")]
|
||||
[Tooltip("Radius around the aim in which a matching existing socket pulls the ghost in.")]
|
||||
[SerializeField] private float snapRadius = 1.25f;
|
||||
@@ -125,6 +130,12 @@ namespace Ashwild.Building
|
||||
|
||||
private readonly Collider[] snapResults = new Collider[16];
|
||||
|
||||
/// <summary>
|
||||
/// Reused buffer for the active build's cost lines, rebuilt and pushed to the crosshair each
|
||||
/// time the price or its affordability changes — so no per-refresh allocation.
|
||||
/// </summary>
|
||||
private readonly List<BuildCostView> costView = new List<BuildCostView>();
|
||||
|
||||
#endregion
|
||||
|
||||
#region Unity Lifecycle
|
||||
@@ -156,6 +167,7 @@ namespace Ashwild.Building
|
||||
PlayerEvents.HotbarScroll += HandleRotate;
|
||||
PlayerEvents.BuildRotatePressed += HandleRotateKey;
|
||||
PlayerEvents.DemolishModeChanged += HandleDemolishModeChanged;
|
||||
PlayerEvents.InventorySlotChanged += HandleInventoryChanged;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -169,6 +181,7 @@ namespace Ashwild.Building
|
||||
PlayerEvents.HotbarScroll -= HandleRotate;
|
||||
PlayerEvents.BuildRotatePressed -= HandleRotateKey;
|
||||
PlayerEvents.DemolishModeChanged -= HandleDemolishModeChanged;
|
||||
PlayerEvents.InventorySlotChanged -= HandleInventoryChanged;
|
||||
|
||||
EndPlacement();
|
||||
ClearDemoTarget();
|
||||
@@ -267,6 +280,7 @@ namespace Ashwild.Building
|
||||
|
||||
PlayerEvents.RaiseBuildMenuToggleRequested();
|
||||
PlayerEvents.RaiseBuildPlacingChanged(true);
|
||||
PublishCostView();
|
||||
BuildRegistry.Instance.RequestSpawnGhost(id, token);
|
||||
}
|
||||
|
||||
@@ -303,8 +317,11 @@ namespace Ashwild.Building
|
||||
|
||||
/// <summary>
|
||||
/// Left-click: demolishes the aimed build while in demolition mode, otherwise commits the
|
||||
/// ghost's pose to the registry (spawned for everyone) and ends the placement. Placement is
|
||||
/// blocked on an invalid spot and on the very frame the ghost was attached.
|
||||
/// ghost's pose to the registry (spawned for everyone) and consumes its resource cost from the
|
||||
/// local inventory (client-authoritative, exactly like crafting). In continuous build mode it
|
||||
/// then re-arms a fresh ghost of the same structure (keeping the current yaw, so pieces chain
|
||||
/// edge-to-edge); otherwise it ends the placement. Blocked on an invalid spot, on the very frame
|
||||
/// the ghost was attached, and when the player cannot afford the cost.
|
||||
/// </summary>
|
||||
private void HandleConfirm()
|
||||
{
|
||||
@@ -318,10 +335,19 @@ namespace Ashwild.Building
|
||||
if (PlayerEvents.InputLocked) return;
|
||||
if (Time.frameCount == placementBeganFrame) return;
|
||||
if (ghostValidity != null && !ghostValidity.IsValid) return;
|
||||
if (active != null && !active.CanAfford(PlayerInventory.Instance)) return;
|
||||
|
||||
if (BuildRegistry.Instance != null)
|
||||
BuildRegistry.Instance.RequestBuild(activeId, ghost.transform.position, ghost.transform.rotation);
|
||||
|
||||
ConsumeCost();
|
||||
|
||||
if (continuousBuild && active != null)
|
||||
{
|
||||
RearmGhost();
|
||||
return;
|
||||
}
|
||||
|
||||
EndPlacement();
|
||||
}
|
||||
|
||||
@@ -435,6 +461,43 @@ namespace Ashwild.Building
|
||||
/// idle. Safe to call when nothing is in flight.
|
||||
/// </summary>
|
||||
private void EndPlacement()
|
||||
{
|
||||
DespawnGhost();
|
||||
|
||||
if (active != null)
|
||||
{
|
||||
active = null;
|
||||
activeId = 0;
|
||||
PlayerEvents.RaiseBuildPlacingChanged(false);
|
||||
PlayerEvents.RaiseBuildCostChanged(null);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Continuous build: after committing a piece, drops the spent ghost and asks the registry for a
|
||||
/// fresh one of the same structure so the player keeps placing without reopening the menu. Keeps
|
||||
/// <see cref="active"/>/<see cref="activeId"/> and the current yaw, and stays "placing" on the
|
||||
/// bus. The token bump makes any in-flight ghost from the old request reject itself in AttachGhost.
|
||||
/// </summary>
|
||||
private void RearmGhost()
|
||||
{
|
||||
DespawnGhost();
|
||||
|
||||
if (BuildRegistry.Instance == null)
|
||||
{
|
||||
EndPlacement();
|
||||
return;
|
||||
}
|
||||
|
||||
int token = ++spawnToken;
|
||||
BuildRegistry.Instance.RequestSpawnGhost(activeId, token);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Despawns the networked ghost we own and clears its cached components, without touching the
|
||||
/// active buildable or the bus. Safe to call when no ghost is live.
|
||||
/// </summary>
|
||||
private void DespawnGhost()
|
||||
{
|
||||
if (ghost != null)
|
||||
{
|
||||
@@ -444,13 +507,6 @@ namespace Ashwild.Building
|
||||
}
|
||||
ghostValidity = null;
|
||||
ghostSnaps = null;
|
||||
|
||||
if (active != null)
|
||||
{
|
||||
active = null;
|
||||
activeId = 0;
|
||||
PlayerEvents.RaiseBuildPlacingChanged(false);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -469,6 +525,86 @@ namespace Ashwild.Building
|
||||
|
||||
#endregion
|
||||
|
||||
#region Build Cost
|
||||
|
||||
/// <summary>
|
||||
/// Refreshes the crosshair cost display when the inventory changes mid-placement (a resource was
|
||||
/// spent or picked up), so its affordability colouring stays live. No-op while idle.
|
||||
/// </summary>
|
||||
private void HandleInventoryChanged(int slotIndex)
|
||||
{
|
||||
if (active == null) return;
|
||||
PublishCostView();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Rebuilds the active build's cost lines into the reused buffer — each with the local player's
|
||||
/// current affordability — and pushes them to the crosshair via the bus. Clears the display when
|
||||
/// idle or when the build is free (no cost lines).
|
||||
/// </summary>
|
||||
private void PublishCostView()
|
||||
{
|
||||
BuildCost[] cost = active != null ? active.Cost : null;
|
||||
if (cost == null || cost.Length == 0)
|
||||
{
|
||||
PlayerEvents.RaiseBuildCostChanged(null);
|
||||
return;
|
||||
}
|
||||
|
||||
PlayerInventory inv = PlayerInventory.Instance;
|
||||
costView.Clear();
|
||||
foreach (BuildCost line in cost)
|
||||
{
|
||||
if (line.item == null) continue;
|
||||
int owned = inv != null ? inv.CountItem(line.item) : 0;
|
||||
bool affordable = owned >= line.quantity;
|
||||
costView.Add(new BuildCostView(line.item.Icon, owned, line.quantity, affordable));
|
||||
}
|
||||
PlayerEvents.RaiseBuildCostChanged(costView);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Spends the active build's cost from the local inventory after a committed placement. Client-
|
||||
/// authoritative like crafting — the inventory change refreshes the cost view through
|
||||
/// <see cref="HandleInventoryChanged"/>. No-op for a free build or when offline.
|
||||
/// </summary>
|
||||
private void ConsumeCost()
|
||||
{
|
||||
BuildCost[] cost = active != null ? active.Cost : null;
|
||||
if (cost == null || cost.Length == 0) return;
|
||||
|
||||
PlayerInventory inv = PlayerInventory.Instance;
|
||||
if (inv == null) return;
|
||||
|
||||
foreach (BuildCost line in cost)
|
||||
{
|
||||
if (line.item == null) continue;
|
||||
inv.RemoveItemByData(line.item, line.quantity);
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Public API
|
||||
|
||||
/// <summary>
|
||||
/// Whether confirming a placement immediately re-arms another ghost of the same structure
|
||||
/// (continuous build) instead of returning to idle. Settable so a key or menu toggle can flip it.
|
||||
/// </summary>
|
||||
public bool ContinuousBuild
|
||||
{
|
||||
get => continuousBuild;
|
||||
set => continuousBuild = value;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Flips continuous build on/off — wire this to a key or a menu toggle so the player can switch
|
||||
/// between chaining placements and placing one at a time.
|
||||
/// </summary>
|
||||
public void ToggleContinuousBuild() => continuousBuild = !continuousBuild;
|
||||
|
||||
#endregion
|
||||
|
||||
#region Demolition
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using UnityEngine;
|
||||
using Ashwild.Inventory;
|
||||
|
||||
namespace Ashwild.Building
|
||||
{
|
||||
@@ -30,6 +31,10 @@ namespace Ashwild.Building
|
||||
[Tooltip("The real structure spawned once the placement is confirmed.")]
|
||||
[SerializeField] private GameObject builtPrefab;
|
||||
|
||||
[Header("Cost")]
|
||||
[Tooltip("Resources consumed from the builder's inventory on each placement. Leave empty for a free build.")]
|
||||
[SerializeField] private BuildCost[] cost;
|
||||
|
||||
#endregion
|
||||
|
||||
#region Public API
|
||||
@@ -39,6 +44,24 @@ namespace Ashwild.Building
|
||||
public string Description => description;
|
||||
public GameObject GhostPrefab => ghostPrefab;
|
||||
public GameObject BuiltPrefab => builtPrefab;
|
||||
public BuildCost[] Cost => cost;
|
||||
|
||||
/// <summary>
|
||||
/// Whether the given inventory holds enough of every cost line to place this structure once.
|
||||
/// A null inventory or an empty cost list counts as affordable (free build).
|
||||
/// </summary>
|
||||
public bool CanAfford(PlayerInventory inventory)
|
||||
{
|
||||
if (cost == null || cost.Length == 0) return true;
|
||||
if (inventory == null) return false;
|
||||
|
||||
for (int i = 0; i < cost.Length; i++)
|
||||
{
|
||||
if (cost[i].item == null) continue;
|
||||
if (!inventory.HasItem(cost[i].item, cost[i].quantity)) return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
|
||||
@@ -23,6 +23,12 @@ namespace Ashwild.EditorTools
|
||||
/// </summary>
|
||||
private enum LightingPreset { Studio, Soft, Dramatic, Flat }
|
||||
|
||||
/// <summary>
|
||||
/// Which asset kind the Target object picker is filtered to — prefabs/scene objects or raw
|
||||
/// meshes. Materials, scripts and other assets are intentionally excluded from both.
|
||||
/// </summary>
|
||||
private enum TargetKind { Prefab, Mesh }
|
||||
|
||||
#endregion
|
||||
|
||||
#region Constants
|
||||
@@ -46,6 +52,8 @@ namespace Ashwild.EditorTools
|
||||
private string exportFileName = string.Empty;
|
||||
private bool nameEditedByUser;
|
||||
|
||||
private TargetKind targetKind = TargetKind.Prefab;
|
||||
|
||||
private bool autoRotate;
|
||||
private IVisualElementScheduledItem rotateSchedule;
|
||||
|
||||
@@ -172,15 +180,30 @@ namespace Ashwild.EditorTools
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Target card: the object field (prefab / scene object / mesh) plus quick Frame and auto-rotate
|
||||
/// controls that act on the loaded subject.
|
||||
/// Target card: a Prefab/Mesh kind selector that filters the object picker to only those assets
|
||||
/// (so materials, scripts and the like never clutter it), the object field itself, plus quick
|
||||
/// Frame and auto-rotate controls that act on the loaded subject.
|
||||
/// </summary>
|
||||
private VisualElement BuildTargetCard()
|
||||
{
|
||||
VisualElement card = Card("Target");
|
||||
|
||||
ObjectField field = new ObjectField("Object") { objectType = typeof(UnityEngine.Object), allowSceneObjects = true };
|
||||
ObjectField field = new ObjectField("Object")
|
||||
{
|
||||
objectType = TargetObjectType(),
|
||||
allowSceneObjects = targetKind == TargetKind.Prefab
|
||||
};
|
||||
field.RegisterValueChangedCallback(evt => LoadTarget(evt.newValue));
|
||||
|
||||
EnumField kind = new EnumField("Kind", targetKind);
|
||||
kind.RegisterValueChangedCallback(evt =>
|
||||
{
|
||||
targetKind = (TargetKind)evt.newValue;
|
||||
field.value = null;
|
||||
field.objectType = TargetObjectType();
|
||||
field.allowSceneObjects = targetKind == TargetKind.Prefab;
|
||||
});
|
||||
card.Add(kind);
|
||||
card.Add(field);
|
||||
|
||||
VisualElement buttons = new VisualElement();
|
||||
@@ -198,6 +221,12 @@ namespace Ashwild.EditorTools
|
||||
return card;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The Unity type the object picker is restricted to for the current kind — GameObject for
|
||||
/// prefabs/scene objects, Mesh for raw meshes — so nothing else appears in the picker.
|
||||
/// </summary>
|
||||
private Type TargetObjectType() => targetKind == TargetKind.Mesh ? typeof(Mesh) : typeof(GameObject);
|
||||
|
||||
/// <summary>
|
||||
/// Camera card: projection, field of view and framing padding.
|
||||
/// </summary>
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using UnityEngine;
|
||||
using Ashwild.Audio;
|
||||
using Ashwild.Building;
|
||||
using Ashwild.Harvesting;
|
||||
using Ashwild.Interaction;
|
||||
using Ashwild.Inventory;
|
||||
@@ -135,6 +137,7 @@ namespace Ashwild.Player
|
||||
public static event Action<bool> BuildMenuOpenChanged; // the construction menu opened (true) or closed (false)
|
||||
public static event Action<bool> BuildPlacingChanged; // a build ghost started (true) / stopped (false) being positioned
|
||||
public static event Action<bool> DemolishModeChanged; // the hammer entered (true) / left (false) demolition mode (right-click held)
|
||||
public static event Action<IReadOnlyList<BuildCostView>> BuildCostChanged; // the active build's cost to display near the crosshair (null/empty = clear)
|
||||
|
||||
// ============================================================
|
||||
// Cooking events
|
||||
@@ -305,6 +308,17 @@ namespace Ashwild.Player
|
||||
BuildPlacingChanged?.Invoke(placing);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Publishes the active build's cost lines for the crosshair to render (or a null/empty list to
|
||||
/// clear it). Owner-side only; BuildManager re-raises it live as the inventory changes so the
|
||||
/// affordability colouring stays current while a piece is being positioned.
|
||||
/// </summary>
|
||||
public static void RaiseBuildCostChanged(IReadOnlyList<BuildCostView> cost)
|
||||
{
|
||||
Log(nameof(BuildCostChanged));
|
||||
BuildCostChanged?.Invoke(cost);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Toggles demolition mode (right-click held with the hammer out). Owner-side only; the
|
||||
/// hammer raises it and BuildManager drives the world-facing targeting/destroy from it.
|
||||
|
||||
@@ -0,0 +1,56 @@
|
||||
using TMPro;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
||||
namespace Ashwild.UI
|
||||
{
|
||||
/// <summary>
|
||||
/// One resource line of a build's cost, shown near the crosshair while placing: an icon plus an
|
||||
/// "owned / required" count (e.g. 2/3). A pure, data-agnostic view — it is handed an icon, the two
|
||||
/// numbers and an "affordable" flag and renders exactly that (tinting the count to signal a
|
||||
/// shortfall), never resolving any domain data itself. CrosshairManager instantiates one of these
|
||||
/// per cost line into its holder.
|
||||
/// </summary>
|
||||
[DisallowMultipleComponent]
|
||||
public class BuildCostEntryUI : MonoBehaviour
|
||||
{
|
||||
#region Serialized Fields
|
||||
|
||||
[Header("References")]
|
||||
[Tooltip("Icon of the required resource.")]
|
||||
[SerializeField] private Image icon;
|
||||
|
||||
[Tooltip("Owned / required count for one placement (e.g. 2/3).")]
|
||||
[SerializeField] private TMP_Text amountLabel;
|
||||
|
||||
[Header("Affordability Colours")]
|
||||
[Tooltip("Amount colour when the player holds enough of this resource.")]
|
||||
[SerializeField] private Color affordColor = Color.white;
|
||||
|
||||
[Tooltip("Amount colour when the player is short of this resource.")]
|
||||
[SerializeField] private Color missingColor = new Color(1f, 0.35f, 0.35f);
|
||||
|
||||
#endregion
|
||||
|
||||
#region Public API
|
||||
|
||||
/// <summary>
|
||||
/// Fills the line: sets the icon, the "owned / required" count, and tints it by affordability.
|
||||
/// </summary>
|
||||
public void Set(Sprite resourceIcon, int owned, int amount, bool affordable)
|
||||
{
|
||||
if (icon != null)
|
||||
{
|
||||
icon.sprite = resourceIcon;
|
||||
icon.enabled = resourceIcon != null;
|
||||
}
|
||||
if (amountLabel != null)
|
||||
{
|
||||
amountLabel.text = $"{owned}/{amount}";
|
||||
amountLabel.color = affordable ? affordColor : missingColor;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: b197776c5c48d19409d8b73a5f77bcfb
|
||||
@@ -1,7 +1,9 @@
|
||||
using System.Collections.Generic;
|
||||
using DG.Tweening;
|
||||
using TMPro;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
using Ashwild.Building;
|
||||
using Ashwild.Interaction;
|
||||
using Ashwild.Player;
|
||||
|
||||
@@ -39,6 +41,18 @@ namespace Ashwild.UI
|
||||
/// </summary>
|
||||
[SerializeField] private TMP_Text promptLabel;
|
||||
|
||||
[Header("Build Cost")]
|
||||
/// <summary>
|
||||
/// Container the per-resource cost entries are parented under while a build is being placed.
|
||||
/// Its own layout (e.g. a HorizontalLayoutGroup) arranges them.
|
||||
/// </summary>
|
||||
[SerializeField] private RectTransform costHolder;
|
||||
|
||||
/// <summary>
|
||||
/// Prefab instantiated once per cost line (icon + amount) into the holder. Pooled and reused.
|
||||
/// </summary>
|
||||
[SerializeField] private BuildCostEntryUI costEntryPrefab;
|
||||
|
||||
[Header("States")]
|
||||
/// <summary>
|
||||
/// Look used when nothing is hovered (the plain dot).
|
||||
@@ -101,6 +115,18 @@ namespace Ashwild.UI
|
||||
/// </summary>
|
||||
private string currentPrompt;
|
||||
|
||||
/// <summary>
|
||||
/// True while a build's cost is displayed: the prompt label is suppressed and the holder takes
|
||||
/// over, so a hovered interactable's prompt never fights the cost readout mid-placement.
|
||||
/// </summary>
|
||||
private bool isShowingCost;
|
||||
|
||||
/// <summary>
|
||||
/// The instantiated cost entries, pooled and reused across placements — activated up to the
|
||||
/// current cost's line count and hidden beyond it.
|
||||
/// </summary>
|
||||
private readonly List<BuildCostEntryUI> costEntries = new List<BuildCostEntryUI>();
|
||||
|
||||
#endregion
|
||||
|
||||
#region Unity Lifecycle
|
||||
@@ -126,6 +152,7 @@ namespace Ashwild.UI
|
||||
private void OnEnable()
|
||||
{
|
||||
PlayerEvents.InteractableHoverChanged += HandleHoverChanged;
|
||||
PlayerEvents.BuildCostChanged += HandleBuildCostChanged;
|
||||
ApplyState(idleState, isHover: false, animated: false);
|
||||
SetLabel(null, animated: false);
|
||||
}
|
||||
@@ -136,6 +163,7 @@ namespace Ashwild.UI
|
||||
private void OnDisable()
|
||||
{
|
||||
PlayerEvents.InteractableHoverChanged -= HandleHoverChanged;
|
||||
PlayerEvents.BuildCostChanged -= HandleBuildCostChanged;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -151,7 +179,7 @@ namespace Ashwild.UI
|
||||
if (prompt != currentPrompt)
|
||||
{
|
||||
currentPrompt = prompt;
|
||||
SetLabel(prompt, animated: true);
|
||||
if (!isShowingCost) SetLabel(prompt, animated: true);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -180,7 +208,24 @@ namespace Ashwild.UI
|
||||
currentPrompt = hovering ? target.InteractionPrompt : null;
|
||||
|
||||
ApplyState(hovering ? hoverState : idleState, hovering, animated: true);
|
||||
SetLabel(currentPrompt, animated: true);
|
||||
if (!isShowingCost) SetLabel(currentPrompt, animated: true);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Shows the active build's cost (hiding the prompt label and filling the holder) while placing,
|
||||
/// or clears it and restores the normal prompt when the list is null/empty (placement ended).
|
||||
/// </summary>
|
||||
private void HandleBuildCostChanged(IReadOnlyList<BuildCostView> cost)
|
||||
{
|
||||
if (cost == null || cost.Count == 0)
|
||||
{
|
||||
ClearCost();
|
||||
return;
|
||||
}
|
||||
|
||||
isShowingCost = true;
|
||||
SetLabel(null, animated: true);
|
||||
PopulateCost(cost);
|
||||
}
|
||||
|
||||
#endregion
|
||||
@@ -243,6 +288,55 @@ namespace Ashwild.UI
|
||||
a => promptLabel.alpha = a, target, labelFadeDuration);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Fills the holder with one entry per cost line, reusing pooled entries and only instantiating
|
||||
/// when the current build needs more lines than any previous one. Entries beyond this build's
|
||||
/// count are hidden. Logs and no-ops when the holder or prefab reference is missing.
|
||||
/// </summary>
|
||||
private void PopulateCost(IReadOnlyList<BuildCostView> cost)
|
||||
{
|
||||
if (costHolder == null || costEntryPrefab == null)
|
||||
{
|
||||
Debug.LogError("[CrosshairManager] Cost holder or entry prefab not assigned — cannot show the build cost.", this);
|
||||
return;
|
||||
}
|
||||
|
||||
for (int i = 0; i < cost.Count; i++)
|
||||
{
|
||||
BuildCostEntryUI entry;
|
||||
if (i < costEntries.Count)
|
||||
{
|
||||
entry = costEntries[i];
|
||||
}
|
||||
else
|
||||
{
|
||||
entry = Instantiate(costEntryPrefab, costHolder);
|
||||
costEntries.Add(entry);
|
||||
}
|
||||
|
||||
entry.gameObject.SetActive(true);
|
||||
entry.Set(cost[i].Icon, cost[i].Owned, cost[i].Amount, cost[i].Affordable);
|
||||
}
|
||||
|
||||
for (int i = cost.Count; i < costEntries.Count; i++)
|
||||
if (costEntries[i] != null) costEntries[i].gameObject.SetActive(false);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Hides every cost entry and restores the prompt for whatever is currently hovered. No-op when
|
||||
/// no cost is being shown.
|
||||
/// </summary>
|
||||
private void ClearCost()
|
||||
{
|
||||
if (!isShowingCost) return;
|
||||
isShowingCost = false;
|
||||
|
||||
for (int i = 0; i < costEntries.Count; i++)
|
||||
if (costEntries[i] != null) costEntries[i].gameObject.SetActive(false);
|
||||
|
||||
SetLabel(currentPrompt, animated: true);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Kills every cached tween so none survive a disable/destroy.
|
||||
/// </summary>
|
||||
|
||||
@@ -6,6 +6,11 @@ using Ashwild.Player;
|
||||
|
||||
namespace Ashwild.UI
|
||||
{
|
||||
/// <summary>
|
||||
/// Drives the on-screen item/recipe notification stack. Incoming notifications are queued and
|
||||
/// released one at a time on a short delay, so a burst (e.g. one pickup unlocking several recipes)
|
||||
/// reveals gradually instead of popping all at once, capped by a max on-screen count.
|
||||
/// </summary>
|
||||
public class NotificationUI : MonoBehaviour
|
||||
{
|
||||
[Header("References")]
|
||||
@@ -35,7 +40,30 @@ namespace Ashwild.UI
|
||||
[SerializeField] private string discoveryLabel = "NEW";
|
||||
[SerializeField] private Color discoveryColor = new Color(1f, 0.85f, 0.3f);
|
||||
|
||||
[Header("Queue")]
|
||||
[Tooltip("Minimum delay between two notifications appearing, so a burst reveals one at a time.")]
|
||||
[SerializeField] private float spawnDelay = 0.5f;
|
||||
[Tooltip("Maximum notifications visible on screen at once; the rest wait in the queue.")]
|
||||
[SerializeField] private int maxActiveNotifications = 5;
|
||||
[Tooltip("Maximum notifications waiting in the queue; beyond this the oldest pending one is dropped.")]
|
||||
[SerializeField] private int maxQueuedNotifications = 20;
|
||||
|
||||
private readonly List<NotificationItemUI> activeNotifications = new List<NotificationItemUI>();
|
||||
private readonly Queue<PendingNotification> pendingQueue = new Queue<PendingNotification>();
|
||||
private float spawnCooldown;
|
||||
|
||||
/// <summary>
|
||||
/// A notification waiting to be shown. Holds either an item gain/loss (item + signed quantity,
|
||||
/// still mergeable while queued) or a recipe discovery (icon + name).
|
||||
/// </summary>
|
||||
private class PendingNotification
|
||||
{
|
||||
public bool isDiscovery;
|
||||
public ItemData item;
|
||||
public int signedQuantity;
|
||||
public Sprite icon;
|
||||
public string label;
|
||||
}
|
||||
|
||||
private void OnEnable()
|
||||
{
|
||||
@@ -65,16 +93,18 @@ namespace Ashwild.UI
|
||||
// Food placed on a cooking station or fuel fed to it both leave the inventory by one.
|
||||
private void OnItemSpent(ItemData item) => Push(item, -1);
|
||||
|
||||
/// <summary>
|
||||
/// Records an item gain/loss. Merges instantly into a matching active notification, then into a
|
||||
/// matching one still queued, otherwise enqueues a new one to be released on the spawn delay.
|
||||
/// </summary>
|
||||
private void Push(ItemData item, int signedQuantity)
|
||||
{
|
||||
if (item == null || signedQuantity == 0) return;
|
||||
|
||||
// Clean up destroyed notifications
|
||||
activeNotifications.RemoveAll(n => n == null);
|
||||
|
||||
bool gain = signedQuantity > 0;
|
||||
|
||||
// Merge only with a notification for the same item AND same direction
|
||||
for (int i = 0; i < activeNotifications.Count; i++)
|
||||
{
|
||||
if (activeNotifications[i] != null && !activeNotifications[i].IsDiscovery
|
||||
@@ -86,31 +116,62 @@ namespace Ashwild.UI
|
||||
}
|
||||
}
|
||||
|
||||
// Create new notification
|
||||
GameObject go = Instantiate(notificationPrefab, container);
|
||||
NotificationItemUI notification = go.GetComponent<NotificationItemUI>();
|
||||
foreach (PendingNotification pending in pendingQueue)
|
||||
{
|
||||
if (!pending.isDiscovery && pending.item == item && (pending.signedQuantity > 0) == gain)
|
||||
{
|
||||
pending.signedQuantity += signedQuantity;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
float targetY = startOffsetY + activeNotifications.Count * (notificationHeight + spacing);
|
||||
|
||||
RectTransform rt = notification.RectTransform;
|
||||
rt.anchoredPosition = new Vector2(0f, targetY - 30f);
|
||||
|
||||
notification.Initialize(item, signedQuantity, gain ? gainColor : lossColor, displayDuration, slideInDuration, slideInEase);
|
||||
|
||||
// Slide in from below
|
||||
rt.DOAnchorPosY(targetY, slideInDuration).SetEase(slideInEase);
|
||||
|
||||
activeNotifications.Add(notification);
|
||||
Enqueue(new PendingNotification { isDiscovery = false, item = item, signedQuantity = signedQuantity });
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Pushes a one-time "NEW" notification for a newly unlocked recipe: its result icon and name
|
||||
/// with the configured badge in the discovery colour. Never merges with anything.
|
||||
/// Enqueues a one-time "NEW" notification for a newly unlocked recipe (its result icon and name
|
||||
/// with the discovery badge). Never merges; released on the spawn delay like the rest.
|
||||
/// </summary>
|
||||
private void PushDiscovery(Sprite icon, string recipeName)
|
||||
{
|
||||
activeNotifications.RemoveAll(n => n == null);
|
||||
Enqueue(new PendingNotification { isDiscovery = true, icon = icon, label = recipeName });
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Adds a pending notification to the queue, dropping the oldest waiting one when the queue is
|
||||
/// full so the most recent notifications are never lost.
|
||||
/// </summary>
|
||||
private void Enqueue(PendingNotification pending)
|
||||
{
|
||||
if (pendingQueue.Count >= maxQueuedNotifications)
|
||||
pendingQueue.Dequeue();
|
||||
pendingQueue.Enqueue(pending);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Ticks the spawn cooldown and releases at most one queued notification per delay, while the
|
||||
/// on-screen count is under the cap.
|
||||
/// </summary>
|
||||
private void Update()
|
||||
{
|
||||
if (spawnCooldown > 0f)
|
||||
spawnCooldown -= Time.deltaTime;
|
||||
|
||||
if (pendingQueue.Count == 0 || spawnCooldown > 0f) return;
|
||||
|
||||
activeNotifications.RemoveAll(n => n == null);
|
||||
if (activeNotifications.Count >= maxActiveNotifications) return;
|
||||
|
||||
Spawn(pendingQueue.Dequeue());
|
||||
spawnCooldown = spawnDelay;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Instantiates and slides in a notification for a released pending entry, wiring it as either
|
||||
/// an item gain/loss or a recipe discovery.
|
||||
/// </summary>
|
||||
private void Spawn(PendingNotification pending)
|
||||
{
|
||||
GameObject go = Instantiate(notificationPrefab, container);
|
||||
NotificationItemUI notification = go.GetComponent<NotificationItemUI>();
|
||||
|
||||
@@ -119,7 +180,10 @@ namespace Ashwild.UI
|
||||
RectTransform rt = notification.RectTransform;
|
||||
rt.anchoredPosition = new Vector2(0f, targetY - 30f);
|
||||
|
||||
notification.InitializeDiscovery(icon, recipeName, discoveryLabel, discoveryColor, displayDuration, slideInDuration);
|
||||
if (pending.isDiscovery)
|
||||
notification.InitializeDiscovery(pending.icon, pending.label, discoveryLabel, discoveryColor, displayDuration, slideInDuration);
|
||||
else
|
||||
notification.Initialize(pending.item, pending.signedQuantity, pending.signedQuantity > 0 ? gainColor : lossColor, displayDuration, slideInDuration, slideInEase);
|
||||
|
||||
rt.DOAnchorPosY(targetY, slideInDuration).SetEase(slideInEase);
|
||||
|
||||
|
||||
@@ -17,3 +17,6 @@ MonoBehaviour:
|
||||
description:
|
||||
ghostPrefab: {fileID: 3305094920675404345, guid: 39b04625f47cbc24a93966c3eb0194d2, type: 3}
|
||||
builtPrefab: {fileID: 3209735075952564995, guid: adbf0247d50ef68409136335af276fc1, type: 3}
|
||||
cost:
|
||||
- item: {fileID: 11400000, guid: 9340c6bceb10c9b47bdaf993427004e3, type: 2}
|
||||
quantity: 2
|
||||
|
||||
Reference in New Issue
Block a user