Squashed commit of the following:

commit 428243f4a6
Author: AsanoRema <asanorema2036@gmail.com>
Date:   Sat Aug 29 13:43:13 2026 +0300

    Squashed commit of the following:

    commit 68e78fa464
    Author: AsanoRema <asanorema2036@gmail.com>
    Date:   Sat Aug 29 13:41:49 2026 +0300

        Updated .gitignore

commit 9f87122a34
Author: AsanoRema <asanorema2036@gmail.com>
Date:   Sat Aug 29 13:34:57 2026 +0300

    Added Dohya

commit f6a7547e84
Author: AsanoRema <asanorema2036@gmail.com>
Date:   Fri Aug 21 17:59:13 2026 +0300

    Fixed

commit b98901c366
Author: AsanoRema <asanorema2036@gmail.com>
Date:   Tue Aug 18 17:37:22 2026 +0300

    Added new particle Package

commit bb2f4a3b16
Author: AsanoRema <asanorema2036@gmail.com>
Date:   Tue Aug 18 17:17:48 2026 +0300

    Map mehanic ready to multiplayer

commit c01ff800f6
Author: AsanoRema <asanorema2036@gmail.com>
Date:   Tue Aug 18 16:16:19 2026 +0300

    Squashed commit of the following:

    commit 173bbb165c
    Author: henjkey <henjkey@gmail.com>
    Date:   Fri Aug 14 18:51:23 2026 +0500

        Mappp

    commit d559ab338a
    Author: henjkey <henjkey@gmail.com>
    Date:   Thu Aug 13 18:42:41 2026 +0500

        Map

        Controller
        Coordinates
        Target System
        Crosshair System
        Radar System
