Functional waypoint system

This commit is contained in:
BOT Alex 2024-04-21 04:53:57 +02:00
parent 676a6935f7
commit deeb5fc633
5 changed files with 721 additions and 4 deletions

View File

@ -329,12 +329,12 @@ PrefabInstance:
- target: {fileID: 4220667717328304921, guid: f54a14318952c90c5b47a300aedb0d15, - target: {fileID: 4220667717328304921, guid: f54a14318952c90c5b47a300aedb0d15,
type: 3} type: 3}
propertyPath: m_LocalRotation.y propertyPath: m_LocalRotation.y
value: -0.00000001990998 value: -0.00000001785987
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 4220667717328304921, guid: f54a14318952c90c5b47a300aedb0d15, - target: {fileID: 4220667717328304921, guid: f54a14318952c90c5b47a300aedb0d15,
type: 3} type: 3}
propertyPath: m_LocalRotation.z propertyPath: m_LocalRotation.z
value: -3.6221226e-10 value: -3.2491562e-10
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 5565472806559733162, guid: f54a14318952c90c5b47a300aedb0d15, - target: {fileID: 5565472806559733162, guid: f54a14318952c90c5b47a300aedb0d15,
type: 3} type: 3}

View File

@ -171,6 +171,119 @@ MonoBehaviour:
m_EditorClassIdentifier: m_EditorClassIdentifier:
RebuildGrid: 0 RebuildGrid: 0
SilhouetteMaterial: {fileID: 2100000, guid: 0610eb89b05f0b546929db3664a351d8, type: 2} SilhouetteMaterial: {fileID: 2100000, guid: 0610eb89b05f0b546929db3664a351d8, type: 2}
--- !u!21 &103411599
Material:
serializedVersion: 8
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: UI/RoundedCorners/IndependentRoundedCorners
m_Shader: {fileID: 4800000, guid: d3beb88e61f88ca4393acdefb005fa70, type: 3}
m_Parent: {fileID: 0}
m_ModifiedSerializedProperties: 0
m_ValidKeywords: []
m_InvalidKeywords: []
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap: {}
disabledShaderPasses: []
m_LockedProperties:
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _MainTex:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Ints: []
m_Floats:
- _ColorMask: 15
- _Stencil: 0
- _StencilComp: 8
- _StencilOp: 0
- _StencilReadMask: 255
- _StencilWriteMask: 255
- _UseUIAlphaClip: 0
m_Colors:
- _halfSize: {r: 36.5705, g: 37.7215, b: 0, a: 0}
- _r: {r: 40, g: 0, b: 0, a: 40}
- _rect2props: {r: 20, g: -0.0000076293945, b: 38.390244, a: 38.390244}
m_BuildTextureStacks: []
--- !u!21 &233895429
Material:
serializedVersion: 8
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: UI/RoundedCorners/IndependentRoundedCorners
m_Shader: {fileID: 4800000, guid: d3beb88e61f88ca4393acdefb005fa70, type: 3}
m_Parent: {fileID: 0}
m_ModifiedSerializedProperties: 0
m_ValidKeywords: []
m_InvalidKeywords: []
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap: {}
disabledShaderPasses: []
m_LockedProperties:
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _MainTex:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Ints: []
m_Floats:
- _ColorMask: 15
- _Stencil: 0
- _StencilComp: 8
- _StencilOp: 0
- _StencilReadMask: 255
- _StencilWriteMask: 255
- _UseUIAlphaClip: 0
m_Colors:
- _halfSize: {r: 97.8265, g: 37.763, b: 0, a: 0}
- _r: {r: 30.96, g: 0, b: 0, a: 0}
- _rect2props: {r: 7.7400208, g: -7.7400017, b: 84.93025, a: 95.87626}
m_BuildTextureStacks: []
--- !u!1 &240436525
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 240436526}
m_Layer: 0
m_Name: Waypoint (1)
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &240436526
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 240436525}
serializedVersion: 2
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 1.82, z: 6.45}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 1278148243}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!21 &248483236 --- !u!21 &248483236
Material: Material:
serializedVersion: 8 serializedVersion: 8
@ -377,6 +490,88 @@ MonoBehaviour:
m_LightCookieSize: {x: 1, y: 1} m_LightCookieSize: {x: 1, y: 1}
m_LightCookieOffset: {x: 0, y: 0} m_LightCookieOffset: {x: 0, y: 0}
m_SoftShadowQuality: 0 m_SoftShadowQuality: 0
--- !u!21 &749564851
Material:
serializedVersion: 8
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: UI/RoundedCorners/IndependentRoundedCorners
m_Shader: {fileID: 4800000, guid: d3beb88e61f88ca4393acdefb005fa70, type: 3}
m_Parent: {fileID: 0}
m_ModifiedSerializedProperties: 0
m_ValidKeywords: []
m_InvalidKeywords: []
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap: {}
disabledShaderPasses: []
m_LockedProperties:
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _MainTex:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Ints: []
m_Floats:
- _ColorMask: 15
- _Stencil: 0
- _StencilComp: 8
- _StencilOp: 0
- _StencilReadMask: 255
- _StencilWriteMask: 255
- _UseUIAlphaClip: 0
m_Colors:
- _halfSize: {r: 97.85, g: 477.754, b: 0, a: 0}
- _r: {r: 0, g: 0, b: 0, a: 40}
- _rect2props: {r: 10, g: 9.999939, b: 407.01352, a: 392.87137}
m_BuildTextureStacks: []
--- !u!21 &778760732
Material:
serializedVersion: 8
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: UI/RoundedCorners/IndependentRoundedCorners
m_Shader: {fileID: 4800000, guid: d3beb88e61f88ca4393acdefb005fa70, type: 3}
m_Parent: {fileID: 0}
m_ModifiedSerializedProperties: 0
m_ValidKeywords: []
m_InvalidKeywords: []
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap: {}
disabledShaderPasses: []
m_LockedProperties:
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _MainTex:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Ints: []
m_Floats:
- _ColorMask: 15
- _Stencil: 0
- _StencilComp: 8
- _StencilOp: 0
- _StencilReadMask: 255
- _StencilWriteMask: 255
- _UseUIAlphaClip: 0
m_Colors:
- _halfSize: {r: 35.4485, g: 38.0555, b: 0, a: 0}
- _r: {r: 40, g: 0, b: 0, a: 40}
- _rect2props: {r: 20.000002, g: -0.0000038146973, b: 37.833046, a: 37.833046}
m_BuildTextureStacks: []
--- !u!21 &824310134 --- !u!21 &824310134
Material: Material:
serializedVersion: 8 serializedVersion: 8
@ -418,6 +613,135 @@ Material:
- _r: {r: 5, g: 5, b: 0, a: 0} - _r: {r: 5, g: 5, b: 0, a: 0}
- _rect2props: {r: 0, g: -2.500002, b: 10.995511, a: 10.995511} - _rect2props: {r: 0, g: -2.500002, b: 10.995511, a: 10.995511}
m_BuildTextureStacks: [] m_BuildTextureStacks: []
--- !u!1 &901079067
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 901079068}
m_Layer: 0
m_Name: Waypoint
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &901079068
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 901079067}
serializedVersion: 2
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 6.45}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 1278148243}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &903034628 stripped
GameObject:
m_CorrespondingSourceObject: {fileID: 167310329963132665, guid: 9d875dda41d470948bbe6fd408a7e835,
type: 3}
m_PrefabInstance: {fileID: 2331233393358520666}
m_PrefabAsset: {fileID: 0}
--- !u!114 &903034631
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 903034628}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 7355133f21643b44e8b997303686916c, type: 3}
m_Name:
m_EditorClassIdentifier:
WaypointRadiusTolerence: 0.01
Waypoints:
- {fileID: 901079068}
- {fileID: 240436526}
- {fileID: 1932867447}
- {fileID: 923150806}
DebugPrefab: {fileID: 919132149155446097, guid: 18a302e9a279644c19653ac58e191809,
type: 3}
--- !u!1 &923150805
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 923150806}
m_Layer: 0
m_Name: Waypoint (3)
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &923150806
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 923150805}
serializedVersion: 2
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 1.11, y: 1.82, z: 4.63}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 1278148243}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!21 &1009945405
Material:
serializedVersion: 8
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: UI/RoundedCorners/IndependentRoundedCorners
m_Shader: {fileID: 4800000, guid: d3beb88e61f88ca4393acdefb005fa70, type: 3}
m_Parent: {fileID: 0}
m_ModifiedSerializedProperties: 0
m_ValidKeywords: []
m_InvalidKeywords: []
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap: {}
disabledShaderPasses: []
m_LockedProperties:
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _MainTex:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Ints: []
m_Floats:
- _ColorMask: 15
- _Stencil: 0
- _StencilComp: 8
- _StencilOp: 0
- _StencilReadMask: 255
- _StencilWriteMask: 255
- _UseUIAlphaClip: 0
m_Colors:
- _halfSize: {r: 360, g: 550, b: 0, a: 0}
- _r: {r: 0, g: 59.4, b: 59.4, a: 59.4}
- _rect2props: {r: -14.850006, g: 14.849915, b: 622.4661, a: 601.4651}
m_BuildTextureStacks: []
--- !u!1001 &1039229583 --- !u!1001 &1039229583
PrefabInstance: PrefabInstance:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@ -431,6 +755,26 @@ PrefabInstance:
propertyPath: m_Name propertyPath: m_Name
value: GameUI value: GameUI
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 774744338376071623, guid: 0a81f2c7ca749af478944c043ef306dc,
type: 3}
propertyPath: m_AnchorMax.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 774744338376071623, guid: 0a81f2c7ca749af478944c043ef306dc,
type: 3}
propertyPath: m_AnchorMin.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 774744338376071623, guid: 0a81f2c7ca749af478944c043ef306dc,
type: 3}
propertyPath: m_AnchoredPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 774744338376071623, guid: 0a81f2c7ca749af478944c043ef306dc,
type: 3}
propertyPath: m_AnchoredPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2757975024506450034, guid: 0a81f2c7ca749af478944c043ef306dc, - target: {fileID: 2757975024506450034, guid: 0a81f2c7ca749af478944c043ef306dc,
type: 3} type: 3}
propertyPath: m_Material propertyPath: m_Material
@ -546,6 +890,26 @@ PrefabInstance:
propertyPath: m_Material propertyPath: m_Material
value: value:
objectReference: {fileID: 1721603329} objectReference: {fileID: 1721603329}
- target: {fileID: 3735913226073384232, guid: 0a81f2c7ca749af478944c043ef306dc,
type: 3}
propertyPath: m_AnchorMax.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3735913226073384232, guid: 0a81f2c7ca749af478944c043ef306dc,
type: 3}
propertyPath: m_AnchorMin.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3735913226073384232, guid: 0a81f2c7ca749af478944c043ef306dc,
type: 3}
propertyPath: m_AnchoredPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3735913226073384232, guid: 0a81f2c7ca749af478944c043ef306dc,
type: 3}
propertyPath: m_AnchoredPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3990110949884708462, guid: 0a81f2c7ca749af478944c043ef306dc, - target: {fileID: 3990110949884708462, guid: 0a81f2c7ca749af478944c043ef306dc,
type: 3} type: 3}
propertyPath: m_Material propertyPath: m_Material
@ -556,11 +920,71 @@ PrefabInstance:
propertyPath: m_Material propertyPath: m_Material
value: value:
objectReference: {fileID: 824310134} objectReference: {fileID: 824310134}
- target: {fileID: 4848966849677167603, guid: 0a81f2c7ca749af478944c043ef306dc,
type: 3}
propertyPath: m_AnchorMax.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4848966849677167603, guid: 0a81f2c7ca749af478944c043ef306dc,
type: 3}
propertyPath: m_AnchorMin.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4848966849677167603, guid: 0a81f2c7ca749af478944c043ef306dc,
type: 3}
propertyPath: m_AnchoredPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4848966849677167603, guid: 0a81f2c7ca749af478944c043ef306dc,
type: 3}
propertyPath: m_AnchoredPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4992629952180980787, guid: 0a81f2c7ca749af478944c043ef306dc, - target: {fileID: 4992629952180980787, guid: 0a81f2c7ca749af478944c043ef306dc,
type: 3} type: 3}
propertyPath: m_Material propertyPath: m_Material
value: value:
objectReference: {fileID: 1407489464} objectReference: {fileID: 1407489464}
- target: {fileID: 7402271907180742918, guid: 0a81f2c7ca749af478944c043ef306dc,
type: 3}
propertyPath: m_AnchorMax.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 7402271907180742918, guid: 0a81f2c7ca749af478944c043ef306dc,
type: 3}
propertyPath: m_AnchorMin.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 7402271907180742918, guid: 0a81f2c7ca749af478944c043ef306dc,
type: 3}
propertyPath: m_AnchoredPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 7402271907180742918, guid: 0a81f2c7ca749af478944c043ef306dc,
type: 3}
propertyPath: m_AnchoredPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 7535063074468933406, guid: 0a81f2c7ca749af478944c043ef306dc,
type: 3}
propertyPath: m_AnchorMax.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 7535063074468933406, guid: 0a81f2c7ca749af478944c043ef306dc,
type: 3}
propertyPath: m_AnchorMin.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 7535063074468933406, guid: 0a81f2c7ca749af478944c043ef306dc,
type: 3}
propertyPath: m_AnchoredPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 7535063074468933406, guid: 0a81f2c7ca749af478944c043ef306dc,
type: 3}
propertyPath: m_AnchoredPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8443057073470027503, guid: 0a81f2c7ca749af478944c043ef306dc, - target: {fileID: 8443057073470027503, guid: 0a81f2c7ca749af478944c043ef306dc,
type: 3} type: 3}
propertyPath: m_Material propertyPath: m_Material
@ -576,6 +1000,41 @@ PrefabInstance:
m_AddedGameObjects: [] m_AddedGameObjects: []
m_AddedComponents: [] m_AddedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 0a81f2c7ca749af478944c043ef306dc, type: 3} m_SourcePrefab: {fileID: 100100000, guid: 0a81f2c7ca749af478944c043ef306dc, type: 3}
--- !u!1 &1278148242
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1278148243}
m_Layer: 0
m_Name: Waypoints
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &1278148243
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1278148242}
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: 901079068}
- {fileID: 240436526}
- {fileID: 1932867447}
- {fileID: 923150806}
m_Father: {fileID: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!4 &1287631730 stripped --- !u!4 &1287631730 stripped
Transform: Transform:
m_CorrespondingSourceObject: {fileID: 2739991145043243501, guid: 0c13e24f92c86f84a85c76e0bca22830, m_CorrespondingSourceObject: {fileID: 2739991145043243501, guid: 0c13e24f92c86f84a85c76e0bca22830,
@ -1023,6 +1482,160 @@ Material:
- _r: {r: 0, g: 0, b: 0, a: 40} - _r: {r: 0, g: 0, b: 0, a: 40}
- _rect2props: {r: 10.0000305, g: 9.999878, b: 618.79944, a: 604.6573} - _rect2props: {r: 10.0000305, g: 9.999878, b: 618.79944, a: 604.6573}
m_BuildTextureStacks: [] m_BuildTextureStacks: []
--- !u!21 &1836645083
Material:
serializedVersion: 8
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: UI/RoundedCorners/IndependentRoundedCorners
m_Shader: {fileID: 4800000, guid: d3beb88e61f88ca4393acdefb005fa70, type: 3}
m_Parent: {fileID: 0}
m_ModifiedSerializedProperties: 0
m_ValidKeywords: []
m_InvalidKeywords: []
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap: {}
disabledShaderPasses: []
m_LockedProperties:
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _MainTex:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Ints: []
m_Floats:
- _ColorMask: 15
- _Stencil: 0
- _StencilComp: 8
- _StencilOp: 0
- _StencilReadMask: 255
- _StencilWriteMask: 255
- _UseUIAlphaClip: 0
m_Colors:
- _halfSize: {r: 5, g: 13.05, b: 0, a: 0}
- _r: {r: 5, g: 5, b: 0, a: 0}
- _rect2props: {r: 0, g: -2.500002, b: 10.995511, a: 10.995511}
m_BuildTextureStacks: []
--- !u!1 &1932867446
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1932867447}
m_Layer: 0
m_Name: Waypoint (2)
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &1932867447
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1932867446}
serializedVersion: 2
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 1.82, z: 4.63}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 1278148243}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!21 &1962086325
Material:
serializedVersion: 8
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: UI/RoundedCorners/IndependentRoundedCorners
m_Shader: {fileID: 4800000, guid: d3beb88e61f88ca4393acdefb005fa70, type: 3}
m_Parent: {fileID: 0}
m_ModifiedSerializedProperties: 0
m_ValidKeywords: []
m_InvalidKeywords: []
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap: {}
disabledShaderPasses: []
m_LockedProperties:
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _MainTex:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Ints: []
m_Floats:
- _ColorMask: 15
- _Stencil: 0
- _StencilComp: 8
- _StencilOp: 0
- _StencilReadMask: 255
- _StencilWriteMask: 255
- _UseUIAlphaClip: 0
m_Colors:
- _halfSize: {r: 340.1145, g: 535, b: 0, a: 0}
- _r: {r: 0, g: 0, b: 0, a: 40}
- _rect2props: {r: 10.0000305, g: 9.999878, b: 618.79944, a: 604.6573}
m_BuildTextureStacks: []
--- !u!21 &1977259215
Material:
serializedVersion: 8
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: UI/RoundedCorners/IndependentRoundedCorners
m_Shader: {fileID: 4800000, guid: d3beb88e61f88ca4393acdefb005fa70, type: 3}
m_Parent: {fileID: 0}
m_ModifiedSerializedProperties: 0
m_ValidKeywords: []
m_InvalidKeywords: []
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap: {}
disabledShaderPasses: []
m_LockedProperties:
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _MainTex:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Ints: []
m_Floats:
- _ColorMask: 15
- _Stencil: 0
- _StencilComp: 8
- _StencilOp: 0
- _StencilReadMask: 255
- _StencilWriteMask: 255
- _UseUIAlphaClip: 0
m_Colors:
- _halfSize: {r: 5, g: 13.05, b: 0, a: 0}
- _r: {r: 0, g: 0, b: 5, a: 5}
- _rect2props: {r: 0.00000047683716, g: 2.4999986, b: 10.995511, a: 10.995511}
m_BuildTextureStacks: []
--- !u!1001 &2331233393358520666 --- !u!1001 &2331233393358520666
PrefabInstance: PrefabInstance:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@ -1089,7 +1702,11 @@ PrefabInstance:
m_RemovedComponents: [] m_RemovedComponents: []
m_RemovedGameObjects: [] m_RemovedGameObjects: []
m_AddedGameObjects: [] m_AddedGameObjects: []
m_AddedComponents: [] m_AddedComponents:
- targetCorrespondingSourceObject: {fileID: 167310329963132665, guid: 9d875dda41d470948bbe6fd408a7e835,
type: 3}
insertIndex: -1
addedObject: {fileID: 903034631}
m_SourcePrefab: {fileID: 100100000, guid: 9d875dda41d470948bbe6fd408a7e835, type: 3} m_SourcePrefab: {fileID: 100100000, guid: 9d875dda41d470948bbe6fd408a7e835, type: 3}
--- !u!1001 &8480757413362724446 --- !u!1001 &8480757413362724446
PrefabInstance: PrefabInstance:
@ -1178,3 +1795,4 @@ SceneRoots:
- {fileID: 510617950} - {fileID: 510617950}
- {fileID: 444480} - {fileID: 444480}
- {fileID: 1039229583} - {fileID: 1039229583}
- {fileID: 1278148243}

View File

@ -7,7 +7,7 @@ using UnityEngine.Assertions;
public class MoneyManager : MonoBehaviour public class MoneyManager : MonoBehaviour
{ {
public TowerCollection towerCollection; public EnemyCollection towerCollection;
[Space(10)] [Space(10)]
public GameObject[] ShopButtons; public GameObject[] ShopButtons;
public TMP_Text[] MoneyTexts; public TMP_Text[] MoneyTexts;

View File

@ -0,0 +1,88 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using System.Linq;
using System;
public class WaypointSystemManager : MonoBehaviour
{
public static WaypointSystemManager Instance;
[SerializeField] private float WaypointRadiusTolerence = 0.01f;
[SerializeField] private List<Transform> Waypoints;
[SerializeField] public List<WaypointEntityData> activeEntities = new();
public GameObject DebugPrefab;
private void OnEnable()
{
if (Instance != null)
Destroy(Instance);
Instance = this;
}
private void Start()
{
var data = new WaypointEntityData();
data.Entity = Instantiate(DebugPrefab).transform;
data.MoveSpeed = 1;
AddObjectToPath(data);
}
private void Update()
{
for (int i = 0; i < activeEntities.Count; i++)
{
var data = activeEntities[i];
// Check if entity still exists
if (data.Entity == null)
{
activeEntities.RemoveAt(i);
continue;
}
// Set target if no target
if (data.NextTargetPosition == null)
data.NextTargetPosition = Waypoints[0];
// Changes target if within tolerence
if (Vector3.Distance(data.Entity.position, data.NextTargetPosition.position) < WaypointRadiusTolerence)
{
int index = Waypoints.IndexOf(data.NextTargetPosition);
if (index + 1 >= Waypoints.Count)
{
Destroy(data.Entity.gameObject); // Destroy object when finish waypoints
}
else
{
data.NextTargetPosition = Waypoints[index + 1];
}
}
// Move object by speed
Vector3 targetDirection = data.NextTargetPosition.position - data.Entity.position;
Vector3 normTargetDir = targetDirection.normalized;
float dist = Vector3.Distance(data.Entity.position, data.NextTargetPosition.position);
float minDist = Math.Min(dist, data.MoveSpeed * Time.deltaTime);
data.Entity.position += normTargetDir * minDist;
}
}
public void AddObjectToPath(WaypointEntityData data)
{
activeEntities.Add(data);
}
}
public class WaypointEntityData
{
public Transform Entity;
public Transform NextTargetPosition;
public float MoveSpeed;
}

View File

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