This commit is contained in:
2026-08-29 13:45:55 +03:00
parent 68e78fa464
commit ffa1064063
3344 changed files with 4722286 additions and 105458 deletions
@@ -0,0 +1,496 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &520170659301187973
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 2206310561012978678}
- component: {fileID: 4792855317359411992}
m_Layer: 0
m_Name: SpotLight
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &2206310561012978678
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 520170659301187973}
serializedVersion: 2
m_LocalRotation: {x: -0.70710665, y: 0.00000005960463, z: -0, w: 0.7071069}
m_LocalPosition: {x: -0, y: 0.704, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 2371874563288267224}
m_LocalEulerAnglesHint: {x: -90, y: 0, z: 0}
--- !u!114 &4792855317359411992
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 520170659301187973}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 57f24a4aaa0761b45ba25e7e5108e2c7, type: 3}
m_Name:
m_EditorClassIdentifier:
UID: -813631845
color: {r: 1, g: 0.59607846, b: 0.2509804, a: 1}
intensity: 8
shadowSpread: 19.21
cutoff: 23.39
realisticFalloff: 0
legacySampling: 1
samples: 8
projMode: 1
cookie: {fileID: 2800000, guid: 3a66602b8cc7fdd4ab57d07b4176432b, type: 3}
angle: 81.6
innerAngle: 0
cubemap: {fileID: 0}
iesFile: {fileID: 0}
bitmask: 1
bakeToIndirect: 0
shadowmask: 1
shadowmaskFalloff: 0
indirectIntensity: 1
falloffMinRadius: 1
shadowmaskGroupID: 0
correctCookieDistortion: 0
directionMode: 0
maskChannel: -1
--- !u!1 &1397826288701945389
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 3747498783679337424}
- component: {fileID: 5094545500544715137}
- component: {fileID: 4495041903039002628}
m_Layer: 0
m_Name: glass
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &3747498783679337424
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1397826288701945389}
serializedVersion: 2
m_LocalRotation: {x: 0.7071068, y: -0.000000029802319, z: -0.000000029802319, w: 0.7071068}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 0.18108746, y: 0.5606755, z: 0.20428677}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 5740601329577731737}
m_LocalEulerAnglesHint: {x: 90, y: 0, z: 0}
--- !u!33 &5094545500544715137
MeshFilter:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1397826288701945389}
m_Mesh: {fileID: 10206, guid: 0000000000000000e000000000000000, type: 0}
--- !u!23 &4495041903039002628
MeshRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1397826288701945389}
m_Enabled: 1
m_CastShadows: 0
m_ReceiveShadows: 1
m_DynamicOccludee: 1
m_StaticShadowCaster: 0
m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1
m_RayTracingMode: 2
m_RayTraceProcedural: 0
m_RayTracingAccelStructBuildFlagsOverride: 0
m_RayTracingAccelStructBuildFlags: 1
m_SmallMeshCulling: 1
m_RenderingLayerMask: 1
m_RendererPriority: 0
m_Materials:
- {fileID: 2100000, guid: afceb5457305a864bb578e1fc77ca940, 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: 1
m_SelectedEditorRenderState: 3
m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0}
m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 0
m_AdditionalVertexStreams: {fileID: 0}
--- !u!1 &1648616526147513975
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 3793244799321850243}
- component: {fileID: 3975875515013290739}
m_Layer: 0
m_Name: PointLight
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &3793244799321850243
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1648616526147513975}
serializedVersion: 2
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: -0, y: 0.9, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 2371874563288267224}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &3975875515013290739
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1648616526147513975}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 57f24a4aaa0761b45ba25e7e5108e2c7, type: 3}
m_Name:
m_EditorClassIdentifier:
UID: 1419186854
color: {r: 1, g: 0.5973354, b: 0.25, a: 1}
intensity: 8
shadowSpread: 15.03
cutoff: 48.67
realisticFalloff: 0
legacySampling: 1
samples: 8
projMode: 0
cookie: {fileID: 0}
angle: 30
innerAngle: 0
cubemap: {fileID: 0}
iesFile: {fileID: 0}
bitmask: 1
bakeToIndirect: 0
shadowmask: 1
shadowmaskFalloff: 0
indirectIntensity: 1
falloffMinRadius: 1
shadowmaskGroupID: 0
correctCookieDistortion: 0
directionMode: 0
maskChannel: -1
--- !u!1 &3484303684123187976
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 6985658103055957395}
- component: {fileID: 2276681908126484930}
- component: {fileID: 6929608877899236668}
m_Layer: 0
m_Name: light_ON
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &6985658103055957395
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3484303684123187976}
serializedVersion: 2
m_LocalRotation: {x: 0.7071068, y: -0.000000029802319, z: -0.000000029802319, w: 0.7071068}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 0.13025999, y: 0.5606755, z: 0.13026}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 5740601329577731737}
m_LocalEulerAnglesHint: {x: 90, y: 0, z: 0}
--- !u!33 &2276681908126484930
MeshFilter:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3484303684123187976}
m_Mesh: {fileID: 10206, guid: 0000000000000000e000000000000000, type: 0}
--- !u!23 &6929608877899236668
MeshRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3484303684123187976}
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: 2
m_RayTraceProcedural: 0
m_RayTracingAccelStructBuildFlagsOverride: 0
m_RayTracingAccelStructBuildFlags: 1
m_SmallMeshCulling: 1
m_RenderingLayerMask: 1
m_RendererPriority: 0
m_Materials:
- {fileID: 2100000, guid: a30ef186e1631d548923d3ee3ffe40a1, 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: 1
m_SelectedEditorRenderState: 3
m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0}
m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 0
m_AdditionalVertexStreams: {fileID: 0}
--- !u!1 &6088300802361778717
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 2371874563288267224}
m_Layer: 0
m_Name: Light
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &2371874563288267224
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6088300802361778717}
serializedVersion: 2
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 2206310561012978678}
- {fileID: 3793244799321850243}
m_Father: {fileID: 2556529338438999909}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &6554985131126857985
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 5740601329577731737}
m_Layer: 0
m_Name: Root
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &5740601329577731737
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6554985131126857985}
serializedVersion: 2
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 346950165863750203}
- {fileID: 6985658103055957395}
- {fileID: 3747498783679337424}
m_Father: {fileID: 2556529338438999909}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &7200873662106554788
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 346950165863750203}
- component: {fileID: 8739717234128553720}
- component: {fileID: 8731792145617502253}
m_Layer: 0
m_Name: ledbase_cylinder
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &346950165863750203
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7200873662106554788}
serializedVersion: 2
m_LocalRotation: {x: -0.7071068, y: 0.000000029802319, z: -0.000000029802319, w: 0.7071068}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 5740601329577731737}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!33 &8739717234128553720
MeshFilter:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7200873662106554788}
m_Mesh: {fileID: -2471094238658125912, guid: 7e8daf449c6012c4cafdad579890c8c8, type: 3}
--- !u!23 &8731792145617502253
MeshRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7200873662106554788}
m_Enabled: 1
m_CastShadows: 0
m_ReceiveShadows: 1
m_DynamicOccludee: 1
m_StaticShadowCaster: 0
m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1
m_RayTracingMode: 2
m_RayTraceProcedural: 0
m_RayTracingAccelStructBuildFlagsOverride: 0
m_RayTracingAccelStructBuildFlags: 1
m_SmallMeshCulling: 1
m_RenderingLayerMask: 1
m_RendererPriority: 0
m_Materials:
- {fileID: 2100000, guid: 99ed8d283967af84fbd29f53f9c7eae8, 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: 1
m_SelectedEditorRenderState: 3
m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0}
m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 0
m_AdditionalVertexStreams: {fileID: 0}
--- !u!1 &8172085328119743483
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 2556529338438999909}
m_Layer: 0
m_Name: Obj-LED_Light_5
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &2556529338438999909
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8172085328119743483}
serializedVersion: 2
m_LocalRotation: {x: 0.6532815, y: 0.27059805, z: -0.6532815, w: 0.27059805}
m_LocalPosition: {x: 113.59, y: 10.550025, z: 47}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 5740601329577731737}
- {fileID: 2371874563288267224}
m_Father: {fileID: 0}
m_LocalEulerAnglesHint: {x: 45, y: -90, z: -180}
@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 25d6ee7d7e018e042929c21d2d882f17
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
+45
View File
@@ -0,0 +1,45 @@
%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: M-Assemblers
m_Shader: {fileID: 4800000, guid: 97e50197142e4734b97c64bf8928b7b0, type: 3}
m_Parent: {fileID: 2100000, guid: 4ecb57b5baf9ee34480d85f2454a5739, type: 2}
m_ModifiedSerializedProperties: 2
m_ValidKeywords: []
m_InvalidKeywords: []
m_LightmapFlags: 2
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap: {}
disabledShaderPasses:
- MOTIONVECTORS
m_LockedProperties:
m_SavedProperties:
serializedVersion: 3
m_TexEnvs: []
m_Ints: []
m_Floats:
- _CellSize: 0.2
m_Colors: []
m_BuildTextureStacks: []
m_AllowLocking: 1
--- !u!114 &5200259067815824920
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:
version: 10
+8
View File
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: d8b030bffcf8c3642ba7c01047cfe9de
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 2100000
userData:
assetBundleName:
assetBundleVariant:
+3 -6
View File
@@ -21,19 +21,16 @@ Material:
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: M-Bakery
m_Shader: {fileID: -6465566751694194690, guid: 5307d81f6ff873f45a88212286d0a150, type: 3}
m_Shader: {fileID: -6465566751694194690, guid: 69ea671881144b647a61a1b5cc40254a, type: 3}
m_Parent: {fileID: 0}
m_ModifiedSerializedProperties: 0
m_ValidKeywords:
- BAKERY_MODE_NONE
- VOLUME_SHADOWMASK
m_ValidKeywords: []
m_InvalidKeywords: []
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap:
RenderType: Opaque
stringTagMap: {}
disabledShaderPasses:
- MOTIONVECTORS
m_LockedProperties:
+137
View File
@@ -0,0 +1,137 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &-9178271237383575576
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:
version: 10
--- !u!21 &2100000
Material:
serializedVersion: 8
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: M-LightEmission 1
m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, type: 3}
m_Parent: {fileID: 0}
m_ModifiedSerializedProperties: 0
m_ValidKeywords:
- _EMISSION
m_InvalidKeywords: []
m_LightmapFlags: 2
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap:
RenderType: Opaque
disabledShaderPasses:
- MOTIONVECTORS
m_LockedProperties:
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _BaseMap:
m_Texture: {fileID: 0}
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}
- _DetailAlbedoMap:
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: 0}
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
- _Blend: 0
- _BlendModePreserveSpecular: 1
- _BumpScale: 1
- _ClearCoatMask: 0
- _ClearCoatSmoothness: 0
- _Cull: 2
- _Cutoff: 0.5
- _DetailAlbedoMapScale: 1
- _DetailNormalMapScale: 1
- _DstBlend: 0
- _DstBlendAlpha: 0
- _EnvironmentReflections: 1
- _GlossMapScale: 0
- _Glossiness: 0
- _GlossyReflections: 0
- _Metallic: 0
- _OcclusionStrength: 1
- _Parallax: 0.005
- _QueueOffset: 0
- _ReceiveShadows: 1
- _Smoothness: 0.5
- _SmoothnessTextureChannel: 0
- _SpecularHighlights: 1
- _SrcBlend: 1
- _SrcBlendAlpha: 1
- _Surface: 0
- _WorkflowMode: 1
- _ZWrite: 1
m_Colors:
- _BaseColor: {r: 0, g: 0.73424315, b: 1, a: 1}
- _Color: {r: 0, g: 0.73424315, b: 1, a: 1}
- _EmissionColor: {r: 0, g: 25.15095, b: 34.29675, a: 1}
- _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1}
m_BuildTextureStacks: []
m_AllowLocking: 1
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: f911b804c6cacf64aadef6a0fedad7ae
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 2100000
userData:
assetBundleName:
assetBundleVariant:
+137
View File
@@ -0,0 +1,137 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &-9178271237383575576
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:
version: 10
--- !u!21 &2100000
Material:
serializedVersion: 8
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: M-LightEmission
m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, type: 3}
m_Parent: {fileID: 0}
m_ModifiedSerializedProperties: 0
m_ValidKeywords:
- _EMISSION
m_InvalidKeywords: []
m_LightmapFlags: 2
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap:
RenderType: Opaque
disabledShaderPasses:
- MOTIONVECTORS
m_LockedProperties:
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _BaseMap:
m_Texture: {fileID: 0}
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}
- _DetailAlbedoMap:
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: 0}
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
- _Blend: 0
- _BlendModePreserveSpecular: 1
- _BumpScale: 1
- _ClearCoatMask: 0
- _ClearCoatSmoothness: 0
- _Cull: 2
- _Cutoff: 0.5
- _DetailAlbedoMapScale: 1
- _DetailNormalMapScale: 1
- _DstBlend: 0
- _DstBlendAlpha: 0
- _EnvironmentReflections: 1
- _GlossMapScale: 0
- _Glossiness: 0
- _GlossyReflections: 0
- _Metallic: 0
- _OcclusionStrength: 1
- _Parallax: 0.005
- _QueueOffset: 0
- _ReceiveShadows: 1
- _Smoothness: 0.5
- _SmoothnessTextureChannel: 0
- _SpecularHighlights: 1
- _SrcBlend: 1
- _SrcBlendAlpha: 1
- _Surface: 0
- _WorkflowMode: 1
- _ZWrite: 1
m_Colors:
- _BaseColor: {r: 1, g: 0.59607846, b: 0.2509804, a: 1}
- _Color: {r: 1, g: 0.5960784, b: 0.25098038, a: 1}
- _EmissionColor: {r: 62.964508, g: 12.8566265, b: 0, a: 1}
- _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1}
m_BuildTextureStacks: []
m_AllowLocking: 1
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: a30ef186e1631d548923d3ee3ffe40a1
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 2100000
userData:
assetBundleName:
assetBundleVariant:
+8
View File
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 098dc22cc9689ef4c9bd3f74f016e05b
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
File diff suppressed because one or more lines are too long
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: f6ad5e933e73fcc4692813e5bf50884f
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:
Binary file not shown.
@@ -0,0 +1,21 @@
fileFormatVersion: 2
guid: a6b84d29b6799a243802e11b9cf37915
TrueTypeFontImporter:
externalObjects: {}
serializedVersion: 4
fontSize: 16
forceTextureCase: -2
characterSpacing: 0
characterPadding: 1
includeFontData: 1
fontNames:
- Geo
fallbackFontReferences: []
customCharacters:
fontRenderingMode: 0
ascentCalculationMode: 1
useLegacyBoundsCalculation: 0
shouldRoundAdvanceValue: 1
userData:
assetBundleName:
assetBundleVariant:
File diff suppressed because one or more lines are too long
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: c6e50f6a9bd9cfc46bf17947f95d4e3e
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:
Binary file not shown.
@@ -0,0 +1,21 @@
fileFormatVersion: 2
guid: 200859a68406d20489e7ba08417842c1
TrueTypeFontImporter:
externalObjects: {}
serializedVersion: 4
fontSize: 16
forceTextureCase: -2
characterSpacing: 0
characterPadding: 1
includeFontData: 1
fontNames:
- Geo
fallbackFontReferences: []
customCharacters:
fontRenderingMode: 0
ascentCalculationMode: 1
useLegacyBoundsCalculation: 0
shouldRoundAdvanceValue: 1
userData:
assetBundleName:
assetBundleVariant:
Binary file not shown.
+130
View File
@@ -0,0 +1,130 @@
fileFormatVersion: 2
guid: d7936b7ea1f6e7942b887f9eb50c3fae
TextureImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 13
mipmaps:
mipMapMode: 0
enableMipMap: 0
sRGBTexture: 1
linearTexture: 0
fadeOut: 0
borderMipMap: 0
mipMapsPreserveCoverage: 0
alphaTestReferenceValue: 0.5
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
flipGreenChannel: 0
isReadable: 0
streamingMipmaps: 0
streamingMipmapsPriority: 0
vTOnly: 0
ignoreMipmapLimit: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: 2
aniso: 1
mipBias: 0
wrapU: 1
wrapV: 1
wrapW: 0
nPOTScale: 0
lightmap: 0
compressionQuality: 50
spriteMode: 1
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spritePixelsToUnits: 100
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spriteGenerateFallbackPhysicsShape: 1
alphaUsage: 1
alphaIsTransparency: 1
spriteTessellationDetail: -1
textureType: 8
textureShape: 1
singleChannelComponent: 0
flipbookRows: 1
flipbookColumns: 1
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
ignorePngGamma: 0
applyGammaDecoding: 0
swizzle: 50462976
cookieLightType: 0
platformSettings:
- serializedVersion: 4
buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 1
textureFormat: 4
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 4
buildTarget: Standalone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 4
buildTarget: Android
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
customData:
physicsShape: []
bones: []
spriteID: 5e97eb03825dee720800000000000000
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
spriteCustomMetadata:
entries: []
nameFileIdTable: {}
mipmapLimitGroupName:
pSDRemoveMatte: 0
userData:
assetBundleName:
assetBundleVariant:
Binary file not shown.
+130
View File
@@ -0,0 +1,130 @@
fileFormatVersion: 2
guid: 3065a7d6ffd24044ea50412aa5aa783a
TextureImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 13
mipmaps:
mipMapMode: 0
enableMipMap: 0
sRGBTexture: 1
linearTexture: 0
fadeOut: 0
borderMipMap: 0
mipMapsPreserveCoverage: 0
alphaTestReferenceValue: 0.5
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
flipGreenChannel: 0
isReadable: 0
streamingMipmaps: 0
streamingMipmapsPriority: 0
vTOnly: 0
ignoreMipmapLimit: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: 2
aniso: 1
mipBias: 0
wrapU: 1
wrapV: 1
wrapW: 0
nPOTScale: 0
lightmap: 0
compressionQuality: 50
spriteMode: 1
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spritePixelsToUnits: 100
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spriteGenerateFallbackPhysicsShape: 1
alphaUsage: 1
alphaIsTransparency: 1
spriteTessellationDetail: -1
textureType: 8
textureShape: 1
singleChannelComponent: 0
flipbookRows: 1
flipbookColumns: 1
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
ignorePngGamma: 0
applyGammaDecoding: 0
swizzle: 50462976
cookieLightType: 0
platformSettings:
- serializedVersion: 4
buildTarget: DefaultTexturePlatform
maxTextureSize: 128
resizeAlgorithm: 0
textureFormat: 4
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 4
buildTarget: Standalone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 4
buildTarget: Android
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
customData:
physicsShape: []
bones: []
spriteID: 5e97eb03825dee720800000000000000
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
spriteCustomMetadata:
entries: []
nameFileIdTable: {}
mipmapLimitGroupName:
pSDRemoveMatte: 0
userData:
assetBundleName:
assetBundleVariant:
Binary file not shown.
@@ -0,0 +1,130 @@
fileFormatVersion: 2
guid: 858d380de3a2f604abc70d17d3cb78da
TextureImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 13
mipmaps:
mipMapMode: 0
enableMipMap: 0
sRGBTexture: 1
linearTexture: 0
fadeOut: 0
borderMipMap: 0
mipMapsPreserveCoverage: 0
alphaTestReferenceValue: 0.5
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
flipGreenChannel: 0
isReadable: 0
streamingMipmaps: 0
streamingMipmapsPriority: 0
vTOnly: 0
ignoreMipmapLimit: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: 1
aniso: 1
mipBias: 0
wrapU: 1
wrapV: 1
wrapW: 0
nPOTScale: 0
lightmap: 0
compressionQuality: 50
spriteMode: 1
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spritePixelsToUnits: 100
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spriteGenerateFallbackPhysicsShape: 1
alphaUsage: 1
alphaIsTransparency: 1
spriteTessellationDetail: -1
textureType: 8
textureShape: 1
singleChannelComponent: 0
flipbookRows: 1
flipbookColumns: 1
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
ignorePngGamma: 0
applyGammaDecoding: 0
swizzle: 50462976
cookieLightType: 0
platformSettings:
- serializedVersion: 4
buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: 4
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 4
buildTarget: Standalone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 4
buildTarget: Android
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
customData:
physicsShape: []
bones: []
spriteID: 5e97eb03825dee720800000000000000
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
spriteCustomMetadata:
entries: []
nameFileIdTable: {}
mipmapLimitGroupName:
pSDRemoveMatte: 0
userData:
assetBundleName:
assetBundleVariant:
+8
View File
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 5da4c81b147b7544e9cb44f942ad51f0
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,21 @@
using UnityEngine;
[DisallowMultipleComponent]
public sealed class AirTarget : MapTarget
{
protected override void TickMovement(float deltaTime)
{
if (Player == null || Config == null || Config.MovementSpeed <= 0f)
return;
Vector2 playerCoordinates = Player.MapCoordinates;
if (Vector2.Distance(MapCoordinates, playerCoordinates) <= Config.StoppingDistance)
return;
Vector2 nextCoordinates = Vector2.MoveTowards(
MapCoordinates,
playerCoordinates,
Config.MovementSpeed * deltaTime);
SetMapCoordinates(nextCoordinates);
}
}
@@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: d5316cf7562b473d9513878ea906a1b2
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 91a48705d8024711b1d912580a4c8bca
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,20 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
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: c4e7ec8e55a847eaa5c7914bf08d1f98, type: 3}
m_Name: AirTargetConfig
m_EditorClassIdentifier: Assembly-CSharp::TargetConfig
targetPrefab: {fileID: 878491239745611204, guid: 7ef28d9e428a4b94ab7ea4f36fd44d9c, type: 3}
timeBeforeAttack: 30
health: 2
requiredMissileType: 2
movementSpeed: 0.05
stoppingDistance: 0.25
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: e454536a6e36466c92a7cc8b5650d081
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,20 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
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: c4e7ec8e55a847eaa5c7914bf08d1f98, type: 3}
m_Name: GroundTargetConfig
m_EditorClassIdentifier: Assembly-CSharp::TargetConfig
targetPrefab: {fileID: 878491239745611204, guid: 985d88cac4b4daa48973a1a464a3d4e5, type: 3}
timeBeforeAttack: 50
health: 5
requiredMissileType: 3
movementSpeed: 0
stoppingDistance: 0.25
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 35ee36b62afb47cd817570f494b93eae
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,22 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
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: 1dfcdffb89f04cd468e4f8386b4f67e8, type: 3}
m_Name: MapEnemyBalance
m_EditorClassIdentifier:
targetsPerWave: 5
simulationStep: 0.1
minimumSpawnDistanceFromBase: 8.35
spawnPositionAttempts: 32
movementSpeedMultiplier: 0.5
attackDelayMultiplier: 1.5
healthMultiplier: 1
baseDamageMultiplier: 1
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 662ffa97b173faf47a6eebcb4c6abf50
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 6bc910aee46640ce911e111e1b7376b2
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,167 @@
using UnityEditor;
using UnityEngine;
[CustomEditor(typeof(MapCoordinateSystem))]
public sealed class MapCoordinateSystemEditor : Editor
{
public override void OnInspectorGUI()
{
DrawDefaultInspector();
EditorGUILayout.HelpBox(
"Select MapCoordinates to display its grid and live crosshair coordinates in the Scene view. " +
"This visualization is not rendered in the Game view or in builds.",
MessageType.Info);
}
private void OnSceneGUI()
{
MapCoordinateSystem coordinateSystem = (MapCoordinateSystem)target;
if (!coordinateSystem.ShowSceneVisualization || !coordinateSystem.HasValidCorners())
return;
DrawGrid(coordinateSystem);
DrawCorners(coordinateSystem);
DrawCrosshairs(coordinateSystem);
DrawTargets(coordinateSystem);
DrawPlayers(coordinateSystem);
}
private static void DrawGrid(MapCoordinateSystem coordinateSystem)
{
int divisions = coordinateSystem.GridDivisions;
GUIStyle labelStyle = CreateLabelStyle(coordinateSystem.BoundaryColor);
for (int index = 0; index <= divisions; index++)
{
float normalized = (float)index / divisions;
Vector3 verticalStart = Vector3.Lerp(
coordinateSystem.BottomLeft.position,
coordinateSystem.BottomRight.position,
normalized);
Vector3 verticalEnd = Vector3.Lerp(
coordinateSystem.TopLeft.position,
coordinateSystem.TopRight.position,
normalized);
Vector3 horizontalStart = Vector3.Lerp(
coordinateSystem.BottomLeft.position,
coordinateSystem.TopLeft.position,
normalized);
Vector3 horizontalEnd = Vector3.Lerp(
coordinateSystem.BottomRight.position,
coordinateSystem.TopRight.position,
normalized);
bool isBoundary = index == 0 || index == divisions;
Handles.color = isBoundary ? coordinateSystem.BoundaryColor : coordinateSystem.GridColor;
Handles.DrawLine(verticalStart, verticalEnd);
Handles.DrawLine(horizontalStart, horizontalEnd);
if (!coordinateSystem.ShowCoordinateLabels)
continue;
float horizontalCoordinate = coordinateSystem.MaximumCoordinates.x * normalized;
float verticalCoordinate = coordinateSystem.MaximumCoordinates.y * normalized;
Handles.Label(verticalStart, horizontalCoordinate.ToString("0.##"), labelStyle);
Handles.Label(horizontalStart, verticalCoordinate.ToString("0.##"), labelStyle);
}
}
private static void DrawCorners(MapCoordinateSystem coordinateSystem)
{
Handles.color = coordinateSystem.BoundaryColor;
DrawCorner(coordinateSystem.BottomLeft, "(0, 0)", coordinateSystem);
DrawCorner(
coordinateSystem.BottomRight,
$"({coordinateSystem.MaximumCoordinates.x:0.##}, 0)",
coordinateSystem);
DrawCorner(
coordinateSystem.TopLeft,
$"(0, {coordinateSystem.MaximumCoordinates.y:0.##})",
coordinateSystem);
DrawCorner(
coordinateSystem.TopRight,
$"({coordinateSystem.MaximumCoordinates.x:0.##}, " +
$"{coordinateSystem.MaximumCoordinates.y:0.##})",
coordinateSystem);
}
private static void DrawCorner(
Transform corner,
string label,
MapCoordinateSystem coordinateSystem)
{
float size = coordinateSystem.MarkerSize * HandleUtility.GetHandleSize(corner.position);
Handles.SphereHandleCap(0, corner.position, Quaternion.identity, size, EventType.Repaint);
if (coordinateSystem.ShowCoordinateLabels)
Handles.Label(corner.position, label, CreateLabelStyle(coordinateSystem.BoundaryColor));
}
private static void DrawCrosshairs(MapCoordinateSystem coordinateSystem)
{
MapController[] controllers =
Object.FindObjectsByType<MapController>(FindObjectsSortMode.None);
foreach (MapController controller in controllers)
{
if (controller.CoordinateSystem != coordinateSystem || controller.CrosshairVisual == null)
continue;
Vector3 position = controller.CrosshairVisual.position;
Vector2 coordinates = coordinateSystem.WorldPositionToCoordinates(position);
float size = coordinateSystem.MarkerSize * 1.35f * HandleUtility.GetHandleSize(position);
Handles.color = Color.yellow;
Handles.SphereHandleCap(0, position, Quaternion.identity, size, EventType.Repaint);
Handles.Label(
position,
$"Crosshair ({coordinates.x:0.00}, {coordinates.y:0.00})",
CreateLabelStyle(Color.yellow));
}
}
private static void DrawTargets(MapCoordinateSystem coordinateSystem)
{
if (!coordinateSystem.ShowCoordinateLabels)
return;
MapTarget[] targets = Object.FindObjectsByType<MapTarget>(FindObjectsSortMode.None);
foreach (MapTarget mapTarget in targets)
{
if (mapTarget.CoordinateSystem != null && mapTarget.CoordinateSystem != coordinateSystem)
continue;
Vector3 position = mapTarget.transform.position;
Vector2 coordinates = coordinateSystem.WorldPositionToCoordinates(position);
Handles.Label(
position,
$"{mapTarget.name} ({coordinates.x:0.00}, {coordinates.y:0.00})",
CreateLabelStyle(Color.red));
}
}
private static void DrawPlayers(MapCoordinateSystem coordinateSystem)
{
MapPlayer[] players = Object.FindObjectsByType<MapPlayer>(FindObjectsSortMode.None);
foreach (MapPlayer mapPlayer in players)
{
if (mapPlayer.CoordinateSystem != null && mapPlayer.CoordinateSystem != coordinateSystem)
continue;
Vector3 position = mapPlayer.transform.position;
Vector2 coordinates = coordinateSystem.WorldPositionToCoordinates(position);
Handles.Label(
position,
$"MapPlayer ({coordinates.x:0.00}, {coordinates.y:0.00})",
CreateLabelStyle(Color.green));
}
}
private static GUIStyle CreateLabelStyle(Color color)
{
GUIStyle style = new(EditorStyles.boldLabel);
style.normal.textColor = color;
return style;
}
}
@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 7c020017978644e9be71242ece0e6011
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,307 @@
using Unity.Netcode;
using Unity.Netcode.Components;
using UnityEditor;
using UnityEngine;
public static class MapRadarNetworkSetup
{
private const string LeverPrefabPath =
"Assets/CONTENT/Game/Prefabs/Interaction/PhysicalLever.prefab";
private const string EnemyBalancePath =
"Assets/CONTENT/FEATURES/MapRadar/Configs/MapEnemyBalance.asset";
[MenuItem("FORT-BO/Map Radar/Configure Network Prototype")]
public static void ConfigureNetworkPrototype()
{
MapController mapController = Object.FindFirstObjectByType<MapController>();
if (mapController == null)
{
Debug.LogError("MapController was not found in the open scene.");
return;
}
MapCoordinateSystem coordinateSystem = mapController.CoordinateSystem;
if (coordinateSystem == null || !coordinateSystem.HasValidCorners())
{
Debug.LogError("MapCoordinateSystem is not configured.", mapController);
return;
}
Undo.RegisterFullObjectHierarchyUndo(mapController.transform.root.gameObject,
"Configure network map prototype");
GetOrAdd<NetworkObject>(mapController.gameObject);
NetworkBaseHealth baseHealth = GetOrAdd<NetworkBaseHealth>(mapController.gameObject);
MapControlBinder binder = GetOrAdd<MapControlBinder>(mapController.gameObject);
MapEnemyBalanceConfig enemyBalance = GetOrCreateEnemyBalance();
Transform controlsRoot = GetOrCreateChild(
mapController.transform.root,
"Map Controls");
MapBasis basis = CreateBasis(coordinateSystem);
NetworkPhysicalWheelInteractable horizontalWheel = CreateWheel(
controlsRoot,
"Map Horizontal Wheel",
basis.ControlCenter - basis.Horizontal * 1.8f,
basis.Rotation,
"Aim horizontal");
NetworkPhysicalWheelInteractable verticalWheel = CreateWheel(
controlsRoot,
"Map Vertical Wheel",
basis.ControlCenter - basis.Horizontal * 0.6f,
basis.Rotation,
"Aim vertical");
NetworkPhysicalLeverInteractable fireLever = CreateFireLever(
controlsRoot,
basis.ControlCenter + basis.Horizontal * 0.8f,
basis.Rotation);
NetworkButtonInteractable scanButton = CreateScanButton(
controlsRoot,
basis.ControlCenter + basis.Horizontal * 2f,
basis.Rotation);
SerializedObject map = new(mapController);
SetObject(map, "roundGameLoop",
Object.FindFirstObjectByType<RoundGameLoopController>());
SetObject(map, "baseHealth", baseHealth);
SetObject(map, "enemyBalance", enemyBalance);
map.ApplyModifiedPropertiesWithoutUndo();
SerializedObject binding = new(binder);
SetObject(binding, "mapController", mapController);
SetObject(binding, "horizontalWheel", horizontalWheel);
SetObject(binding, "verticalWheel", verticalWheel);
SetObject(binding, "fireLever", fireLever);
SetObject(binding, "scanButton", scanButton);
binding.ApplyModifiedPropertiesWithoutUndo();
EditorUtility.SetDirty(mapController);
EditorUtility.SetDirty(binder);
EditorUtility.SetDirty(baseHealth);
UnityEditor.SceneManagement.EditorSceneManager.MarkSceneDirty(
mapController.gameObject.scene);
UnityEditor.SceneManagement.EditorSceneManager.SaveOpenScenes();
Selection.activeObject = controlsRoot.gameObject;
Debug.Log(
"[Map] Network prototype configured: X/Y wheels, fire lever, " +
"scan button, enemy balance and base health are connected.",
mapController);
}
private static MapEnemyBalanceConfig GetOrCreateEnemyBalance()
{
MapEnemyBalanceConfig config =
AssetDatabase.LoadAssetAtPath<MapEnemyBalanceConfig>(EnemyBalancePath);
if (config != null)
return config;
config = ScriptableObject.CreateInstance<MapEnemyBalanceConfig>();
AssetDatabase.CreateAsset(config, EnemyBalancePath);
EditorUtility.SetDirty(config);
AssetDatabase.SaveAssets();
return config;
}
private static NetworkPhysicalWheelInteractable CreateWheel(
Transform parent,
string name,
Vector3 position,
Quaternion rotation,
string interactionLabel)
{
Transform root = GetOrCreateChild(parent, name);
root.SetPositionAndRotation(position, rotation);
root.localScale = Vector3.one;
GetOrAdd<NetworkObject>(root.gameObject);
NetworkTransform networkTransform = GetOrAdd<NetworkTransform>(root.gameObject);
networkTransform.AuthorityMode = NetworkTransform.AuthorityModes.Server;
networkTransform.UseUnreliableDeltas = true;
Transform legacyVisual = root.Find("Wheel Visual");
Transform visual = root.Find("Wheel Pivot");
if (visual == null)
{
if (legacyVisual != null)
Object.DestroyImmediate(legacyVisual.gameObject);
visual = new GameObject("Wheel Pivot").transform;
visual.SetParent(root, false);
}
visual.localPosition = Vector3.zero;
visual.localRotation = Quaternion.identity;
visual.localScale = Vector3.one;
Transform disk = visual.Find("Wheel Disk");
if (disk == null)
{
GameObject cylinder = GameObject.CreatePrimitive(PrimitiveType.Cylinder);
cylinder.name = "Wheel Disk";
disk = cylinder.transform;
disk.SetParent(visual, false);
}
disk.localPosition = Vector3.zero;
disk.localRotation = Quaternion.Euler(90f, 0f, 0f);
disk.localScale = new Vector3(0.48f, 0.08f, 0.48f);
Transform handle = visual.Find("Handle");
if (handle == null)
{
GameObject handleObject = GameObject.CreatePrimitive(PrimitiveType.Cube);
handleObject.name = "Handle";
handle = handleObject.transform;
handle.SetParent(visual, false);
Object.DestroyImmediate(handleObject.GetComponent<Collider>());
}
handle.localPosition = new Vector3(0f, 0.65f, 0f);
handle.localRotation = Quaternion.identity;
handle.localScale = new Vector3(0.14f, 0.4f, 0.14f);
NetworkPhysicalWheelInteractable wheel =
GetOrAdd<NetworkPhysicalWheelInteractable>(root.gameObject);
SerializedObject serializedWheel = new(wheel);
SetObject(serializedWheel, "wheelVisual", visual);
SetVector3(serializedWheel, "neutralLocalEulerAngles", Vector3.zero);
SetString(serializedWheel, "interactionLabel", interactionLabel);
SetVector3(serializedWheel, "localRotationAxis", Vector3.forward);
SetVector3(serializedWheel, "localReferenceDirection", Vector3.up);
SetFloat(serializedWheel, "minimumAngle", -180f);
SetFloat(serializedWheel, "maximumAngle", 180f);
SetFloat(serializedWheel, "initialNormalizedValue", 0.5f);
SetFloat(serializedWheel, "maximumInteractionDistance", 3.5f);
SetFloat(serializedWheel, "maximumControlDistance", 4f);
serializedWheel.ApplyModifiedPropertiesWithoutUndo();
return wheel;
}
private static NetworkPhysicalLeverInteractable CreateFireLever(
Transform parent,
Vector3 position,
Quaternion rotation)
{
Transform existing = parent.Find("Map Fire Lever");
GameObject root;
if (existing != null)
{
root = existing.gameObject;
}
else
{
GameObject prefab = AssetDatabase.LoadAssetAtPath<GameObject>(LeverPrefabPath);
if (prefab == null)
throw new MissingReferenceException($"Lever prefab not found: {LeverPrefabPath}");
root = (GameObject)PrefabUtility.InstantiatePrefab(prefab, parent);
root.name = "Map Fire Lever";
}
root.transform.SetPositionAndRotation(position, rotation);
root.transform.localScale = Vector3.one * 0.55f;
NetworkPhysicalLeverInteractable lever =
root.GetComponent<NetworkPhysicalLeverInteractable>();
SerializedObject serializedLever = new(lever);
SetString(serializedLever, "interactionLabel", "Fire");
SetBool(serializedLever, "initialPositionIsMaximum", false);
SetBool(serializedLever, "returnToInitialPositionAfterSwitch", true);
SetFloat(serializedLever, "automaticReturnDelay", 0.2f);
SetFloat(serializedLever, "maximumInteractionDistance", 3.5f);
SetFloat(serializedLever, "maximumControlDistance", 4f);
serializedLever.ApplyModifiedPropertiesWithoutUndo();
return lever;
}
private static NetworkButtonInteractable CreateScanButton(
Transform parent,
Vector3 position,
Quaternion rotation)
{
Transform root = GetOrCreateChild(parent, "Map Scan Button");
root.SetPositionAndRotation(position, rotation);
root.localScale = Vector3.one;
GetOrAdd<NetworkObject>(root.gameObject);
NetworkTransform networkTransform = GetOrAdd<NetworkTransform>(root.gameObject);
networkTransform.AuthorityMode = NetworkTransform.AuthorityModes.Server;
Transform visual = root.Find("Button Visual");
if (visual == null)
{
GameObject cube = GameObject.CreatePrimitive(PrimitiveType.Cube);
cube.name = "Button Visual";
visual = cube.transform;
visual.SetParent(root, false);
}
visual.localPosition = Vector3.zero;
visual.localRotation = Quaternion.identity;
visual.localScale = new Vector3(0.55f, 0.55f, 0.18f);
NetworkButtonInteractable button = GetOrAdd<NetworkButtonInteractable>(root.gameObject);
SerializedObject serializedButton = new(button);
SetString(serializedButton, "interactionLabel", "Scan map");
SetFloat(serializedButton, "maximumInteractionDistance", 3.5f);
serializedButton.ApplyModifiedPropertiesWithoutUndo();
return button;
}
private static MapBasis CreateBasis(MapCoordinateSystem coordinates)
{
Vector3 bottomLeft = coordinates.BottomLeft.position;
Vector3 horizontalEdge = coordinates.BottomRight.position - bottomLeft;
Vector3 verticalEdge = coordinates.TopLeft.position - bottomLeft;
Vector3 horizontal = horizontalEdge.normalized;
Vector3 vertical = verticalEdge.normalized;
Vector3 normal = Vector3.Cross(horizontal, vertical).normalized;
Vector3 bottomCenter = bottomLeft + horizontalEdge * 0.5f;
Vector3 controlCenter = bottomCenter - vertical * 0.85f + normal * 0.55f;
return new MapBasis(
horizontal,
controlCenter,
Quaternion.LookRotation(normal, vertical));
}
private static Transform GetOrCreateChild(Transform parent, string name)
{
Transform existing = parent.Find(name);
if (existing != null)
return existing;
GameObject child = new(name);
child.transform.SetParent(parent, false);
Undo.RegisterCreatedObjectUndo(child, $"Create {name}");
return child.transform;
}
private static T GetOrAdd<T>(GameObject target) where T : Component
{
T component = target.GetComponent<T>();
return component != null ? component : Undo.AddComponent<T>(target);
}
private static void SetObject(SerializedObject target, string property, Object value) =>
target.FindProperty(property).objectReferenceValue = value;
private static void SetString(SerializedObject target, string property, string value) =>
target.FindProperty(property).stringValue = value;
private static void SetFloat(SerializedObject target, string property, float value) =>
target.FindProperty(property).floatValue = value;
private static void SetBool(SerializedObject target, string property, bool value) =>
target.FindProperty(property).boolValue = value;
private static void SetVector3(SerializedObject target, string property, Vector3 value) =>
target.FindProperty(property).vector3Value = value;
private readonly struct MapBasis
{
public readonly Vector3 Horizontal;
public readonly Vector3 ControlCenter;
public readonly Quaternion Rotation;
public MapBasis(Vector3 horizontal, Vector3 controlCenter, Quaternion rotation)
{
Horizontal = horizontal;
ControlCenter = controlCenter;
Rotation = rotation;
}
}
}
@@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: 3807965ea93055647ad20aa098cd2032
@@ -0,0 +1,25 @@
using UnityEditor;
using UnityEngine;
[CustomEditor(typeof(MapTargetController))]
public sealed class MapTargetControllerEditor : Editor
{
public override void OnInspectorGUI()
{
DrawDefaultInspector();
EditorGUILayout.Space();
using (new EditorGUI.DisabledScope(!Application.isPlaying))
{
if (GUILayout.Button("Start Next Wave"))
((MapTargetController)target).StartNextWave();
}
if (!Application.isPlaying)
{
EditorGUILayout.HelpBox(
"Start Next Wave becomes available in Play Mode.",
MessageType.Info);
}
}
}
@@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: 09f50d05321d420f86622f0dc7a6fa14
@@ -0,0 +1,4 @@
[UnityEngine.DisallowMultipleComponent]
public sealed class GroundTarget : MapTarget
{
}
@@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: 8be0d56377aa4082a276cfe31702e80c
@@ -0,0 +1,99 @@
using UnityEngine;
[DisallowMultipleComponent]
public sealed class MapControlBinder : MonoBehaviour
{
[SerializeField] private MapController mapController;
[SerializeField] private NetworkPhysicalWheelInteractable horizontalWheel;
[SerializeField] private NetworkPhysicalWheelInteractable verticalWheel;
[SerializeField] private NetworkPhysicalLeverInteractable fireLever;
[SerializeField] private NetworkButtonInteractable scanButton;
private bool controlsBound;
private bool initialValuesApplied;
private void Reset() => mapController = GetComponent<MapController>();
private void OnEnable() => TryBindControls();
private void OnDisable() => UnbindControls();
private void Update()
{
TryBindControls();
if (!controlsBound || initialValuesApplied ||
horizontalWheel == null || verticalWheel == null)
{
return;
}
initialValuesApplied = true;
HandleHorizontalChanged(horizontalWheel.NormalizedValue);
HandleVerticalChanged(verticalWheel.NormalizedValue);
}
private void TryBindControls()
{
if (controlsBound || !AreNetworkObjectsReady())
return;
if (horizontalWheel != null)
horizontalWheel.ValueChanged += HandleHorizontalChanged;
if (verticalWheel != null)
verticalWheel.ValueChanged += HandleVerticalChanged;
if (fireLever != null)
fireLever.StateChanged += HandleFireChanged;
if (scanButton != null)
scanButton.Pressed += HandleScanPressed;
controlsBound = true;
}
private void UnbindControls()
{
if (!controlsBound)
return;
if (horizontalWheel != null)
horizontalWheel.ValueChanged -= HandleHorizontalChanged;
if (verticalWheel != null)
verticalWheel.ValueChanged -= HandleVerticalChanged;
if (fireLever != null)
fireLever.StateChanged -= HandleFireChanged;
if (scanButton != null)
scanButton.Pressed -= HandleScanPressed;
controlsBound = false;
initialValuesApplied = false;
}
private bool AreNetworkObjectsReady()
{
return mapController != null && mapController.IsSpawned &&
(horizontalWheel == null || horizontalWheel.IsSpawned) &&
(verticalWheel == null || verticalWheel.IsSpawned) &&
(fireLever == null || fireLever.IsSpawned) &&
(scanButton == null || scanButton.IsSpawned);
}
private void HandleHorizontalChanged(float value) =>
ApplyOnServer(() => mapController.SetHorizontalNormalized(value));
private void HandleVerticalChanged(float value) =>
ApplyOnServer(() => mapController.SetVerticalNormalized(value));
private void HandleFireChanged(bool active)
{
if (active)
ApplyOnServer(mapController.RequestPseudoFire);
}
private void HandleScanPressed() => ApplyOnServer(mapController.RequestRadarScan);
private void ApplyOnServer(System.Action action)
{
if (mapController != null && mapController.IsSpawned && mapController.IsServer)
action?.Invoke();
}
}
@@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: 1a23aadbde3d31042abf625ff22e6fd8
@@ -0,0 +1,620 @@
using System;
using Unity.Netcode;
using UnityEngine;
using UnityEngine.Events;
using UnityEngine.Serialization;
[DisallowMultipleComponent]
[RequireComponent(typeof(NetworkObject))]
public sealed class MapController : NetworkBehaviour
{
[Header("Main References")]
[SerializeField] private MapCrosshairController crosshair;
[SerializeField] private MapCoordinateSystem coordinateSystem;
[SerializeField] private MapPlayer mapPlayer;
[SerializeField] private RoundGameLoopController roundGameLoop;
[SerializeField] private NetworkBaseHealth baseHealth;
[SerializeField] private MapEnemyBalanceConfig enemyBalance;
[Header("Target System")]
[SerializeField] private MapTargetController targetController;
[SerializeField] private Transform targetParent;
[Header("Radar System")]
[SerializeField] private MapRadarController radarController;
[FormerlySerializedAs("targetPrefab")]
[SerializeField] private MapTarget radarMarkPrefab;
[Header("Crosshair Objects")]
[SerializeField] private Transform relayX;
[SerializeField] private Transform relayY;
[SerializeField] private Transform crosshairVisual;
[Header("Shot Rules")]
[SerializeField, Min(0.01f)] private float hitRadius = 0.65f;
[SerializeField, Min(1)] private int shotDamage = 1;
[SerializeField] private MissileType pseudoMissileType = MissileType.Standard;
[FormerlySerializedAs("ignoreMissileTypeForPrototype")]
[SerializeField] private bool ignoreMissileTypeRequirements = true;
[Header("Network Events")]
[SerializeField] private UnityEvent<int> waveStarted;
[SerializeField] private UnityEvent<bool> shotResolved;
[SerializeField] private UnityEvent allTargetsResolved;
[SerializeField] private UnityEvent allTargetsDestroyed;
[Header("Shot Presentation")]
[SerializeField] private MapImpactMarkerView impactMarkerView;
private readonly NetworkVariable<Vector2> crosshairCoordinates = new(
new Vector2(5f, 5f), NetworkVariableReadPermission.Everyone,
NetworkVariableWritePermission.Server);
private readonly NetworkVariable<int> currentWave = new(
0, NetworkVariableReadPermission.Everyone,
NetworkVariableWritePermission.Server);
private readonly NetworkVariable<double> radarReadyAt = new(
0d, NetworkVariableReadPermission.Everyone,
NetworkVariableWritePermission.Server);
private readonly NetworkVariable<MapShotResultState> lastShotResult = new(
default, NetworkVariableReadPermission.Everyone,
NetworkVariableWritePermission.Server);
private readonly NetworkVariable<uint> resolvedSequence = new(
0, NetworkVariableReadPermission.Everyone,
NetworkVariableWritePermission.Server);
private readonly NetworkVariable<uint> destroyedSequence = new(
0, NetworkVariableReadPermission.Everyone,
NetworkVariableWritePermission.Server);
private readonly NetworkList<MapTargetNetworkState> activeTargets = new();
private readonly NetworkList<Vector2> radarMarks = new();
private float simulationAccumulator;
private int nextTargetId = 1;
private int initialTargetCount;
private int escapedTargetCount;
private bool waveIsActive;
private bool roundEventsBound;
public MapCoordinateSystem CoordinateSystem => coordinateSystem;
public Transform CrosshairVisual => crosshairVisual;
public Vector2 CrosshairCoordinates => crosshairCoordinates.Value;
public int CurrentWave => currentWave.Value;
public int ActiveTargetCount => activeTargets.Count;
public bool WaveIsActive => waveIsActive;
public MapEnemyBalanceConfig EnemyBalance => enemyBalance;
public float HitRadius => hitRadius;
public int ShotDamage => shotDamage;
public bool IgnoreMissileTypeRequirements => ignoreMissileTypeRequirements;
public double RadarCooldownRemaining => IsSpawned && NetworkManager != null
? Math.Max(0d, radarReadyAt.Value - NetworkManager.ServerTime.Time)
: 0d;
public event Action<int> WaveStarted;
public event Action<MapShotResultState> ShotResolved;
public event Action AllTargetsResolved;
public event Action AllTargetsDestroyed;
private void Awake() => ConfigurePresentation();
private void OnValidate()
{
hitRadius = Mathf.Max(0.01f, hitRadius);
shotDamage = Mathf.Max(1, shotDamage);
}
public override void OnNetworkSpawn()
{
activeTargets.OnListChanged += HandleTargetListChanged;
radarMarks.OnListChanged += HandleRadarListChanged;
crosshairCoordinates.OnValueChanged += HandleCrosshairChanged;
currentWave.OnValueChanged += HandleWaveChanged;
radarReadyAt.OnValueChanged += HandleRadarReadyAtChanged;
lastShotResult.OnValueChanged += HandleShotResultChanged;
resolvedSequence.OnValueChanged += HandleResolvedSequenceChanged;
destroyedSequence.OnValueChanged += HandleDestroyedSequenceChanged;
ConfigurePresentation();
BindRoundEvents();
ApplyPresentation();
if (IsServer && roundGameLoop != null &&
roundGameLoop.Phase == RoundPhase.WorkInProgress && currentWave.Value == 0)
StartNextWaveOnServer();
}
public override void OnNetworkDespawn()
{
activeTargets.OnListChanged -= HandleTargetListChanged;
radarMarks.OnListChanged -= HandleRadarListChanged;
crosshairCoordinates.OnValueChanged -= HandleCrosshairChanged;
currentWave.OnValueChanged -= HandleWaveChanged;
radarReadyAt.OnValueChanged -= HandleRadarReadyAtChanged;
lastShotResult.OnValueChanged -= HandleShotResultChanged;
resolvedSequence.OnValueChanged -= HandleResolvedSequenceChanged;
destroyedSequence.OnValueChanged -= HandleDestroyedSequenceChanged;
UnbindRoundEvents();
}
private void OnDestroy()
{
activeTargets.Dispose();
radarMarks.Dispose();
}
private void Update()
{
if (!roundEventsBound)
BindRoundEvents();
if (radarController != null)
radarController.SetCooldownRemaining((float)RadarCooldownRemaining);
if (!IsServer || !IsSpawned || !waveIsActive)
return;
float step = enemyBalance != null ? enemyBalance.SimulationStep : 0.1f;
simulationAccumulator += Time.deltaTime;
while (simulationAccumulator >= step)
{
simulationAccumulator -= step;
SimulateTargets(step);
}
}
public void SetHorizontalNormalized(float value)
{
Vector2 next = crosshairCoordinates.Value;
next.x = Mathf.Clamp01(value) * MapCoordinateSystem.CoordinateMaximum;
RequestCrosshairCoordinates(next);
}
public void SetVerticalNormalized(float value)
{
Vector2 next = crosshairCoordinates.Value;
next.y = Mathf.Clamp01(value) * MapCoordinateSystem.CoordinateMaximum;
RequestCrosshairCoordinates(next);
}
public void SetHorizontalAxis(float value) =>
SetHorizontalNormalized(Mathf.InverseLerp(-1f, 1f, value));
public void SetVerticalAxis(float value) =>
SetVerticalNormalized(Mathf.InverseLerp(-1f, 1f, value));
public Vector2 GetCrosshairCoordinates() => crosshairCoordinates.Value;
public void RequestPseudoFire()
{
if (!IsSpawned)
return;
if (IsServer)
ResolveShotOnServer(pseudoMissileType, ignoreMissileTypeRequirements);
else
RequestPseudoFireRpc();
}
public bool RequestShot(MissileType missileType)
{
if (!IsSpawned || !IsServer || missileType == MissileType.None)
return false;
ResolveShotOnServer(missileType, ignoreMissileTypeRequirements);
return true;
}
public void RequestRadarScan()
{
if (!IsSpawned)
return;
if (IsServer)
ScanRadarOnServer();
else
RequestRadarScanRpc();
}
public bool ActivateRadar()
{
if (!IsSpawned || RadarCooldownRemaining > 0d)
return false;
RequestRadarScan();
return true;
}
public void CreateAndPlaceTargets() => StartNextWave();
public bool StartNextWave()
{
if (!IsSpawned)
return false;
if (IsServer)
return StartNextWaveOnServer();
RequestStartNextWaveRpc();
return true;
}
public bool TryGetNearestTarget(out MapTarget target, out float distance)
{
if (crosshair != null)
return crosshair.TryGetNearestTarget(out target, out distance);
target = null;
distance = -1f;
return false;
}
[Rpc(SendTo.Server, InvokePermission = RpcInvokePermission.Everyone)]
private void SetCrosshairCoordinatesRpc(Vector2 coordinates) =>
SetCrosshairCoordinatesOnServer(coordinates);
[Rpc(SendTo.Server, InvokePermission = RpcInvokePermission.Everyone)]
private void RequestPseudoFireRpc() =>
ResolveShotOnServer(pseudoMissileType, ignoreMissileTypeRequirements);
[Rpc(SendTo.Server, InvokePermission = RpcInvokePermission.Everyone)]
private void RequestRadarScanRpc() => ScanRadarOnServer();
[Rpc(SendTo.Server, InvokePermission = RpcInvokePermission.Everyone)]
private void RequestStartNextWaveRpc() => StartNextWaveOnServer();
private void RequestCrosshairCoordinates(Vector2 coordinates)
{
if (!IsSpawned)
return;
if (IsServer)
SetCrosshairCoordinatesOnServer(coordinates);
else
SetCrosshairCoordinatesRpc(coordinates);
}
private void SetCrosshairCoordinatesOnServer(Vector2 coordinates)
{
if (!IsServer)
return;
crosshairCoordinates.Value = coordinateSystem != null
? coordinateSystem.ClampCoordinates(coordinates)
: new Vector2(
Mathf.Clamp(coordinates.x, 0f, MapCoordinateSystem.CoordinateMaximum),
Mathf.Clamp(coordinates.y, 0f, MapCoordinateSystem.CoordinateMaximum));
}
private bool StartNextWaveOnServer()
{
if (!IsServer || targetController == null || enemyBalance == null ||
!targetController.HasValidConfiguration())
{
Debug.LogWarning(
"[Map] Cannot start target wave: map, enemy balance or target configs are incomplete.",
this);
return false;
}
activeTargets.Clear();
radarMarks.Clear();
currentWave.Value++;
escapedTargetCount = 0;
initialTargetCount = 0;
waveIsActive = true;
simulationAccumulator = 0f;
for (int index = 0; index < enemyBalance.TargetsPerWave; index++)
{
int configIndex = targetController.GetRandomValidConfigIndex();
TargetConfig config = targetController.GetConfig(configIndex);
if (config == null)
continue;
Vector2 coordinates = CreateSpawnCoordinates();
activeTargets.Add(new MapTargetNetworkState(
nextTargetId++, configIndex, coordinates,
enemyBalance.GetHealth(config),
enemyBalance.GetAttackDelay(config)));
initialTargetCount++;
}
Debug.Log($"[Map] Wave {currentWave.Value} started with {initialTargetCount} targets.", this);
if (initialTargetCount == 0)
CompleteWaveOnServer();
return true;
}
private void SimulateTargets(float deltaTime)
{
for (int index = activeTargets.Count - 1; index >= 0; index--)
{
MapTargetNetworkState state = activeTargets[index];
TargetConfig config = targetController.GetConfig(state.ConfigIndex);
if (config == null)
{
ResolveEscapedTarget(index, state, null);
continue;
}
bool isAirTarget = config.TargetPrefab is AirTarget;
float movementSpeed = enemyBalance.GetMovementSpeed(config);
if (isAirTarget && mapPlayer != null && movementSpeed > 0f)
{
Vector2 destination = mapPlayer.MapCoordinates;
state.Coordinates = Vector2.MoveTowards(
state.Coordinates, destination, movementSpeed * deltaTime);
if (Vector2.Distance(state.Coordinates, destination) <= config.StoppingDistance)
{
ResolveEscapedTarget(index, state, config);
continue;
}
}
else
{
state.AttackTimeRemaining = Mathf.Max(
0f, state.AttackTimeRemaining - deltaTime);
if (state.AttackTimeRemaining <= 0f)
{
ResolveEscapedTarget(index, state, config);
continue;
}
}
activeTargets[index] = state;
}
TryCompleteWaveOnServer();
}
private void ResolveEscapedTarget(int index, MapTargetNetworkState target, TargetConfig config)
{
int damage = enemyBalance != null
? enemyBalance.GetBaseDamage(config)
: config != null ? config.BaseDamage : 1;
escapedTargetCount++;
activeTargets.RemoveAt(index);
if (baseHealth != null)
baseHealth.ApplyDamage(damage);
Debug.Log($"[Map] Target {target.TargetId} reached the base. Base damage: {damage}.", this);
}
private void ResolveShotOnServer(MissileType missileType, bool ignoreMissileType)
{
if (!IsServer || !waveIsActive)
{
PublishShotResult(
false, -1, crosshairCoordinates.Value, -1f, missileType);
Debug.Log(
$"[Map] MISS with {missileType}: there is no active target wave.",
this);
return;
}
int nearestIndex = -1;
float nearestDistance = float.PositiveInfinity;
for (int index = 0; index < activeTargets.Count; index++)
{
float distance = Vector2.Distance(
crosshairCoordinates.Value, activeTargets[index].Coordinates);
if (distance >= nearestDistance)
continue;
nearestDistance = distance;
nearestIndex = index;
}
if (nearestIndex >= 0 && nearestDistance <= hitRadius)
{
MapTargetNetworkState target = activeTargets[nearestIndex];
TargetConfig config = targetController.GetConfig(target.ConfigIndex);
bool missileMatches = ignoreMissileType || config == null ||
config.RequiredMissileType == MissileType.None ||
config.RequiredMissileType == missileType;
if (!missileMatches)
{
PublishShotResult(
false, target.TargetId, crosshairCoordinates.Value,
nearestDistance, missileType);
Debug.Log(
$"[Map] MISS target {target.TargetId}: {missileType} does not " +
$"match required {config.RequiredMissileType}. Distance " +
$"{nearestDistance:0.00} is inside hit radius {hitRadius:0.00}.",
this);
return;
}
target.Health -= shotDamage;
if (target.Health <= 0)
activeTargets.RemoveAt(nearestIndex);
else
activeTargets[nearestIndex] = target;
PublishShotResult(
true, target.TargetId, target.Coordinates,
nearestDistance, missileType);
Debug.Log(
$"[Map] HIT target {target.TargetId} with {missileType} " +
$"at {nearestDistance:0.00} map units. Damage: {shotDamage}.",
this);
TryCompleteWaveOnServer();
return;
}
int missedTargetId = nearestIndex >= 0 ? activeTargets[nearestIndex].TargetId : -1;
PublishShotResult(
false, missedTargetId, crosshairCoordinates.Value,
nearestDistance, missileType);
if (nearestIndex < 0)
{
Debug.Log($"[Map] MISS with {missileType}: no active targets.", this);
return;
}
Debug.Log(
$"[Map] MISS target {activeTargets[nearestIndex].TargetId}: distance " +
$"{nearestDistance:0.00} exceeds hit radius {hitRadius:0.00}.",
this);
}
private void PublishShotResult(
bool hit,
int targetId,
Vector2 coordinates,
float distance,
MissileType missileType)
{
lastShotResult.Value = new MapShotResultState(
lastShotResult.Value.Sequence + 1, hit, targetId,
coordinates,
float.IsPositiveInfinity(distance) ? -1f : distance,
missileType);
}
private void ScanRadarOnServer()
{
if (!IsServer || radarController == null || NetworkManager == null ||
NetworkManager.ServerTime.Time < radarReadyAt.Value)
return;
radarMarks.Clear();
foreach (MapTargetNetworkState target in activeTargets)
radarMarks.Add(target.Coordinates);
radarReadyAt.Value = NetworkManager.ServerTime.Time + radarController.Cooldown;
Debug.Log($"[Map] Radar scan found {radarMarks.Count} targets.", this);
}
private void TryCompleteWaveOnServer()
{
if (waveIsActive && activeTargets.Count == 0)
CompleteWaveOnServer();
}
private void CompleteWaveOnServer()
{
waveIsActive = false;
resolvedSequence.Value++;
if (initialTargetCount > 0 && escapedTargetCount == 0)
destroyedSequence.Value++;
Debug.Log(
$"[Map] Wave {currentWave.Value} resolved. " +
$"Destroyed: {Mathf.Max(0, initialTargetCount - escapedTargetCount)}, " +
$"escaped: {escapedTargetCount}.", this);
}
private Vector2 CreateSpawnCoordinates()
{
Vector2 baseCoordinates = mapPlayer != null
? mapPlayer.MapCoordinates
: new Vector2(5f, 5f);
Vector2 farthestCandidate = Vector2.zero;
float farthestDistance = -1f;
for (int attempt = 0; attempt < enemyBalance.SpawnPositionAttempts; attempt++)
{
Vector2 candidate = new(
UnityEngine.Random.Range(0f, MapCoordinateSystem.CoordinateMaximum),
UnityEngine.Random.Range(0f, MapCoordinateSystem.CoordinateMaximum));
float distance = Vector2.Distance(candidate, baseCoordinates);
if (distance >= enemyBalance.MinimumSpawnDistanceFromBase)
return candidate;
if (distance > farthestDistance)
{
farthestDistance = distance;
farthestCandidate = candidate;
}
}
return farthestCandidate;
}
private void ConfigurePresentation()
{
mapPlayer?.Configure(coordinateSystem);
targetController?.Configure(coordinateSystem, targetParent, mapPlayer);
radarController?.Configure(coordinateSystem, radarMarkPrefab);
impactMarkerView?.Configure(coordinateSystem);
crosshair?.Configure(
coordinateSystem, relayX, relayY, crosshairVisual, targetController);
}
private void ApplyPresentation()
{
crosshair?.SetCoordinates(crosshairCoordinates.Value);
targetController?.ApplyNetworkTargets(CreateTargetSnapshot(), currentWave.Value);
radarController?.ApplyRadarMarks(CreateRadarSnapshot());
if (radarController != null)
radarController.SetCooldownRemaining((float)RadarCooldownRemaining);
}
private void BindRoundEvents()
{
if (roundEventsBound)
return;
if (roundGameLoop == null)
roundGameLoop = FindFirstObjectByType<RoundGameLoopController>();
if (roundGameLoop == null || !roundGameLoop.IsSpawned)
return;
roundGameLoop.PhaseChanged += HandleRoundPhaseChanged;
roundEventsBound = true;
}
private void UnbindRoundEvents()
{
if (!roundEventsBound || roundGameLoop == null)
return;
roundGameLoop.PhaseChanged -= HandleRoundPhaseChanged;
roundEventsBound = false;
}
private void HandleRoundPhaseChanged(RoundPhase phase)
{
if (IsServer && phase == RoundPhase.WorkInProgress && !waveIsActive)
StartNextWaveOnServer();
}
private void HandleTargetListChanged(NetworkListEvent<MapTargetNetworkState> _) =>
targetController?.ApplyNetworkTargets(CreateTargetSnapshot(), currentWave.Value);
private void HandleRadarListChanged(NetworkListEvent<Vector2> _) =>
radarController?.ApplyRadarMarks(CreateRadarSnapshot());
private void HandleCrosshairChanged(Vector2 _, Vector2 current) =>
crosshair?.SetCoordinates(current);
private void HandleWaveChanged(int _, int current)
{
targetController?.ApplyNetworkTargets(CreateTargetSnapshot(), current);
WaveStarted?.Invoke(current);
waveStarted?.Invoke(current);
}
private void HandleRadarReadyAtChanged(double _, double __)
{
if (radarController != null)
radarController.SetCooldownRemaining((float)RadarCooldownRemaining);
}
private void HandleShotResultChanged(MapShotResultState previous, MapShotResultState current)
{
if (current.Sequence == 0 || current.Sequence == previous.Sequence)
return;
ShotResolved?.Invoke(current);
shotResolved?.Invoke(current.Hit);
impactMarkerView?.Show(current);
}
private void HandleResolvedSequenceChanged(uint previous, uint current)
{
if (current == previous)
return;
AllTargetsResolved?.Invoke();
allTargetsResolved?.Invoke();
}
private void HandleDestroyedSequenceChanged(uint previous, uint current)
{
if (current == previous)
return;
AllTargetsDestroyed?.Invoke();
allTargetsDestroyed?.Invoke();
}
private MapTargetNetworkState[] CreateTargetSnapshot()
{
MapTargetNetworkState[] snapshot = new MapTargetNetworkState[activeTargets.Count];
for (int index = 0; index < snapshot.Length; index++)
snapshot[index] = activeTargets[index];
return snapshot;
}
private Vector2[] CreateRadarSnapshot()
{
Vector2[] snapshot = new Vector2[radarMarks.Count];
for (int index = 0; index < snapshot.Length; index++)
snapshot[index] = radarMarks[index];
return snapshot;
}
}
@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 5a5f18d44c314323a2550f92ba7d988a
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,147 @@
using UnityEngine;
[DisallowMultipleComponent]
public sealed class MapCoordinateSystem : MonoBehaviour
{
public const float CoordinateMaximum = 10f;
[Header("Coordinate Bounds")]
[SerializeField] private Transform bottomLeft = null;
[SerializeField] private Transform bottomRight = null;
[SerializeField] private Transform topLeft = null;
[SerializeField] private Transform topRight = null;
[Header("Square Bounds")]
[SerializeField, Min(0.001f)] private float squareSize = 5.14925f;
[Header("Scene View Visualization")]
[SerializeField] private bool showSceneVisualization = true;
[SerializeField, Range(1, 20)] private int gridDivisions = 10;
[SerializeField] private bool showCoordinateLabels = true;
[SerializeField] private Color boundaryColor = new(0f, 0.85f, 1f, 1f);
[SerializeField] private Color gridColor = new(0f, 0.85f, 1f, 0.3f);
[SerializeField, Min(0.001f)] private float markerSize = 0.06f;
public Vector2 MaximumCoordinates => new(CoordinateMaximum, CoordinateMaximum);
public float SquareSize => Mathf.Max(0.001f, squareSize);
public bool ShowSceneVisualization => showSceneVisualization;
public int GridDivisions => Mathf.Max(1, gridDivisions);
public bool ShowCoordinateLabels => showCoordinateLabels;
public Color BoundaryColor => boundaryColor;
public Color GridColor => gridColor;
public float MarkerSize => Mathf.Max(0.001f, markerSize);
public Transform BottomLeft => bottomLeft;
public Transform BottomRight => bottomRight;
public Transform TopLeft => topLeft;
public Transform TopRight => topRight;
private void OnValidate()
{
squareSize = Mathf.Max(0.001f, squareSize);
ApplySquareBounds();
}
public void ApplySquareBounds()
{
if (!HasValidCorners())
return;
Vector3 origin = bottomLeft.position;
Vector3 rightDirection = bottomRight.position - origin;
Vector3 upDirection = topLeft.position - origin;
if (rightDirection.sqrMagnitude <= Mathf.Epsilon || upDirection.sqrMagnitude <= Mathf.Epsilon)
return;
rightDirection.Normalize();
upDirection = Vector3.ProjectOnPlane(upDirection, rightDirection);
if (upDirection.sqrMagnitude <= Mathf.Epsilon)
return;
upDirection.Normalize();
float size = SquareSize;
bottomRight.position = origin + rightDirection * size;
topLeft.position = origin + upDirection * size;
topRight.position = origin + (rightDirection + upDirection) * size;
}
public Vector2 ClampCoordinates(Vector2 coordinates)
{
return new Vector2(
Mathf.Clamp(coordinates.x, 0f, CoordinateMaximum),
Mathf.Clamp(coordinates.y, 0f, CoordinateMaximum));
}
public Vector3 CoordinatesToWorldPosition(Vector2 coordinates)
{
if (!HasValidCorners())
return transform.position;
Vector2 clamped = ClampCoordinates(coordinates);
float horizontal = clamped.x / CoordinateMaximum;
float vertical = clamped.y / CoordinateMaximum;
Vector3 bottom = Vector3.Lerp(bottomLeft.position, bottomRight.position, horizontal);
Vector3 top = Vector3.Lerp(topLeft.position, topRight.position, horizontal);
return Vector3.Lerp(bottom, top, vertical);
}
public Vector2 WorldPositionToCoordinates(Vector3 worldPosition)
{
if (!HasValidCorners())
return Vector2.zero;
Vector3 horizontalEdge = bottomRight.position - bottomLeft.position;
Vector3 verticalEdge = topLeft.position - bottomLeft.position;
Vector3 fromBottomLeft = worldPosition - bottomLeft.position;
float horizontal = horizontalEdge.sqrMagnitude > Mathf.Epsilon
? Vector3.Dot(fromBottomLeft, horizontalEdge) / horizontalEdge.sqrMagnitude
: 0f;
float vertical = verticalEdge.sqrMagnitude > Mathf.Epsilon
? Vector3.Dot(fromBottomLeft, verticalEdge) / verticalEdge.sqrMagnitude
: 0f;
for (int iteration = 0; iteration < 6; iteration++)
{
Vector3 current = BilinearPosition(horizontal, vertical);
Vector3 error = worldPosition - current;
Vector3 horizontalDerivative = Vector3.Lerp(
bottomRight.position - bottomLeft.position,
topRight.position - topLeft.position,
vertical);
Vector3 verticalDerivative = Vector3.Lerp(
topLeft.position - bottomLeft.position,
topRight.position - bottomRight.position,
horizontal);
float horizontalLength = Vector3.Dot(horizontalDerivative, horizontalDerivative);
float mixedLength = Vector3.Dot(horizontalDerivative, verticalDerivative);
float verticalLength = Vector3.Dot(verticalDerivative, verticalDerivative);
float determinant = horizontalLength * verticalLength - mixedLength * mixedLength;
if (Mathf.Abs(determinant) <= Mathf.Epsilon)
break;
float horizontalError = Vector3.Dot(horizontalDerivative, error);
float verticalError = Vector3.Dot(verticalDerivative, error);
horizontal += (horizontalError * verticalLength - verticalError * mixedLength) / determinant;
vertical += (verticalError * horizontalLength - horizontalError * mixedLength) / determinant;
}
Vector2 coordinates = new(
horizontal * CoordinateMaximum,
vertical * CoordinateMaximum);
return ClampCoordinates(coordinates);
}
private Vector3 BilinearPosition(float horizontal, float vertical)
{
Vector3 bottom = Vector3.LerpUnclamped(bottomLeft.position, bottomRight.position, horizontal);
Vector3 top = Vector3.LerpUnclamped(topLeft.position, topRight.position, horizontal);
return Vector3.LerpUnclamped(bottom, top, vertical);
}
public bool HasValidCorners()
{
return bottomLeft != null && bottomRight != null && topLeft != null && topRight != null;
}
}
@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 7206111709094332bdc9b4c7c44695b4
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,129 @@
using UnityEngine;
[DisallowMultipleComponent]
public sealed class MapCrosshairController : MonoBehaviour
{
[Header("Nearest Target (Runtime)")]
[SerializeField] private MapTarget nearestTarget;
[SerializeField] private float distanceToNearestTarget = -1f;
private MapCoordinateSystem coordinateSystem;
private MapTargetController targetController;
private Transform relayX;
private Transform relayY;
private Transform crosshairVisual;
private Vector2 crosshairCoordinates;
private Vector3 relayXOffset;
private Vector3 relayYOffset;
private bool isConfigured;
public MapCoordinateSystem CoordinateSystem => coordinateSystem;
public Vector2 Coordinates => crosshairCoordinates;
public void Configure(
MapCoordinateSystem newCoordinateSystem,
Transform newRelayX,
Transform newRelayY,
Transform newCrosshairVisual,
MapTargetController newTargetController)
{
coordinateSystem = newCoordinateSystem;
relayX = newRelayX;
relayY = newRelayY;
crosshairVisual = newCrosshairVisual;
targetController = newTargetController;
isConfigured = CalibrateObjects();
}
public void SetCoordinates(Vector2 coordinates)
{
if (!isConfigured)
return;
crosshairCoordinates = coordinateSystem.ClampCoordinates(coordinates);
ApplyCoordinates();
UpdateNearestTarget();
}
public Vector2 GetCrosshairCoordinates() => crosshairCoordinates;
public MapTarget GetNearestTarget() => nearestTarget;
public float GetDistanceToNearestTarget() => distanceToNearestTarget;
public bool TryGetNearestTarget(out MapTarget target, out float distance)
{
target = nearestTarget;
distance = distanceToNearestTarget;
return target != null;
}
private void ApplyCoordinates()
{
crosshairVisual.position =
coordinateSystem.CoordinatesToWorldPosition(crosshairCoordinates);
if (relayX != null)
{
relayX.position = coordinateSystem.CoordinatesToWorldPosition(
new Vector2(crosshairCoordinates.x, 0f)) + relayXOffset;
}
if (relayY != null)
{
relayY.position = coordinateSystem.CoordinatesToWorldPosition(
new Vector2(0f, crosshairCoordinates.y)) + relayYOffset;
}
}
private bool CalibrateObjects()
{
if (coordinateSystem == null || crosshairVisual == null ||
!coordinateSystem.HasValidCorners())
{
return false;
}
Vector3 origin = coordinateSystem.CoordinatesToWorldPosition(Vector2.zero);
Vector3 horizontalDirection = coordinateSystem.CoordinatesToWorldPosition(
new Vector2(MapCoordinateSystem.CoordinateMaximum, 0f)) - origin;
Vector3 verticalDirection = coordinateSystem.CoordinatesToWorldPosition(
new Vector2(0f, MapCoordinateSystem.CoordinateMaximum)) - origin;
if (horizontalDirection.sqrMagnitude <= Mathf.Epsilon ||
verticalDirection.sqrMagnitude <= Mathf.Epsilon)
{
return false;
}
horizontalDirection.Normalize();
verticalDirection.Normalize();
if (relayX != null)
relayXOffset = Vector3.ProjectOnPlane(relayX.position - origin, horizontalDirection);
if (relayY != null)
relayYOffset = Vector3.ProjectOnPlane(relayY.position - origin, verticalDirection);
return true;
}
private void UpdateNearestTarget()
{
nearestTarget = null;
distanceToNearestTarget = -1f;
if (targetController == null)
return;
float nearestSqrDistance = float.PositiveInfinity;
foreach (MapTarget target in targetController.Targets)
{
if (target == null)
continue;
float sqrDistance = (target.MapCoordinates - crosshairCoordinates).sqrMagnitude;
if (sqrDistance >= nearestSqrDistance)
continue;
nearestSqrDistance = sqrDistance;
nearestTarget = target;
}
if (nearestTarget != null)
distanceToNearestTarget = Mathf.Sqrt(nearestSqrDistance);
}
}
@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: f1eaeed1aba94e03b8f4b98a580444de
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,63 @@
using UnityEngine;
[CreateAssetMenu(
fileName = "MapEnemyBalance",
menuName = "Map Radar/Enemy Balance Config")]
public sealed class MapEnemyBalanceConfig : ScriptableObject
{
[Header("Wave")]
[SerializeField, Min(0)] private int targetsPerWave = 5;
[SerializeField, Min(0.02f)] private float simulationStep = 0.1f;
[Header("Spawn")]
[SerializeField, Range(0f, MapCoordinateSystem.CoordinateMaximum)]
private float minimumSpawnDistanceFromBase = 5f;
[SerializeField, Range(1, 128)] private int spawnPositionAttempts = 32;
[Header("Global Balance Multipliers")]
[SerializeField, Min(0f)] private float movementSpeedMultiplier = 0.5f;
[SerializeField, Min(0f)] private float attackDelayMultiplier = 1.5f;
[SerializeField, Min(0.01f)] private float healthMultiplier = 1f;
[SerializeField, Min(0f)] private float baseDamageMultiplier = 1f;
public int TargetsPerWave => Mathf.Max(0, targetsPerWave);
public float SimulationStep => Mathf.Max(0.02f, simulationStep);
public float MinimumSpawnDistanceFromBase => Mathf.Clamp(
minimumSpawnDistanceFromBase,
0f,
MapCoordinateSystem.CoordinateMaximum);
public int SpawnPositionAttempts => Mathf.Clamp(spawnPositionAttempts, 1, 128);
public float MovementSpeedMultiplier => Mathf.Max(0f, movementSpeedMultiplier);
public float AttackDelayMultiplier => Mathf.Max(0f, attackDelayMultiplier);
public float HealthMultiplier => Mathf.Max(0.01f, healthMultiplier);
public float BaseDamageMultiplier => Mathf.Max(0f, baseDamageMultiplier);
public float GetMovementSpeed(TargetConfig target) =>
target != null ? target.MovementSpeed * MovementSpeedMultiplier : 0f;
public float GetAttackDelay(TargetConfig target) =>
target != null ? target.TimeBeforeAttack * AttackDelayMultiplier : 0f;
public int GetHealth(TargetConfig target) => target != null
? Mathf.Max(1, Mathf.RoundToInt(target.Health * HealthMultiplier))
: 1;
public int GetBaseDamage(TargetConfig target) => target != null
? Mathf.Max(0, Mathf.RoundToInt(target.BaseDamage * BaseDamageMultiplier))
: 1;
private void OnValidate()
{
targetsPerWave = Mathf.Max(0, targetsPerWave);
simulationStep = Mathf.Max(0.02f, simulationStep);
minimumSpawnDistanceFromBase = Mathf.Clamp(
minimumSpawnDistanceFromBase,
0f,
MapCoordinateSystem.CoordinateMaximum);
spawnPositionAttempts = Mathf.Clamp(spawnPositionAttempts, 1, 128);
movementSpeedMultiplier = Mathf.Max(0f, movementSpeedMultiplier);
attackDelayMultiplier = Mathf.Max(0f, attackDelayMultiplier);
healthMultiplier = Mathf.Max(0.01f, healthMultiplier);
baseDamageMultiplier = Mathf.Max(0f, baseDamageMultiplier);
}
}
@@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: 1dfcdffb89f04cd468e4f8386b4f67e8
@@ -0,0 +1,76 @@
using System.Collections;
using UnityEngine;
using UnityEngine.Events;
[DisallowMultipleComponent]
public sealed class MapImpactMarkerView : MonoBehaviour
{
[SerializeField] private MapCoordinateSystem coordinateSystem;
[SerializeField, Min(0.01f)] private float markerLength = 0.35f;
[SerializeField, Min(0.005f)] private float markerThickness = 0.035f;
[SerializeField, Min(0f)] private float surfaceOffset = 0.025f;
[SerializeField, Min(0.1f)] private float lifetime = 5f;
[SerializeField] private Color hitColor = new(1f, 0.1f, 0.05f, 1f);
[SerializeField] private Color missColor = new(1f, 0.75f, 0f, 1f);
[SerializeField] private bool showMisses = true;
[SerializeField] private UnityEvent hitMarked;
[SerializeField] private UnityEvent missMarked;
public void Configure(MapCoordinateSystem coordinates) => coordinateSystem = coordinates;
public void Show(MapShotResultState result)
{
if (coordinateSystem == null || (!result.Hit && !showMisses))
return;
CreateMarker(result.Coordinates, result.Hit ? hitColor : missColor);
if (result.Hit)
hitMarked?.Invoke();
else
missMarked?.Invoke();
}
private void CreateMarker(Vector2 coordinates, Color color)
{
Vector3 horizontal = coordinateSystem.BottomRight.position -
coordinateSystem.BottomLeft.position;
Vector3 vertical = coordinateSystem.TopLeft.position -
coordinateSystem.BottomLeft.position;
Vector3 normal = Vector3.Cross(horizontal, vertical).normalized;
if (normal.sqrMagnitude < 0.5f)
normal = transform.forward;
GameObject marker = new($"Impact {coordinates.x:0.0}, {coordinates.y:0.0}");
marker.transform.SetParent(transform, true);
marker.transform.SetPositionAndRotation(
coordinateSystem.CoordinatesToWorldPosition(coordinates) + normal * surfaceOffset,
Quaternion.LookRotation(normal, vertical.normalized));
CreateBar(marker.transform, 45f, color);
CreateBar(marker.transform, -45f, color);
StartCoroutine(DestroyAfterLifetime(marker));
}
private void CreateBar(Transform parent, float angle, Color color)
{
GameObject bar = GameObject.CreatePrimitive(PrimitiveType.Cube);
bar.name = "Marker Bar";
bar.transform.SetParent(parent, false);
bar.transform.localRotation = Quaternion.Euler(0f, 0f, angle);
bar.transform.localScale = new Vector3(
markerLength, markerThickness, markerThickness);
Collider collider = bar.GetComponent<Collider>();
if (collider != null)
Destroy(collider);
Renderer renderer = bar.GetComponent<Renderer>();
if (renderer != null)
renderer.material.color = color;
}
private IEnumerator DestroyAfterLifetime(GameObject marker)
{
yield return new WaitForSeconds(lifetime);
if (marker != null)
Destroy(marker);
}
}
@@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: 0b3852b847aa89b48b9d38476e56250e
@@ -0,0 +1,36 @@
using UnityEngine;
[DisallowMultipleComponent]
public sealed class MapPlayer : MonoBehaviour
{
[Header("Map Position")]
[SerializeField] private Vector2 mapCoordinates = new(5f, 5f);
private MapCoordinateSystem coordinateSystem;
public Vector2 MapCoordinates => mapCoordinates;
public MapCoordinateSystem CoordinateSystem => coordinateSystem;
public void Configure(MapCoordinateSystem newCoordinateSystem)
{
coordinateSystem = newCoordinateSystem;
SetMapCoordinates(mapCoordinates);
}
public void SetMapCoordinates(Vector2 coordinates)
{
mapCoordinates = coordinateSystem != null
? coordinateSystem.ClampCoordinates(coordinates)
: new Vector2(
Mathf.Clamp(coordinates.x, 0f, MapCoordinateSystem.CoordinateMaximum),
Mathf.Clamp(coordinates.y, 0f, MapCoordinateSystem.CoordinateMaximum));
if (coordinateSystem != null && coordinateSystem.HasValidCorners())
transform.position = coordinateSystem.CoordinatesToWorldPosition(mapCoordinates);
}
public Vector2 GetMapCoordinates()
{
return mapCoordinates;
}
}
@@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: e8c0e4a1fa154b5ca06510a1443335bf
@@ -0,0 +1,79 @@
using System.Collections.Generic;
using UnityEngine;
[DisallowMultipleComponent]
public sealed class MapRadarController : MonoBehaviour
{
[Header("Radar Settings")]
[SerializeField, Min(0f)] private float cooldown = 5f;
[Header("Radar State (Runtime)")]
[SerializeField] private float cooldownRemaining;
private readonly List<GameObject> radarMarks = new();
private MapCoordinateSystem coordinateSystem;
private MapTarget radarMarkPrefab;
public float Cooldown => Mathf.Max(0f, cooldown);
public float CooldownRemaining => cooldownRemaining;
public bool IsReady => cooldownRemaining <= 0f;
private void OnValidate() => cooldown = Mathf.Max(0f, cooldown);
public void Configure(
MapCoordinateSystem newCoordinateSystem,
MapTarget newRadarMarkPrefab)
{
coordinateSystem = newCoordinateSystem;
radarMarkPrefab = newRadarMarkPrefab;
}
public void SetCooldownRemaining(float seconds) =>
cooldownRemaining = Mathf.Max(0f, seconds);
public void ApplyRadarMarks(IReadOnlyList<Vector2> coordinates)
{
if (coordinateSystem == null || !coordinateSystem.HasValidCorners() ||
radarMarkPrefab == null)
{
return;
}
EnsureRadarMarkCount(coordinates.Count);
for (int index = 0; index < radarMarks.Count; index++)
{
bool active = index < coordinates.Count;
GameObject radarMark = radarMarks[index];
radarMark.SetActive(active);
if (active)
{
radarMark.name = $"Radar Mark {index + 1}";
radarMark.transform.position =
coordinateSystem.CoordinatesToWorldPosition(coordinates[index]);
}
}
}
private void EnsureRadarMarkCount(int requiredCount)
{
while (radarMarks.Count < requiredCount)
{
GameObject radarMark = Instantiate(radarMarkPrefab.gameObject, transform);
PrepareRadarMark(radarMark);
radarMarks.Add(radarMark);
}
}
private static void PrepareRadarMark(GameObject radarMark)
{
MapTarget target = radarMark.GetComponent<MapTarget>();
if (target != null)
target.enabled = false;
foreach (Collider targetCollider in radarMark.GetComponentsInChildren<Collider>(true))
targetCollider.enabled = false;
foreach (Renderer targetRenderer in radarMark.GetComponentsInChildren<Renderer>(true))
targetRenderer.enabled = true;
}
}
@@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: 168bf77c50d14e44a54a3a2e6717d012
@@ -0,0 +1,87 @@
using UnityEngine;
[DisallowMultipleComponent]
public class MapTarget : MonoBehaviour
{
[Header("Target State (Runtime)")]
[SerializeField] private TargetConfig config;
[SerializeField] private int targetId = -1;
[SerializeField] private float timeUntilAttack;
[SerializeField] private Vector2 mapCoordinates;
[SerializeField] private int currentHealth;
[SerializeField] private MissileType requiredMissileType;
private MapCoordinateSystem coordinateSystem;
private MapPlayer player;
private Renderer[] targetRenderers;
private Collider[] targetColliders;
public int TargetId => targetId;
public Vector2 MapCoordinates => mapCoordinates;
public MapCoordinateSystem CoordinateSystem => coordinateSystem;
public TargetConfig Config => config;
public MapPlayer Player => player;
public float TimeUntilAttack => timeUntilAttack;
public int CurrentHealth => currentHealth;
public MissileType RequiredMissileType => requiredMissileType;
public void Configure(
TargetConfig newConfig,
MapCoordinateSystem newCoordinateSystem,
MapPlayer newPlayer)
{
config = newConfig;
coordinateSystem = newCoordinateSystem;
player = newPlayer;
}
public void ApplyNetworkState(MapTargetNetworkState state)
{
targetId = state.TargetId;
timeUntilAttack = state.AttackTimeRemaining;
currentHealth = state.Health;
requiredMissileType = config != null
? config.RequiredMissileType
: MissileType.None;
SetMapCoordinates(state.Coordinates);
}
public void SetMapCoordinates(Vector2 coordinates)
{
mapCoordinates = coordinateSystem != null
? coordinateSystem.ClampCoordinates(coordinates)
: new Vector2(
Mathf.Clamp(coordinates.x, 0f, MapCoordinateSystem.CoordinateMaximum),
Mathf.Clamp(coordinates.y, 0f, MapCoordinateSystem.CoordinateMaximum));
if (coordinateSystem != null && coordinateSystem.HasValidCorners())
transform.position = coordinateSystem.CoordinatesToWorldPosition(mapCoordinates);
}
public Vector2 GetMapCoordinates() => mapCoordinates;
public void SetVisualsVisible(bool isVisible)
{
if (targetRenderers == null)
targetRenderers = GetComponentsInChildren<Renderer>(true);
if (targetColliders == null)
targetColliders = GetComponentsInChildren<Collider>(true);
foreach (Renderer targetRenderer in targetRenderers)
{
if (targetRenderer != null)
targetRenderer.enabled = isVisible;
}
// Map targets are presentation objects, never physical world objects.
foreach (Collider targetCollider in targetColliders)
{
if (targetCollider != null)
targetCollider.enabled = false;
}
}
protected virtual void TickMovement(float deltaTime)
{
}
}
@@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: 2ae53f81d9ed4a0fb8d3496feac79ca1
@@ -0,0 +1,174 @@
using System;
using System.Collections.Generic;
using UnityEngine;
[DisallowMultipleComponent]
public sealed class MapTargetController : MonoBehaviour
{
[Header("Target Types")]
[SerializeField] private TargetConfig[] randomTargetConfigs = Array.Empty<TargetConfig>();
[SerializeField] private bool showLiveTargetVisuals;
[Header("Current Wave (Runtime)")]
[SerializeField, Min(0)] private int currentWave;
[SerializeField] private List<MapTarget> currentWaveTargets = new();
private readonly List<MapTarget> pooledTargets = new();
private readonly Dictionary<int, MapTarget> targetsById = new();
private readonly HashSet<int> synchronizedTargetIds = new();
private MapCoordinateSystem coordinateSystem;
private Transform targetParent;
private MapPlayer player;
public IReadOnlyList<MapTarget> Targets => currentWaveTargets;
public IReadOnlyList<TargetConfig> TargetConfigs => randomTargetConfigs;
public int CurrentWave => currentWave;
private void OnValidate()
{
currentWave = Mathf.Max(0, currentWave);
}
public void Configure(
MapCoordinateSystem newCoordinateSystem,
Transform newTargetParent,
MapPlayer newPlayer)
{
coordinateSystem = newCoordinateSystem;
targetParent = newTargetParent != null ? newTargetParent : transform;
player = newPlayer;
pooledTargets.Clear();
targetsById.Clear();
currentWaveTargets.Clear();
foreach (MapTarget existingTarget in targetParent.GetComponentsInChildren<MapTarget>(true))
{
existingTarget.SetVisualsVisible(false);
existingTarget.gameObject.SetActive(false);
pooledTargets.Add(existingTarget);
}
}
public void ApplyNetworkTargets(
IReadOnlyList<MapTargetNetworkState> states,
int wave)
{
currentWave = Mathf.Max(0, wave);
synchronizedTargetIds.Clear();
for (int index = 0; index < states.Count; index++)
{
MapTargetNetworkState state = states[index];
TargetConfig config = GetConfig(state.ConfigIndex);
if (config == null || config.TargetPrefab == null)
continue;
synchronizedTargetIds.Add(state.TargetId);
if (!targetsById.TryGetValue(state.TargetId, out MapTarget target) || target == null)
{
target = GetPooledTarget(config);
if (target == null)
target = Instantiate(config.TargetPrefab, targetParent);
targetsById[state.TargetId] = target;
currentWaveTargets.Add(target);
}
target.name = $"Wave {currentWave} - {config.name} - {state.TargetId}";
target.Configure(config, coordinateSystem, player);
target.ApplyNetworkState(state);
target.SetVisualsVisible(showLiveTargetVisuals);
target.gameObject.SetActive(true);
}
for (int index = currentWaveTargets.Count - 1; index >= 0; index--)
{
MapTarget target = currentWaveTargets[index];
if (target != null && synchronizedTargetIds.Contains(target.TargetId))
continue;
RetireTarget(target);
currentWaveTargets.RemoveAt(index);
}
}
public TargetConfig GetConfig(int index) =>
index >= 0 && index < randomTargetConfigs.Length
? randomTargetConfigs[index]
: null;
public int GetRandomValidConfigIndex()
{
if (randomTargetConfigs == null || randomTargetConfigs.Length == 0)
return -1;
int startIndex = UnityEngine.Random.Range(0, randomTargetConfigs.Length);
for (int offset = 0; offset < randomTargetConfigs.Length; offset++)
{
int index = (startIndex + offset) % randomTargetConfigs.Length;
TargetConfig config = randomTargetConfigs[index];
if (config != null && config.TargetPrefab != null)
return index;
}
return -1;
}
public bool HasValidConfiguration() =>
coordinateSystem != null && coordinateSystem.HasValidCorners() &&
GetRandomValidConfigIndex() >= 0;
public void SetTargetVisualsVisible(bool isVisible)
{
showLiveTargetVisuals = isVisible;
foreach (MapTarget target in currentWaveTargets)
{
if (target != null)
target.SetVisualsVisible(isVisible);
}
}
public MapTarget GetTarget(int index) =>
index >= 0 && index < currentWaveTargets.Count
? currentWaveTargets[index]
: null;
public bool StartNextWave()
{
MapController mapController = FindFirstObjectByType<MapController>();
return mapController != null && mapController.StartNextWave();
}
private MapTarget GetPooledTarget(TargetConfig config)
{
for (int index = pooledTargets.Count - 1; index >= 0; index--)
{
MapTarget candidate = pooledTargets[index];
if (candidate == null)
{
pooledTargets.RemoveAt(index);
continue;
}
if (candidate.GetType() != config.TargetPrefab.GetType())
continue;
pooledTargets.RemoveAt(index);
return candidate;
}
return null;
}
private void RetireTarget(MapTarget target)
{
if (target == null)
return;
targetsById.Remove(target.TargetId);
target.SetVisualsVisible(false);
target.gameObject.SetActive(false);
if (!pooledTargets.Contains(target))
pooledTargets.Add(target);
}
}
@@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: 06d2f3ff739a4a4ca04d749ccf14fd9c
@@ -0,0 +1,87 @@
using System;
using Unity.Netcode;
using UnityEngine;
public struct MapTargetNetworkState : INetworkSerializable,
IEquatable<MapTargetNetworkState>
{
public int TargetId;
public int ConfigIndex;
public Vector2 Coordinates;
public int Health;
public float AttackTimeRemaining;
public MapTargetNetworkState(
int targetId,
int configIndex,
Vector2 coordinates,
int health,
float attackTimeRemaining)
{
TargetId = targetId;
ConfigIndex = configIndex;
Coordinates = coordinates;
Health = health;
AttackTimeRemaining = attackTimeRemaining;
}
public void NetworkSerialize<T>(BufferSerializer<T> serializer)
where T : IReaderWriter
{
serializer.SerializeValue(ref TargetId);
serializer.SerializeValue(ref ConfigIndex);
serializer.SerializeValue(ref Coordinates);
serializer.SerializeValue(ref Health);
serializer.SerializeValue(ref AttackTimeRemaining);
}
public bool Equals(MapTargetNetworkState other) =>
TargetId == other.TargetId &&
ConfigIndex == other.ConfigIndex &&
Coordinates == other.Coordinates &&
Health == other.Health &&
AttackTimeRemaining.Equals(other.AttackTimeRemaining);
}
public struct MapShotResultState : INetworkSerializable,
IEquatable<MapShotResultState>
{
public uint Sequence;
public bool Hit;
public int TargetId;
public Vector2 Coordinates;
public float Distance;
public MissileType MissileType;
public MapShotResultState(
uint sequence,
bool hit,
int targetId,
Vector2 coordinates,
float distance,
MissileType missileType)
{
Sequence = sequence;
Hit = hit;
TargetId = targetId;
Coordinates = coordinates;
Distance = distance;
MissileType = missileType;
}
public void NetworkSerialize<T>(BufferSerializer<T> serializer)
where T : IReaderWriter
{
serializer.SerializeValue(ref Sequence);
serializer.SerializeValue(ref Hit);
serializer.SerializeValue(ref TargetId);
serializer.SerializeValue(ref Coordinates);
serializer.SerializeValue(ref Distance);
serializer.SerializeValue(ref MissileType);
}
public bool Equals(MapShotResultState other) =>
Sequence == other.Sequence && Hit == other.Hit &&
TargetId == other.TargetId && Coordinates == other.Coordinates &&
Distance.Equals(other.Distance) && MissileType == other.MissileType;
}
@@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: 374f32cae69b9184fb3fffe2969c6cce
@@ -0,0 +1,7 @@
public enum MissileType
{
None = 0,
Standard = 1,
AntiAir = 2,
AntiGround = 3
}
@@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: 7c284b720e314585add2b38671f83ccf
@@ -0,0 +1,79 @@
using System;
using Unity.Netcode;
using UnityEngine;
using UnityEngine.Events;
[DisallowMultipleComponent]
[RequireComponent(typeof(NetworkObject))]
public sealed class NetworkBaseHealth : NetworkBehaviour
{
[SerializeField, Min(1)] private int maximumHealth = 10;
[SerializeField] private UnityEvent<int> healthChanged;
[SerializeField] private UnityEvent depleted;
private readonly NetworkVariable<int> currentHealth = new(
0,
NetworkVariableReadPermission.Everyone,
NetworkVariableWritePermission.Server);
public int MaximumHealth => Mathf.Max(1, maximumHealth);
public int CurrentHealth => currentHealth.Value;
public bool IsDepleted => CurrentHealth <= 0;
public event Action<int> Changed;
public event Action Depleted;
private void OnValidate() => maximumHealth = Mathf.Max(1, maximumHealth);
public override void OnNetworkSpawn()
{
currentHealth.OnValueChanged += HandleHealthChanged;
if (IsServer)
currentHealth.Value = MaximumHealth;
ApplyState(currentHealth.Value, false);
}
public override void OnNetworkDespawn()
{
currentHealth.OnValueChanged -= HandleHealthChanged;
}
public bool ApplyDamage(int amount)
{
if (!IsServer || !IsSpawned || amount <= 0 || IsDepleted)
return false;
currentHealth.Value = Mathf.Max(0, CurrentHealth - amount);
return true;
}
public void ResetHealth()
{
if (IsServer && IsSpawned)
currentHealth.Value = MaximumHealth;
}
[ContextMenu("Debug/Apply One Damage (Server Play Mode)")]
private void ApplyDebugDamage()
{
if (Application.isPlaying)
ApplyDamage(1);
}
private void HandleHealthChanged(int previous, int current) =>
ApplyState(current, previous > 0 && current <= 0);
private void ApplyState(int health, bool becameDepleted)
{
Changed?.Invoke(health);
healthChanged?.Invoke(health);
if (!becameDepleted)
return;
Depleted?.Invoke();
depleted?.Invoke();
}
}
@@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: f171a6cd9e9609e4e8a4822dbefe982f
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: d88efbc6589a4404caadb566c0e28842
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,129 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &4012125527390687084
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 2929517388927179322}
- component: {fileID: 1898238889115289471}
- component: {fileID: 5321613745555827914}
- component: {fileID: 212733908007784450}
- component: {fileID: 878491239745611204}
m_Layer: 0
m_Name: AirTargetTest
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &2929517388927179322
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4012125527390687084}
serializedVersion: 2
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 0.39, y: 0.39, z: 0.39}
m_ConstrainProportionsScale: 1
m_Children: []
m_Father: {fileID: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!33 &1898238889115289471
MeshFilter:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4012125527390687084}
m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0}
--- !u!23 &5321613745555827914
MeshRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4012125527390687084}
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: 2
m_RayTraceProcedural: 0
m_RayTracingAccelStructBuildFlagsOverride: 0
m_RayTracingAccelStructBuildFlags: 1
m_SmallMeshCulling: 1
m_RenderingLayerMask: 1
m_RendererPriority: 0
m_Materials:
- {fileID: 2100000, guid: c57515654cf43eb4995ae19964d2ca0b, 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: 1
m_SelectedEditorRenderState: 3
m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0}
m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 0
m_AdditionalVertexStreams: {fileID: 0}
--- !u!65 &212733908007784450
BoxCollider:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4012125527390687084}
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, y: 1, z: 1}
m_Center: {x: 0, y: 0, z: 0}
--- !u!114 &878491239745611204
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4012125527390687084}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: d5316cf7562b473d9513878ea906a1b2, type: 3}
m_Name:
m_EditorClassIdentifier: Assembly-CSharp::AirTarget
config: {fileID: 0}
timeUntilAttack: 0
mapCoordinates: {x: 0, y: 0}
currentHealth: 0
requiredMissileType: 0
isReadyToAttack: 0
@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 7ef28d9e428a4b94ab7ea4f36fd44d9c
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,124 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &2177866398127073846
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 8348844199957468506}
- component: {fileID: 272982991980855488}
- component: {fileID: 2419606774366489511}
- component: {fileID: 7430463338199182122}
- component: {fileID: 3288838730342684678}
m_Layer: 0
m_Name: MapPlayer
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &8348844199957468506
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2177866398127073846}
serializedVersion: 2
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: -11.339558, y: -0.48904037, z: 8.11739}
m_LocalScale: {x: 0.39, y: 0.39, z: 0.39}
m_ConstrainProportionsScale: 1
m_Children: []
m_Father: {fileID: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!33 &272982991980855488
MeshFilter:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2177866398127073846}
m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0}
--- !u!23 &2419606774366489511
MeshRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2177866398127073846}
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: 2
m_RayTraceProcedural: 0
m_RayTracingAccelStructBuildFlagsOverride: 0
m_RayTracingAccelStructBuildFlags: 1
m_SmallMeshCulling: 1
m_RenderingLayerMask: 1
m_RendererPriority: 0
m_Materials:
- {fileID: 2100000, guid: b27d30c59586fb4499180239a9bd64f1, 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: 1
m_SelectedEditorRenderState: 3
m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0}
m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 0
m_AdditionalVertexStreams: {fileID: 0}
--- !u!65 &7430463338199182122
BoxCollider:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2177866398127073846}
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, y: 1, z: 1}
m_Center: {x: 0, y: 0, z: 0}
--- !u!114 &3288838730342684678
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2177866398127073846}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: e8c0e4a1fa154b5ca06510a1443335bf, type: 3}
m_Name:
m_EditorClassIdentifier: Assembly-CSharp::MapPlayer
mapCoordinates: {x: 5, y: 5}
@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 87ea05b44a3faf5489e6266f985c5324
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,129 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &4012125527390687084
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 2929517388927179322}
- component: {fileID: 1898238889115289471}
- component: {fileID: 5321613745555827914}
- component: {fileID: 212733908007784450}
- component: {fileID: 878491239745611204}
m_Layer: 0
m_Name: TargetTest
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &2929517388927179322
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4012125527390687084}
serializedVersion: 2
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: -0.42, y: 3.280054, z: 2.6187859}
m_LocalScale: {x: 0.39, y: 0.39, z: 0.39}
m_ConstrainProportionsScale: 1
m_Children: []
m_Father: {fileID: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!33 &1898238889115289471
MeshFilter:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4012125527390687084}
m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0}
--- !u!23 &5321613745555827914
MeshRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4012125527390687084}
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: 2
m_RayTraceProcedural: 0
m_RayTracingAccelStructBuildFlagsOverride: 0
m_RayTracingAccelStructBuildFlags: 1
m_SmallMeshCulling: 1
m_RenderingLayerMask: 1
m_RendererPriority: 0
m_Materials:
- {fileID: 2100000, guid: c57515654cf43eb4995ae19964d2ca0b, 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: 1
m_SelectedEditorRenderState: 3
m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0}
m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 0
m_AdditionalVertexStreams: {fileID: 0}
--- !u!65 &212733908007784450
BoxCollider:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4012125527390687084}
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, y: 1, z: 1}
m_Center: {x: 0, y: 0, z: 0}
--- !u!114 &878491239745611204
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4012125527390687084}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 8be0d56377aa4082a276cfe31702e80c, type: 3}
m_Name:
m_EditorClassIdentifier: Assembly-CSharp::GroundTarget
config: {fileID: 0}
timeUntilAttack: 0
mapCoordinates: {x: 0, y: 0}
currentHealth: 0
requiredMissileType: 0
isReadyToAttack: 0
@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 985d88cac4b4daa48973a1a464a3d4e5
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,35 @@
using UnityEngine;
[CreateAssetMenu(fileName = "TargetConfig", menuName = "Map Radar/Target Config")]
public sealed class TargetConfig : ScriptableObject
{
[Header("Target Prefab")]
[SerializeField] private MapTarget targetPrefab = null;
[Header("Target Stats")]
[SerializeField, Min(0f)] private float timeBeforeAttack = 5f;
[SerializeField, Min(1)] private int health = 100;
[SerializeField, Min(1)] private int baseDamage = 1;
[SerializeField] private MissileType requiredMissileType = MissileType.Standard;
[Header("Air Target Movement")]
[SerializeField, Min(0f)] private float movementSpeed = 1f;
[SerializeField, Min(0f)] private float stoppingDistance = 0.25f;
public MapTarget TargetPrefab => targetPrefab;
public float TimeBeforeAttack => timeBeforeAttack;
public int Health => health;
public int BaseDamage => baseDamage;
public MissileType RequiredMissileType => requiredMissileType;
public float MovementSpeed => movementSpeed;
public float StoppingDistance => stoppingDistance;
private void OnValidate()
{
timeBeforeAttack = Mathf.Max(0f, timeBeforeAttack);
health = Mathf.Max(1, health);
baseDamage = Mathf.Max(1, baseDamage);
movementSpeed = Mathf.Max(0f, movementSpeed);
stoppingDistance = Mathf.Max(0f, stoppingDistance);
}
}
@@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: c4e7ec8e55a847eaa5c7914bf08d1f98
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 01fc6a03af2e2c74a8ef1cd4a6f4ad5e
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,137 @@
%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: Crosshair
m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, type: 3}
m_Parent: {fileID: 0}
m_ModifiedSerializedProperties: 0
m_ValidKeywords:
- _EMISSION
m_InvalidKeywords: []
m_LightmapFlags: 2
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap:
RenderType: Opaque
disabledShaderPasses:
- MOTIONVECTORS
m_LockedProperties:
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _BaseMap:
m_Texture: {fileID: 0}
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}
- _DetailAlbedoMap:
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: 2800000, guid: 8b6daeadfc1e345a792cbbff1ceeabb9, type: 3}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MainTex:
m_Texture: {fileID: 0}
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
- _Blend: 0
- _BlendModePreserveSpecular: 1
- _BumpScale: 1
- _ClearCoatMask: 0
- _ClearCoatSmoothness: 0
- _Cull: 2
- _Cutoff: 0.5
- _DetailAlbedoMapScale: 1
- _DetailNormalMapScale: 1
- _DstBlend: 0
- _DstBlendAlpha: 0
- _EnvironmentReflections: 1
- _GlossMapScale: 0
- _Glossiness: 0
- _GlossyReflections: 0
- _Metallic: 0.632
- _OcclusionStrength: 1
- _Parallax: 0.005
- _QueueOffset: 0
- _ReceiveShadows: 1
- _Smoothness: 0.106
- _SmoothnessTextureChannel: 0
- _SpecularHighlights: 1
- _SrcBlend: 1
- _SrcBlendAlpha: 1
- _Surface: 0
- _WorkflowMode: 1
- _ZWrite: 1
m_Colors:
- _BaseColor: {r: 0, g: 0.9233861, b: 1, a: 1}
- _Color: {r: 0, g: 0.9233861, b: 1, a: 1}
- _EmissionColor: {r: 0.15221034, g: 1.493739, b: 1.5365998, a: 1}
- _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1}
m_BuildTextureStacks: []
m_AllowLocking: 1
--- !u!114 &3289058871599513036
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:
version: 10
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 22474510b3d8cc048bb0bc8679862784
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 2100000
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,137 @@
%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: MapPlayer
m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, type: 3}
m_Parent: {fileID: 0}
m_ModifiedSerializedProperties: 0
m_ValidKeywords:
- _EMISSION
m_InvalidKeywords: []
m_LightmapFlags: 2
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap:
RenderType: Opaque
disabledShaderPasses:
- MOTIONVECTORS
m_LockedProperties:
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _BaseMap:
m_Texture: {fileID: 0}
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}
- _DetailAlbedoMap:
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: 2800000, guid: 2b2440b1910ed4bb6a835e2d074a9865, type: 3}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MainTex:
m_Texture: {fileID: 0}
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
- _Blend: 0
- _BlendModePreserveSpecular: 1
- _BumpScale: 1
- _ClearCoatMask: 0
- _ClearCoatSmoothness: 0
- _Cull: 2
- _Cutoff: 0.5
- _DetailAlbedoMapScale: 1
- _DetailNormalMapScale: 1
- _DstBlend: 0
- _DstBlendAlpha: 0
- _EnvironmentReflections: 1
- _GlossMapScale: 0
- _Glossiness: 0
- _GlossyReflections: 0
- _Metallic: 0.632
- _OcclusionStrength: 1
- _Parallax: 0.005
- _QueueOffset: 0
- _ReceiveShadows: 1
- _Smoothness: 0.106
- _SmoothnessTextureChannel: 0
- _SpecularHighlights: 1
- _SrcBlend: 1
- _SrcBlendAlpha: 1
- _Surface: 0
- _WorkflowMode: 1
- _ZWrite: 1
m_Colors:
- _BaseColor: {r: 0, g: 0.0816164, b: 1, a: 1}
- _Color: {r: 0, g: 0.08161638, b: 1, a: 1}
- _EmissionColor: {r: 0, g: 0.23383103, b: 2.7913604, a: 1}
- _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1}
m_BuildTextureStacks: []
m_AllowLocking: 1
--- !u!114 &3289058871599513036
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:
version: 10
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: b27d30c59586fb4499180239a9bd64f1
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 2100000
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,117 @@
fileFormatVersion: 2
guid: 71c6f8835ecab4c489ead4e40a5aafef
TextureImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 13
mipmaps:
mipMapMode: 0
enableMipMap: 0
sRGBTexture: 1
linearTexture: 0
fadeOut: 0
borderMipMap: 0
mipMapsPreserveCoverage: 0
alphaTestReferenceValue: 0.5
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
flipGreenChannel: 0
isReadable: 0
streamingMipmaps: 0
streamingMipmapsPriority: 0
vTOnly: 0
ignoreMipmapLimit: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: 1
aniso: 1
mipBias: 0
wrapU: 1
wrapV: 1
wrapW: 0
nPOTScale: 0
lightmap: 0
compressionQuality: 50
spriteMode: 1
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spritePixelsToUnits: 100
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spriteGenerateFallbackPhysicsShape: 1
alphaUsage: 1
alphaIsTransparency: 1
spriteTessellationDetail: -1
textureType: 8
textureShape: 1
singleChannelComponent: 0
flipbookRows: 1
flipbookColumns: 1
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
ignorePngGamma: 0
applyGammaDecoding: 0
swizzle: 50462976
cookieLightType: 0
platformSettings:
- serializedVersion: 4
buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 4
buildTarget: Standalone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
customData:
physicsShape: []
bones: []
spriteID: 5e97eb03825dee720800000000000000
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
spriteCustomMetadata:
entries: []
nameFileIdTable: {}
mipmapLimitGroupName:
pSDRemoveMatte: 0
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,137 @@
%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: Target
m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, type: 3}
m_Parent: {fileID: 0}
m_ModifiedSerializedProperties: 0
m_ValidKeywords:
- _EMISSION
m_InvalidKeywords: []
m_LightmapFlags: 2
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap:
RenderType: Opaque
disabledShaderPasses:
- MOTIONVECTORS
m_LockedProperties:
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _BaseMap:
m_Texture: {fileID: 0}
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}
- _DetailAlbedoMap:
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: 2800000, guid: 8b6daeadfc1e345a792cbbff1ceeabb9, type: 3}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MainTex:
m_Texture: {fileID: 0}
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
- _Blend: 0
- _BlendModePreserveSpecular: 1
- _BumpScale: 1
- _ClearCoatMask: 0
- _ClearCoatSmoothness: 0
- _Cull: 2
- _Cutoff: 0.5
- _DetailAlbedoMapScale: 1
- _DetailNormalMapScale: 1
- _DstBlend: 0
- _DstBlendAlpha: 0
- _EnvironmentReflections: 1
- _GlossMapScale: 0
- _Glossiness: 0
- _GlossyReflections: 0
- _Metallic: 0.632
- _OcclusionStrength: 1
- _Parallax: 0.005
- _QueueOffset: 0
- _ReceiveShadows: 1
- _Smoothness: 0.106
- _SmoothnessTextureChannel: 0
- _SpecularHighlights: 1
- _SrcBlend: 1
- _SrcBlendAlpha: 1
- _Surface: 0
- _WorkflowMode: 1
- _ZWrite: 1
m_Colors:
- _BaseColor: {r: 1, g: 0, b: 0.050980568, a: 1}
- _Color: {r: 1, g: 0, b: 0.050980546, a: 1}
- _EmissionColor: {r: 2.0907834, g: 0, b: 0, a: 1}
- _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1}
m_BuildTextureStacks: []
m_AllowLocking: 1
--- !u!114 &3289058871599513036
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:
version: 10
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: c57515654cf43eb4995ae19964d2ca0b
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 2100000
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,137 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &-4452286349835602218
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:
version: 10
--- !u!21 &2100000
Material:
serializedVersion: 8
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: Test
m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, type: 3}
m_Parent: {fileID: 0}
m_ModifiedSerializedProperties: 0
m_ValidKeywords:
- _SMOOTHNESS_TEXTURE_ALBEDO_CHANNEL_A
m_InvalidKeywords: []
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap:
RenderType: Opaque
disabledShaderPasses:
- MOTIONVECTORS
m_LockedProperties:
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _BaseMap:
m_Texture: {fileID: 0}
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}
- _DetailAlbedoMap:
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: 0}
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
- _Blend: 0
- _BlendModePreserveSpecular: 1
- _BumpScale: 1
- _ClearCoatMask: 0
- _ClearCoatSmoothness: 0
- _Cull: 2
- _Cutoff: 0.5
- _DetailAlbedoMapScale: 1
- _DetailNormalMapScale: 1
- _DstBlend: 0
- _DstBlendAlpha: 0
- _EnvironmentReflections: 1
- _GlossMapScale: 0
- _Glossiness: 0
- _GlossyReflections: 0
- _Metallic: 0
- _OcclusionStrength: 1
- _Parallax: 0.005
- _QueueOffset: 0
- _ReceiveShadows: 1
- _Smoothness: 0
- _SmoothnessTextureChannel: 1
- _SpecularHighlights: 1
- _SrcBlend: 1
- _SrcBlendAlpha: 1
- _Surface: 0
- _WorkflowMode: 1
- _ZWrite: 1
m_Colors:
- _BaseColor: {r: 1, g: 1, b: 1, a: 1}
- _Color: {r: 1, g: 1, b: 1, a: 1}
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
- _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1}
m_BuildTextureStacks: []
m_AllowLocking: 1
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 0b8e0a594b1c84542b029378c039338e
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 2100000
userData:
assetBundleName:
assetBundleVariant:
@@ -52,6 +52,8 @@ GameObject:
- component: {fileID: 6442729922619842682}
- component: {fileID: 5032171862004131710}
- component: {fileID: 5463195673691487104}
- component: {fileID: 5685992952666159115}
- component: {fileID: 5909870405075214492}
m_Layer: 0
m_Name: NetworkPlayer
m_TagString: Untagged
@@ -205,6 +207,7 @@ MonoBehaviour:
sprintSpeed: 7
jumpHeight: 1.4
gravity: 20
impulseDamping: 9
--- !u!114 &3719056139727702052
MonoBehaviour:
m_ObjectHideFlags: 0
@@ -219,6 +222,7 @@ MonoBehaviour:
m_EditorClassIdentifier:
ShowTopMostFoldoutHeaderGroup: 1
verticalLookLimit: 89
remotePitchFollowSpeed: 20
--- !u!114 &2519868927162778852
MonoBehaviour:
m_ObjectHideFlags: 0
@@ -302,8 +306,33 @@ MonoBehaviour:
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 5e63651da7abbf744bc45585a2133e6f, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Name:
m_EditorClassIdentifier:
ShowTopMostFoldoutHeaderGroup: 1
--- !u!114 &5685992952666159115
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2724913065371725993}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: b12d3c124e93b5f4f9c06c7e870d4068, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!114 &5909870405075214492
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2724913065371725993}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 6a7ddedc58d3467449dfbe83af1c9c51, type: 3}
m_Name:
m_EditorClassIdentifier:
ShowTopMostFoldoutHeaderGroup: 1
--- !u!1 &4726019310047661441
GameObject:
+8
View File
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 2b80031cb8a86414c9b054ed5a280465
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,20 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
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: e069cd58c327cc94e9c2598c9e4c449f, type: 3}
m_Name: CannonConfig
m_EditorClassIdentifier:
minimumDelay: 0
maximumDelay: 30
defaultDelay: 5
adjustmentStep: 1
acceptDefectiveRockets: 1
acceptCriticallyDamagedRockets: 0
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 23aa810e05d4cbc4da4bb729f5e54688
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,36 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
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: 96e16f6f88696ea4c8b884f3e7cef9f7, type: 3}
m_Name: CannonShockwave
m_EditorClassIdentifier:
zones:
- Radius: 8
PlayerImpulse: 12
RigidbodyImpulse: 18
UpwardBias: 0.35
CameraShakeAmplitude: 0.22
CameraShakeDuration: 0.9
CameraShakeFrequency: 28
- Radius: 18
PlayerImpulse: 5
RigidbodyImpulse: 8
UpwardBias: 0.25
CameraShakeAmplitude: 0.12
CameraShakeDuration: 0.75
CameraShakeFrequency: 24
- Radius: 35
PlayerImpulse: 0
RigidbodyImpulse: 1.5
UpwardBias: 0.1
CameraShakeAmplitude: 0.055
CameraShakeDuration: 0.55
CameraShakeFrequency: 20
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 9155e8ad462c3484ba4275bcb64babe2
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,36 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
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: 96e16f6f88696ea4c8b884f3e7cef9f7, type: 3}
m_Name: RocketImpactShockwave
m_EditorClassIdentifier:
zones:
- Radius: 4
PlayerImpulse: 8
RigidbodyImpulse: 12
UpwardBias: 0.4
CameraShakeAmplitude: 0.18
CameraShakeDuration: 0.7
CameraShakeFrequency: 27
- Radius: 8
PlayerImpulse: 3
RigidbodyImpulse: 5
UpwardBias: 0.3
CameraShakeAmplitude: 0.09
CameraShakeDuration: 0.55
CameraShakeFrequency: 23
- Radius: 14
PlayerImpulse: 0
RigidbodyImpulse: 0.5
UpwardBias: 0.1
CameraShakeAmplitude: 0.04
CameraShakeDuration: 0.4
CameraShakeFrequency: 18
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 5afb0716a3dcecf469e0fe2128d5b98b
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:
@@ -16,4 +16,4 @@ MonoBehaviour:
displayName: Rocket-Base-Avia-Ready
partTypeId: rocket-base-avia
processingState: 1
worldPrefab: {fileID: 1256934312238460503, guid: 9712e2459410a6d43b55ea9d3847e29a, type: 3}
worldPrefab: {fileID: 1256934312238460503, guid: 033239ea2c28a8f4e8a5896663eecaca, type: 3}
@@ -16,4 +16,4 @@ MonoBehaviour:
displayName: Rocket-Base-Standart-Ready
partTypeId: rocket-base-standard
processingState: 1
worldPrefab: {fileID: 875723161486981202, guid: 6e681ca5358fff648ba85ae9e494fa77, type: 3}
worldPrefab: {fileID: 875723161486981202, guid: 101ea854d65f59f4f98b57bac6bad504, type: 3}
@@ -16,4 +16,4 @@ MonoBehaviour:
displayName: Rocket-Cone-Standart-Ready
partTypeId: rocket-cone-standard
processingState: 1
worldPrefab: {fileID: 7151289907260619783, guid: a31204f69b185d54ab9e12b0a3a1e98b, type: 3}
worldPrefab: {fileID: 7151289907260619783, guid: 0690a926ec2b8d5498fd25633af436e1, type: 3}

Some files were not shown because too many files have changed in this diff Show More