6 files renamed
4 files copied
6 files deleted
17 files modified
| | |
| | | m_Scale: {x: 1, y: 1} |
| | | m_Offset: {x: 0, y: 0} |
| | | - _MainTex: |
| | | m_Texture: {fileID: 2800000, guid: 93f40a01d57fbff418fc0b54b6ab7d9f, type: 3} |
| | | m_Texture: {fileID: 2800000, guid: 8c9a3d26120e78f40aa4ef9ed23d573c, type: 3} |
| | | m_Scale: {x: 1, y: 1} |
| | | m_Offset: {x: 0, y: 0} |
| | | - _MetallicGlossMap: |
| | |
| | | m_Script: {fileID: 11500000, guid: 2952db25fdd244f4a9981e4350b798e2, type: 3} |
| | | m_Name: |
| | | m_EditorClassIdentifier: |
| | | time: 3 |
| | | time: 1.2 |
| | | death: |
| | | m_PersistentCalls: |
| | | m_Calls: [] |
| | |
| | | ringBufferLoopRange: {x: 0, y: 1} |
| | | looping: 0 |
| | | prewarm: 0 |
| | | playOnAwake: 1 |
| | | playOnAwake: 0 |
| | | useUnscaledTime: 0 |
| | | autoRandomSeed: 0 |
| | | useRigidbodyForVelocity: 1 |
| | |
| | | ringBufferLoopRange: {x: 0, y: 1} |
| | | looping: 0 |
| | | prewarm: 0 |
| | | playOnAwake: 1 |
| | | playOnAwake: 0 |
| | | useUnscaledTime: 0 |
| | | autoRandomSeed: 0 |
| | | useRigidbodyForVelocity: 1 |
| | |
| | | ringBufferLoopRange: {x: 0, y: 1} |
| | | looping: 0 |
| | | prewarm: 0 |
| | | playOnAwake: 1 |
| | | playOnAwake: 0 |
| | | useUnscaledTime: 0 |
| | | autoRandomSeed: 0 |
| | | useRigidbodyForVelocity: 1 |
| | |
| | | ringBufferLoopRange: {x: 0, y: 1} |
| | | looping: 0 |
| | | prewarm: 0 |
| | | playOnAwake: 1 |
| | | playOnAwake: 0 |
| | | useUnscaledTime: 0 |
| | | autoRandomSeed: 0 |
| | | useRigidbodyForVelocity: 1 |
| | |
| | | ringBufferLoopRange: {x: 0, y: 1} |
| | | looping: 0 |
| | | prewarm: 0 |
| | | playOnAwake: 1 |
| | | playOnAwake: 0 |
| | | useUnscaledTime: 0 |
| | | autoRandomSeed: 1 |
| | | useRigidbodyForVelocity: 1 |
| | |
| | | ringBufferLoopRange: {x: 0, y: 1} |
| | | looping: 0 |
| | | prewarm: 0 |
| | | playOnAwake: 1 |
| | | playOnAwake: 0 |
| | | useUnscaledTime: 0 |
| | | autoRandomSeed: 1 |
| | | useRigidbodyForVelocity: 1 |
| | |
| | | ringBufferLoopRange: {x: 0, y: 1} |
| | | looping: 0 |
| | | prewarm: 0 |
| | | playOnAwake: 1 |
| | | playOnAwake: 0 |
| | | useUnscaledTime: 0 |
| | | autoRandomSeed: 1 |
| | | useRigidbodyForVelocity: 1 |
| | |
| | | ringBufferLoopRange: {x: 0, y: 1} |
| | | looping: 0 |
| | | prewarm: 0 |
| | | playOnAwake: 1 |
| | | playOnAwake: 0 |
| | | useUnscaledTime: 0 |
| | | autoRandomSeed: 1 |
| | | useRigidbodyForVelocity: 1 |
| | |
| | | %YAML 1.1 |
| | | %TAG !u! tag:unity3d.com,2011: |
| | | --- !u!1 &1241004575684402 |
| | | GameObject: |
| | | m_ObjectHideFlags: 0 |
| | | m_CorrespondingSourceObject: {fileID: 0} |
| | | m_PrefabInstance: {fileID: 0} |
| | | m_PrefabAsset: {fileID: 0} |
| | | serializedVersion: 6 |
| | | m_Component: |
| | | - component: {fileID: 4491171297730104} |
| | | m_Layer: 0 |
| | | m_Name: GreenAnchor |
| | | m_TagString: Untagged |
| | | m_Icon: {fileID: 0} |
| | | m_NavMeshLayer: 0 |
| | | m_StaticEditorFlags: 0 |
| | | m_IsActive: 1 |
| | | --- !u!4 &4491171297730104 |
| | | Transform: |
| | | m_ObjectHideFlags: 0 |
| | | m_CorrespondingSourceObject: {fileID: 0} |
| | | m_PrefabInstance: {fileID: 0} |
| | | m_PrefabAsset: {fileID: 0} |
| | | m_GameObject: {fileID: 1241004575684402} |
| | | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} |
| | | m_LocalPosition: {x: 0.5, y: 0, z: 0} |
| | | m_LocalScale: {x: 1, y: 1, z: 1} |
| | | m_Children: |
| | | - {fileID: 4607948758076226} |
| | | m_Father: {fileID: 4169980140215914} |
| | | m_RootOrder: 0 |
| | | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} |
| | | --- !u!1 &1304972810206532 |
| | | GameObject: |
| | | m_ObjectHideFlags: 0 |
| | |
| | | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} |
| | | m_LocalPosition: {x: 0, y: 0, z: 0} |
| | | m_LocalScale: {x: 5, y: 5, z: 5} |
| | | m_Children: |
| | | - {fileID: 4033886752365058} |
| | | m_Children: [] |
| | | m_Father: {fileID: 0} |
| | | m_RootOrder: 0 |
| | | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} |
| | |
| | | deathParticleSystemPrefab: {fileID: 198059975614214484, guid: 7a0476686964e41ac8320b7cf37868c2, |
| | | type: 3} |
| | | deathEffectOffset: {x: 0, y: 0, z: 0} |
| | | --- !u!1 &1584327446698034 |
| | | GameObject: |
| | | m_ObjectHideFlags: 0 |
| | | m_CorrespondingSourceObject: {fileID: 0} |
| | | m_PrefabInstance: {fileID: 0} |
| | | m_PrefabAsset: {fileID: 0} |
| | | serializedVersion: 6 |
| | | m_Component: |
| | | - component: {fileID: 4169980140215914} |
| | | m_Layer: 0 |
| | | m_Name: Bar |
| | | m_TagString: Untagged |
| | | m_Icon: {fileID: 0} |
| | | m_NavMeshLayer: 0 |
| | | m_StaticEditorFlags: 0 |
| | | m_IsActive: 1 |
| | | --- !u!4 &4169980140215914 |
| | | Transform: |
| | | m_ObjectHideFlags: 0 |
| | | m_CorrespondingSourceObject: {fileID: 0} |
| | | m_PrefabInstance: {fileID: 0} |
| | | m_PrefabAsset: {fileID: 0} |
| | | m_GameObject: {fileID: 1584327446698034} |
| | | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} |
| | | m_LocalPosition: {x: 0, y: 0, z: 0} |
| | | m_LocalScale: {x: 1.4, y: 0.18134856, z: 1} |
| | | m_Children: |
| | | - {fileID: 4491171297730104} |
| | | - {fileID: 4099818628537976} |
| | | m_Father: {fileID: 4033886752365058} |
| | | m_RootOrder: 0 |
| | | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} |
| | | --- !u!1 &1663573000831476 |
| | | GameObject: |
| | | m_ObjectHideFlags: 0 |
| | | m_CorrespondingSourceObject: {fileID: 0} |
| | | m_PrefabInstance: {fileID: 0} |
| | | m_PrefabAsset: {fileID: 0} |
| | | serializedVersion: 6 |
| | | m_Component: |
| | | - component: {fileID: 4087321752853002} |
| | | - component: {fileID: 23541405159921826} |
| | | - component: {fileID: 33521311580114450} |
| | | m_Layer: 0 |
| | | m_Name: Red |
| | | m_TagString: Untagged |
| | | m_Icon: {fileID: 0} |
| | | m_NavMeshLayer: 0 |
| | | m_StaticEditorFlags: 0 |
| | | m_IsActive: 1 |
| | | --- !u!4 &4087321752853002 |
| | | Transform: |
| | | m_ObjectHideFlags: 0 |
| | | m_CorrespondingSourceObject: {fileID: 0} |
| | | m_PrefabInstance: {fileID: 0} |
| | | m_PrefabAsset: {fileID: 0} |
| | | m_GameObject: {fileID: 1663573000831476} |
| | | m_LocalRotation: {x: -0.000000020360515, y: 1, z: 0.00000020861623, w: 0.00000030477918} |
| | | m_LocalPosition: {x: 0.5, y: 0, z: 0} |
| | | m_LocalScale: {x: 1, y: 1, z: 1} |
| | | m_Children: [] |
| | | m_Father: {fileID: 4099818628537976} |
| | | m_RootOrder: 0 |
| | | m_LocalEulerAnglesHint: {x: 0, y: 180.00002, z: 0} |
| | | --- !u!23 &23541405159921826 |
| | | MeshRenderer: |
| | | m_ObjectHideFlags: 0 |
| | | m_CorrespondingSourceObject: {fileID: 0} |
| | | m_PrefabInstance: {fileID: 0} |
| | | m_PrefabAsset: {fileID: 0} |
| | | m_GameObject: {fileID: 1663573000831476} |
| | | m_Enabled: 1 |
| | | m_CastShadows: 1 |
| | | m_ReceiveShadows: 1 |
| | | m_DynamicOccludee: 1 |
| | | m_MotionVectors: 1 |
| | | m_LightProbeUsage: 1 |
| | | m_ReflectionProbeUsage: 1 |
| | | m_RayTracingMode: 2 |
| | | m_RayTraceProcedural: 0 |
| | | m_RenderingLayerMask: 1 |
| | | m_RendererPriority: 0 |
| | | m_Materials: |
| | | - {fileID: 2100000, guid: 008790df986e3469285ea0c078de4b7f, type: 2} |
| | | m_StaticBatchInfo: |
| | | firstSubMesh: 0 |
| | | subMeshCount: 0 |
| | | m_StaticBatchRoot: {fileID: 0} |
| | | m_ProbeAnchor: {fileID: 0} |
| | | m_LightProbeVolumeOverride: {fileID: 0} |
| | | m_ScaleInLightmap: 1 |
| | | m_ReceiveGI: 1 |
| | | m_PreserveUVs: 0 |
| | | m_IgnoreNormalsForChartDetection: 0 |
| | | m_ImportantGI: 0 |
| | | m_StitchLightmapSeams: 0 |
| | | m_SelectedEditorRenderState: 3 |
| | | m_MinimumChartSize: 4 |
| | | m_AutoUVMaxDistance: 0.5 |
| | | m_AutoUVMaxAngle: 89 |
| | | m_LightmapParameters: {fileID: 0} |
| | | m_SortingLayerID: 0 |
| | | m_SortingLayer: 0 |
| | | m_SortingOrder: 0 |
| | | m_AdditionalVertexStreams: {fileID: 0} |
| | | --- !u!33 &33521311580114450 |
| | | MeshFilter: |
| | | m_ObjectHideFlags: 0 |
| | | m_CorrespondingSourceObject: {fileID: 0} |
| | | m_PrefabInstance: {fileID: 0} |
| | | m_PrefabAsset: {fileID: 0} |
| | | m_GameObject: {fileID: 1663573000831476} |
| | | m_Mesh: {fileID: 10210, guid: 0000000000000000e000000000000000, type: 0} |
| | | --- !u!1 &1699053510457970 |
| | | GameObject: |
| | | m_ObjectHideFlags: 0 |
| | | m_CorrespondingSourceObject: {fileID: 0} |
| | | m_PrefabInstance: {fileID: 0} |
| | | m_PrefabAsset: {fileID: 0} |
| | | serializedVersion: 6 |
| | | m_Component: |
| | | - component: {fileID: 4607948758076226} |
| | | - component: {fileID: 23820400616506566} |
| | | - component: {fileID: 33350661775210590} |
| | | m_Layer: 0 |
| | | m_Name: Green |
| | | m_TagString: Untagged |
| | | m_Icon: {fileID: 0} |
| | | m_NavMeshLayer: 0 |
| | | m_StaticEditorFlags: 0 |
| | | m_IsActive: 1 |
| | | --- !u!4 &4607948758076226 |
| | | Transform: |
| | | m_ObjectHideFlags: 0 |
| | | m_CorrespondingSourceObject: {fileID: 0} |
| | | m_PrefabInstance: {fileID: 0} |
| | | m_PrefabAsset: {fileID: 0} |
| | | m_GameObject: {fileID: 1699053510457970} |
| | | m_LocalRotation: {x: -0.000000020360515, y: 1, z: 0.00000020861623, w: 0.00000030477918} |
| | | m_LocalPosition: {x: -0.5, y: 0, z: 0} |
| | | m_LocalScale: {x: 1, y: 1, z: 1} |
| | | m_Children: [] |
| | | m_Father: {fileID: 4491171297730104} |
| | | m_RootOrder: 0 |
| | | m_LocalEulerAnglesHint: {x: 0, y: 180.00002, z: 0} |
| | | --- !u!23 &23820400616506566 |
| | | MeshRenderer: |
| | | m_ObjectHideFlags: 0 |
| | | m_CorrespondingSourceObject: {fileID: 0} |
| | | m_PrefabInstance: {fileID: 0} |
| | | m_PrefabAsset: {fileID: 0} |
| | | m_GameObject: {fileID: 1699053510457970} |
| | | m_Enabled: 1 |
| | | m_CastShadows: 1 |
| | | m_ReceiveShadows: 1 |
| | | m_DynamicOccludee: 1 |
| | | m_MotionVectors: 1 |
| | | m_LightProbeUsage: 1 |
| | | m_ReflectionProbeUsage: 1 |
| | | m_RayTracingMode: 2 |
| | | m_RayTraceProcedural: 0 |
| | | m_RenderingLayerMask: 1 |
| | | m_RendererPriority: 0 |
| | | m_Materials: |
| | | - {fileID: 2100000, guid: 1bfcbc6372f4d45f19690ea277e1019f, type: 2} |
| | | m_StaticBatchInfo: |
| | | firstSubMesh: 0 |
| | | subMeshCount: 0 |
| | | m_StaticBatchRoot: {fileID: 0} |
| | | m_ProbeAnchor: {fileID: 0} |
| | | m_LightProbeVolumeOverride: {fileID: 0} |
| | | m_ScaleInLightmap: 1 |
| | | m_ReceiveGI: 1 |
| | | m_PreserveUVs: 0 |
| | | m_IgnoreNormalsForChartDetection: 0 |
| | | m_ImportantGI: 0 |
| | | m_StitchLightmapSeams: 0 |
| | | m_SelectedEditorRenderState: 3 |
| | | m_MinimumChartSize: 4 |
| | | m_AutoUVMaxDistance: 0.5 |
| | | m_AutoUVMaxAngle: 89 |
| | | m_LightmapParameters: {fileID: 0} |
| | | m_SortingLayerID: 0 |
| | | m_SortingLayer: 0 |
| | | m_SortingOrder: 0 |
| | | m_AdditionalVertexStreams: {fileID: 0} |
| | | --- !u!33 &33350661775210590 |
| | | MeshFilter: |
| | | m_ObjectHideFlags: 0 |
| | | m_CorrespondingSourceObject: {fileID: 0} |
| | | m_PrefabInstance: {fileID: 0} |
| | | m_PrefabAsset: {fileID: 0} |
| | | m_GameObject: {fileID: 1699053510457970} |
| | | m_Mesh: {fileID: 10210, guid: 0000000000000000e000000000000000, type: 0} |
| | | --- !u!1 &1769573041013492 |
| | | GameObject: |
| | | m_ObjectHideFlags: 0 |
| | | m_CorrespondingSourceObject: {fileID: 0} |
| | | m_PrefabInstance: {fileID: 0} |
| | | m_PrefabAsset: {fileID: 0} |
| | | serializedVersion: 6 |
| | | m_Component: |
| | | - component: {fileID: 4099818628537976} |
| | | m_Layer: 0 |
| | | m_Name: RedAnchor |
| | | m_TagString: Untagged |
| | | m_Icon: {fileID: 0} |
| | | m_NavMeshLayer: 0 |
| | | m_StaticEditorFlags: 0 |
| | | m_IsActive: 1 |
| | | --- !u!4 &4099818628537976 |
| | | Transform: |
| | | m_ObjectHideFlags: 0 |
| | | m_CorrespondingSourceObject: {fileID: 0} |
| | | m_PrefabInstance: {fileID: 0} |
| | | m_PrefabAsset: {fileID: 0} |
| | | m_GameObject: {fileID: 1769573041013492} |
| | | m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} |
| | | m_LocalPosition: {x: -0.5, y: 0, z: 0} |
| | | m_LocalScale: {x: 1, y: 1, z: 1} |
| | | m_Children: |
| | | - {fileID: 4087321752853002} |
| | | m_Father: {fileID: 4169980140215914} |
| | | m_RootOrder: 1 |
| | | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} |
| | | --- !u!1 &1787721136844666 |
| | | GameObject: |
| | | m_ObjectHideFlags: 0 |
| | | m_CorrespondingSourceObject: {fileID: 0} |
| | | m_PrefabInstance: {fileID: 0} |
| | | m_PrefabAsset: {fileID: 0} |
| | | serializedVersion: 6 |
| | | m_Component: |
| | | - component: {fileID: 4033886752365058} |
| | | - component: {fileID: 114315104238988312} |
| | | m_Layer: 0 |
| | | m_Name: HealthBar |
| | | m_TagString: Untagged |
| | | m_Icon: {fileID: 0} |
| | | m_NavMeshLayer: 0 |
| | | m_StaticEditorFlags: 0 |
| | | m_IsActive: 1 |
| | | --- !u!4 &4033886752365058 |
| | | Transform: |
| | | m_ObjectHideFlags: 0 |
| | | m_CorrespondingSourceObject: {fileID: 0} |
| | | m_PrefabInstance: {fileID: 0} |
| | | m_PrefabAsset: {fileID: 0} |
| | | m_GameObject: {fileID: 1787721136844666} |
| | | m_LocalRotation: {x: 0.7071068, y: 0, z: 0, w: 0.7071068} |
| | | m_LocalPosition: {x: 0, y: 3, z: 0} |
| | | m_LocalScale: {x: 1, y: 1, z: 1} |
| | | m_Children: |
| | | - {fileID: 4169980140215914} |
| | | m_Father: {fileID: 4054417465033028} |
| | | m_RootOrder: 0 |
| | | m_LocalEulerAnglesHint: {x: 90, y: 0, z: 0} |
| | | --- !u!114 &114315104238988312 |
| | | MonoBehaviour: |
| | | m_ObjectHideFlags: 0 |
| | | m_CorrespondingSourceObject: {fileID: 0} |
| | | m_PrefabInstance: {fileID: 0} |
| | | m_PrefabAsset: {fileID: 0} |
| | | m_GameObject: {fileID: 1787721136844666} |
| | | m_Enabled: 1 |
| | | m_EditorHideFlags: 0 |
| | | m_Script: {fileID: 11500000, guid: 5440fde571ec4db4a719f37df8e972f0, type: 3} |
| | | m_Name: |
| | | m_EditorClassIdentifier: |
| | | damageableBehaviour: {fileID: 114126723238285906} |
| | | healthBar: {fileID: 4491171297730104} |
| | | backgroundBar: {fileID: 4099818628537976} |
| | | textMesh: {fileID: 0} |
| | | levelQuad: {fileID: 0} |
| | | levelMaterial: [] |
| | | showWhenFull: 0 |
| | |
| | | type: 3} |
| | | UpgradeEffectPrefab: {fileID: 6847503030253729540, guid: f8ec855cfd7e13a4ebb2f2cbb8bbc480, |
| | | type: 3} |
| | | levelDamager: {fileID: 114588164740221456, guid: 9c5d242fe193d0241b17db92e61ab930, |
| | | type: 3} |
| | | levelData: {fileID: 11400000, guid: 67687baaef809441e8b698087793fe51, type: 2} |
| | | Body: {fileID: 438341193421044329} |
| | | AttackBody: {fileID: 6259461163498204177} |
| | |
| | | %YAML 1.1 |
| | | %TAG !u! tag:unity3d.com,2011: |
| | | --- !u!1 &1241004575684402 |
| | | GameObject: |
| | | m_ObjectHideFlags: 0 |
| | | m_CorrespondingSourceObject: {fileID: 0} |
| | | m_PrefabInstance: {fileID: 0} |
| | | m_PrefabAsset: {fileID: 0} |
| | | serializedVersion: 6 |
| | | m_Component: |
| | | - component: {fileID: 4491171297730104} |
| | | m_Layer: 0 |
| | | m_Name: GreenAnchor |
| | | m_TagString: Untagged |
| | | m_Icon: {fileID: 0} |
| | | m_NavMeshLayer: 0 |
| | | m_StaticEditorFlags: 0 |
| | | m_IsActive: 1 |
| | | --- !u!4 &4491171297730104 |
| | | Transform: |
| | | m_ObjectHideFlags: 0 |
| | | m_CorrespondingSourceObject: {fileID: 0} |
| | | m_PrefabInstance: {fileID: 0} |
| | | m_PrefabAsset: {fileID: 0} |
| | | m_GameObject: {fileID: 1241004575684402} |
| | | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} |
| | | m_LocalPosition: {x: 0.5, y: 0, z: 0} |
| | | m_LocalScale: {x: 1, y: 1, z: 1} |
| | | m_Children: |
| | | - {fileID: 4607948758076226} |
| | | m_Father: {fileID: 4169980140215914} |
| | | m_RootOrder: 0 |
| | | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} |
| | | --- !u!1 &1304972810206532 |
| | | GameObject: |
| | | m_ObjectHideFlags: 0 |
| | |
| | | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} |
| | | m_LocalPosition: {x: 0, y: 0, z: 0} |
| | | m_LocalScale: {x: 6, y: 6, z: 6} |
| | | m_Children: |
| | | - {fileID: 4033886752365058} |
| | | m_Children: [] |
| | | m_Father: {fileID: 0} |
| | | m_RootOrder: 0 |
| | | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} |
| | |
| | | deathParticleSystemPrefab: {fileID: 198059975614214484, guid: 7a0476686964e41ac8320b7cf37868c2, |
| | | type: 3} |
| | | deathEffectOffset: {x: 0, y: 0, z: 0} |
| | | --- !u!1 &1584327446698034 |
| | | GameObject: |
| | | m_ObjectHideFlags: 0 |
| | | m_CorrespondingSourceObject: {fileID: 0} |
| | | m_PrefabInstance: {fileID: 0} |
| | | m_PrefabAsset: {fileID: 0} |
| | | serializedVersion: 6 |
| | | m_Component: |
| | | - component: {fileID: 4169980140215914} |
| | | m_Layer: 0 |
| | | m_Name: Bar |
| | | m_TagString: Untagged |
| | | m_Icon: {fileID: 0} |
| | | m_NavMeshLayer: 0 |
| | | m_StaticEditorFlags: 0 |
| | | m_IsActive: 1 |
| | | --- !u!4 &4169980140215914 |
| | | Transform: |
| | | m_ObjectHideFlags: 0 |
| | | m_CorrespondingSourceObject: {fileID: 0} |
| | | m_PrefabInstance: {fileID: 0} |
| | | m_PrefabAsset: {fileID: 0} |
| | | m_GameObject: {fileID: 1584327446698034} |
| | | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} |
| | | m_LocalPosition: {x: 0, y: 0, z: 0} |
| | | m_LocalScale: {x: 1.4, y: 0.18134856, z: 1} |
| | | m_Children: |
| | | - {fileID: 4491171297730104} |
| | | - {fileID: 4099818628537976} |
| | | m_Father: {fileID: 4033886752365058} |
| | | m_RootOrder: 0 |
| | | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} |
| | | --- !u!1 &1663573000831476 |
| | | GameObject: |
| | | m_ObjectHideFlags: 0 |
| | | m_CorrespondingSourceObject: {fileID: 0} |
| | | m_PrefabInstance: {fileID: 0} |
| | | m_PrefabAsset: {fileID: 0} |
| | | serializedVersion: 6 |
| | | m_Component: |
| | | - component: {fileID: 4087321752853002} |
| | | - component: {fileID: 23541405159921826} |
| | | - component: {fileID: 33521311580114450} |
| | | m_Layer: 0 |
| | | m_Name: Red |
| | | m_TagString: Untagged |
| | | m_Icon: {fileID: 0} |
| | | m_NavMeshLayer: 0 |
| | | m_StaticEditorFlags: 0 |
| | | m_IsActive: 1 |
| | | --- !u!4 &4087321752853002 |
| | | Transform: |
| | | m_ObjectHideFlags: 0 |
| | | m_CorrespondingSourceObject: {fileID: 0} |
| | | m_PrefabInstance: {fileID: 0} |
| | | m_PrefabAsset: {fileID: 0} |
| | | m_GameObject: {fileID: 1663573000831476} |
| | | m_LocalRotation: {x: -0.000000020360515, y: 1, z: 0.00000020861623, w: 0.00000030477918} |
| | | m_LocalPosition: {x: 0.5, y: 0, z: 0} |
| | | m_LocalScale: {x: 1, y: 1, z: 1} |
| | | m_Children: [] |
| | | m_Father: {fileID: 4099818628537976} |
| | | m_RootOrder: 0 |
| | | m_LocalEulerAnglesHint: {x: 0, y: 180.00002, z: 0} |
| | | --- !u!23 &23541405159921826 |
| | | MeshRenderer: |
| | | m_ObjectHideFlags: 0 |
| | | m_CorrespondingSourceObject: {fileID: 0} |
| | | m_PrefabInstance: {fileID: 0} |
| | | m_PrefabAsset: {fileID: 0} |
| | | m_GameObject: {fileID: 1663573000831476} |
| | | m_Enabled: 1 |
| | | m_CastShadows: 1 |
| | | m_ReceiveShadows: 1 |
| | | m_DynamicOccludee: 1 |
| | | m_MotionVectors: 1 |
| | | m_LightProbeUsage: 1 |
| | | m_ReflectionProbeUsage: 1 |
| | | m_RayTracingMode: 2 |
| | | m_RayTraceProcedural: 0 |
| | | m_RenderingLayerMask: 1 |
| | | m_RendererPriority: 0 |
| | | m_Materials: |
| | | - {fileID: 2100000, guid: 008790df986e3469285ea0c078de4b7f, type: 2} |
| | | m_StaticBatchInfo: |
| | | firstSubMesh: 0 |
| | | subMeshCount: 0 |
| | | m_StaticBatchRoot: {fileID: 0} |
| | | m_ProbeAnchor: {fileID: 0} |
| | | m_LightProbeVolumeOverride: {fileID: 0} |
| | | m_ScaleInLightmap: 1 |
| | | m_ReceiveGI: 1 |
| | | m_PreserveUVs: 0 |
| | | m_IgnoreNormalsForChartDetection: 0 |
| | | m_ImportantGI: 0 |
| | | m_StitchLightmapSeams: 0 |
| | | m_SelectedEditorRenderState: 3 |
| | | m_MinimumChartSize: 4 |
| | | m_AutoUVMaxDistance: 0.5 |
| | | m_AutoUVMaxAngle: 89 |
| | | m_LightmapParameters: {fileID: 0} |
| | | m_SortingLayerID: 0 |
| | | m_SortingLayer: 0 |
| | | m_SortingOrder: 0 |
| | | m_AdditionalVertexStreams: {fileID: 0} |
| | | --- !u!33 &33521311580114450 |
| | | MeshFilter: |
| | | m_ObjectHideFlags: 0 |
| | | m_CorrespondingSourceObject: {fileID: 0} |
| | | m_PrefabInstance: {fileID: 0} |
| | | m_PrefabAsset: {fileID: 0} |
| | | m_GameObject: {fileID: 1663573000831476} |
| | | m_Mesh: {fileID: 10210, guid: 0000000000000000e000000000000000, type: 0} |
| | | --- !u!1 &1699053510457970 |
| | | GameObject: |
| | | m_ObjectHideFlags: 0 |
| | | m_CorrespondingSourceObject: {fileID: 0} |
| | | m_PrefabInstance: {fileID: 0} |
| | | m_PrefabAsset: {fileID: 0} |
| | | serializedVersion: 6 |
| | | m_Component: |
| | | - component: {fileID: 4607948758076226} |
| | | - component: {fileID: 23820400616506566} |
| | | - component: {fileID: 33350661775210590} |
| | | m_Layer: 0 |
| | | m_Name: Green |
| | | m_TagString: Untagged |
| | | m_Icon: {fileID: 0} |
| | | m_NavMeshLayer: 0 |
| | | m_StaticEditorFlags: 0 |
| | | m_IsActive: 1 |
| | | --- !u!4 &4607948758076226 |
| | | Transform: |
| | | m_ObjectHideFlags: 0 |
| | | m_CorrespondingSourceObject: {fileID: 0} |
| | | m_PrefabInstance: {fileID: 0} |
| | | m_PrefabAsset: {fileID: 0} |
| | | m_GameObject: {fileID: 1699053510457970} |
| | | m_LocalRotation: {x: -0.000000020360515, y: 1, z: 0.00000020861623, w: 0.00000030477918} |
| | | m_LocalPosition: {x: -0.5, y: 0, z: 0} |
| | | m_LocalScale: {x: 1, y: 1, z: 1} |
| | | m_Children: [] |
| | | m_Father: {fileID: 4491171297730104} |
| | | m_RootOrder: 0 |
| | | m_LocalEulerAnglesHint: {x: 0, y: 180.00002, z: 0} |
| | | --- !u!23 &23820400616506566 |
| | | MeshRenderer: |
| | | m_ObjectHideFlags: 0 |
| | | m_CorrespondingSourceObject: {fileID: 0} |
| | | m_PrefabInstance: {fileID: 0} |
| | | m_PrefabAsset: {fileID: 0} |
| | | m_GameObject: {fileID: 1699053510457970} |
| | | m_Enabled: 1 |
| | | m_CastShadows: 1 |
| | | m_ReceiveShadows: 1 |
| | | m_DynamicOccludee: 1 |
| | | m_MotionVectors: 1 |
| | | m_LightProbeUsage: 1 |
| | | m_ReflectionProbeUsage: 1 |
| | | m_RayTracingMode: 2 |
| | | m_RayTraceProcedural: 0 |
| | | m_RenderingLayerMask: 1 |
| | | m_RendererPriority: 0 |
| | | m_Materials: |
| | | - {fileID: 2100000, guid: 1bfcbc6372f4d45f19690ea277e1019f, type: 2} |
| | | m_StaticBatchInfo: |
| | | firstSubMesh: 0 |
| | | subMeshCount: 0 |
| | | m_StaticBatchRoot: {fileID: 0} |
| | | m_ProbeAnchor: {fileID: 0} |
| | | m_LightProbeVolumeOverride: {fileID: 0} |
| | | m_ScaleInLightmap: 1 |
| | | m_ReceiveGI: 1 |
| | | m_PreserveUVs: 0 |
| | | m_IgnoreNormalsForChartDetection: 0 |
| | | m_ImportantGI: 0 |
| | | m_StitchLightmapSeams: 0 |
| | | m_SelectedEditorRenderState: 3 |
| | | m_MinimumChartSize: 4 |
| | | m_AutoUVMaxDistance: 0.5 |
| | | m_AutoUVMaxAngle: 89 |
| | | m_LightmapParameters: {fileID: 0} |
| | | m_SortingLayerID: 0 |
| | | m_SortingLayer: 0 |
| | | m_SortingOrder: 0 |
| | | m_AdditionalVertexStreams: {fileID: 0} |
| | | --- !u!33 &33350661775210590 |
| | | MeshFilter: |
| | | m_ObjectHideFlags: 0 |
| | | m_CorrespondingSourceObject: {fileID: 0} |
| | | m_PrefabInstance: {fileID: 0} |
| | | m_PrefabAsset: {fileID: 0} |
| | | m_GameObject: {fileID: 1699053510457970} |
| | | m_Mesh: {fileID: 10210, guid: 0000000000000000e000000000000000, type: 0} |
| | | --- !u!1 &1769573041013492 |
| | | GameObject: |
| | | m_ObjectHideFlags: 0 |
| | | m_CorrespondingSourceObject: {fileID: 0} |
| | | m_PrefabInstance: {fileID: 0} |
| | | m_PrefabAsset: {fileID: 0} |
| | | serializedVersion: 6 |
| | | m_Component: |
| | | - component: {fileID: 4099818628537976} |
| | | m_Layer: 0 |
| | | m_Name: RedAnchor |
| | | m_TagString: Untagged |
| | | m_Icon: {fileID: 0} |
| | | m_NavMeshLayer: 0 |
| | | m_StaticEditorFlags: 0 |
| | | m_IsActive: 1 |
| | | --- !u!4 &4099818628537976 |
| | | Transform: |
| | | m_ObjectHideFlags: 0 |
| | | m_CorrespondingSourceObject: {fileID: 0} |
| | | m_PrefabInstance: {fileID: 0} |
| | | m_PrefabAsset: {fileID: 0} |
| | | m_GameObject: {fileID: 1769573041013492} |
| | | m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} |
| | | m_LocalPosition: {x: -0.5, y: 0, z: 0} |
| | | m_LocalScale: {x: 1, y: 1, z: 1} |
| | | m_Children: |
| | | - {fileID: 4087321752853002} |
| | | m_Father: {fileID: 4169980140215914} |
| | | m_RootOrder: 1 |
| | | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} |
| | | --- !u!1 &1787721136844666 |
| | | GameObject: |
| | | m_ObjectHideFlags: 0 |
| | | m_CorrespondingSourceObject: {fileID: 0} |
| | | m_PrefabInstance: {fileID: 0} |
| | | m_PrefabAsset: {fileID: 0} |
| | | serializedVersion: 6 |
| | | m_Component: |
| | | - component: {fileID: 4033886752365058} |
| | | - component: {fileID: 114315104238988312} |
| | | m_Layer: 0 |
| | | m_Name: HealthBar |
| | | m_TagString: Untagged |
| | | m_Icon: {fileID: 0} |
| | | m_NavMeshLayer: 0 |
| | | m_StaticEditorFlags: 0 |
| | | m_IsActive: 1 |
| | | --- !u!4 &4033886752365058 |
| | | Transform: |
| | | m_ObjectHideFlags: 0 |
| | | m_CorrespondingSourceObject: {fileID: 0} |
| | | m_PrefabInstance: {fileID: 0} |
| | | m_PrefabAsset: {fileID: 0} |
| | | m_GameObject: {fileID: 1787721136844666} |
| | | m_LocalRotation: {x: 0.7071068, y: 0, z: 0, w: 0.7071068} |
| | | m_LocalPosition: {x: 0, y: 3, z: 0} |
| | | m_LocalScale: {x: 1, y: 1, z: 1} |
| | | m_Children: |
| | | - {fileID: 4169980140215914} |
| | | m_Father: {fileID: 4054417465033028} |
| | | m_RootOrder: 0 |
| | | m_LocalEulerAnglesHint: {x: 90, y: 0, z: 0} |
| | | --- !u!114 &114315104238988312 |
| | | MonoBehaviour: |
| | | m_ObjectHideFlags: 0 |
| | | m_CorrespondingSourceObject: {fileID: 0} |
| | | m_PrefabInstance: {fileID: 0} |
| | | m_PrefabAsset: {fileID: 0} |
| | | m_GameObject: {fileID: 1787721136844666} |
| | | m_Enabled: 1 |
| | | m_EditorHideFlags: 0 |
| | | m_Script: {fileID: 11500000, guid: 5440fde571ec4db4a719f37df8e972f0, type: 3} |
| | | m_Name: |
| | | m_EditorClassIdentifier: |
| | | damageableBehaviour: {fileID: 114126723238285906} |
| | | healthBar: {fileID: 4491171297730104} |
| | | backgroundBar: {fileID: 4099818628537976} |
| | | textMesh: {fileID: 0} |
| | | levelQuad: {fileID: 0} |
| | | levelMaterial: [] |
| | | showWhenFull: 0 |
copy from Assets/Prefabs/Towers/Water/WaterProjectile_4 1.prefab
copy to Assets/Prefabs/Towers/Water/WaterProjectile_0.prefab
File was copied from Assets/Prefabs/Towers/Water/WaterProjectile_4 1.prefab |
Diff too large |
File was renamed from Assets/Prefabs/Towers/Water/WaterProjectile_4 1.prefab |
Diff too large |
copy from Assets/Prefabs/Towers/Water/WaterProjectile_4 1.prefab
copy to Assets/Prefabs/Towers/Water/WaterProjectile_2.prefab
File was copied from Assets/Prefabs/Towers/Water/WaterProjectile_4 1.prefab |
Diff too large |
copy from Assets/Prefabs/Towers/Water/WaterProjectile_4 1.prefab
copy to Assets/Prefabs/Towers/Water/WaterProjectile_3.prefab
File was copied from Assets/Prefabs/Towers/Water/WaterProjectile_4 1.prefab |
Diff too large |
copy from Assets/Prefabs/Towers/Water/WaterProjectile_4 1.prefab
copy to Assets/Prefabs/Towers/Water/WaterProjectile_4.prefab
File was copied from Assets/Prefabs/Towers/Water/WaterProjectile_4 1.prefab |
| | |
| | | - component: {fileID: 8720903351228000460} |
| | | - component: {fileID: 478004586242557291} |
| | | m_Layer: 17 |
| | | m_Name: WaterProjectile_4 1 |
| | | m_Name: WaterProjectile_4 |
| | | m_TagString: Projectile |
| | | m_Icon: {fileID: 0} |
| | | m_NavMeshLayer: 0 |
| | |
| | | %YAML 1.1 |
| | | %TAG !u! tag:unity3d.com,2011: |
| | | --- !u!1 &1241004575684402 |
| | | GameObject: |
| | | m_ObjectHideFlags: 0 |
| | | m_CorrespondingSourceObject: {fileID: 0} |
| | | m_PrefabInstance: {fileID: 0} |
| | | m_PrefabAsset: {fileID: 0} |
| | | serializedVersion: 6 |
| | | m_Component: |
| | | - component: {fileID: 4491171297730104} |
| | | m_Layer: 0 |
| | | m_Name: GreenAnchor |
| | | m_TagString: Untagged |
| | | m_Icon: {fileID: 0} |
| | | m_NavMeshLayer: 0 |
| | | m_StaticEditorFlags: 0 |
| | | m_IsActive: 1 |
| | | --- !u!4 &4491171297730104 |
| | | Transform: |
| | | m_ObjectHideFlags: 0 |
| | | m_CorrespondingSourceObject: {fileID: 0} |
| | | m_PrefabInstance: {fileID: 0} |
| | | m_PrefabAsset: {fileID: 0} |
| | | m_GameObject: {fileID: 1241004575684402} |
| | | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} |
| | | m_LocalPosition: {x: 0.5, y: 0, z: 0} |
| | | m_LocalScale: {x: 1, y: 1, z: 1} |
| | | m_Children: |
| | | - {fileID: 4607948758076226} |
| | | m_Father: {fileID: 4169980140215914} |
| | | m_RootOrder: 0 |
| | | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} |
| | | --- !u!1 &1304972810206532 |
| | | GameObject: |
| | | m_ObjectHideFlags: 0 |
| | |
| | | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} |
| | | m_LocalPosition: {x: 0, y: 0, z: 0} |
| | | m_LocalScale: {x: 5, y: 5, z: 5} |
| | | m_Children: |
| | | - {fileID: 4033886752365058} |
| | | m_Children: [] |
| | | m_Father: {fileID: 0} |
| | | m_RootOrder: 0 |
| | | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} |
| | |
| | | deathParticleSystemPrefab: {fileID: 198059975614214484, guid: 7a0476686964e41ac8320b7cf37868c2, |
| | | type: 3} |
| | | deathEffectOffset: {x: 0, y: 0, z: 0} |
| | | --- !u!1 &1584327446698034 |
| | | GameObject: |
| | | m_ObjectHideFlags: 0 |
| | | m_CorrespondingSourceObject: {fileID: 0} |
| | | m_PrefabInstance: {fileID: 0} |
| | | m_PrefabAsset: {fileID: 0} |
| | | serializedVersion: 6 |
| | | m_Component: |
| | | - component: {fileID: 4169980140215914} |
| | | m_Layer: 0 |
| | | m_Name: Bar |
| | | m_TagString: Untagged |
| | | m_Icon: {fileID: 0} |
| | | m_NavMeshLayer: 0 |
| | | m_StaticEditorFlags: 0 |
| | | m_IsActive: 1 |
| | | --- !u!4 &4169980140215914 |
| | | Transform: |
| | | m_ObjectHideFlags: 0 |
| | | m_CorrespondingSourceObject: {fileID: 0} |
| | | m_PrefabInstance: {fileID: 0} |
| | | m_PrefabAsset: {fileID: 0} |
| | | m_GameObject: {fileID: 1584327446698034} |
| | | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} |
| | | m_LocalPosition: {x: 0, y: 0, z: 0} |
| | | m_LocalScale: {x: 1.4, y: 0.18134856, z: 1} |
| | | m_Children: |
| | | - {fileID: 4491171297730104} |
| | | - {fileID: 4099818628537976} |
| | | m_Father: {fileID: 4033886752365058} |
| | | m_RootOrder: 0 |
| | | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} |
| | | --- !u!1 &1663573000831476 |
| | | GameObject: |
| | | m_ObjectHideFlags: 0 |
| | | m_CorrespondingSourceObject: {fileID: 0} |
| | | m_PrefabInstance: {fileID: 0} |
| | | m_PrefabAsset: {fileID: 0} |
| | | serializedVersion: 6 |
| | | m_Component: |
| | | - component: {fileID: 4087321752853002} |
| | | - component: {fileID: 23541405159921826} |
| | | - component: {fileID: 33521311580114450} |
| | | m_Layer: 0 |
| | | m_Name: Red |
| | | m_TagString: Untagged |
| | | m_Icon: {fileID: 0} |
| | | m_NavMeshLayer: 0 |
| | | m_StaticEditorFlags: 0 |
| | | m_IsActive: 1 |
| | | --- !u!4 &4087321752853002 |
| | | Transform: |
| | | m_ObjectHideFlags: 0 |
| | | m_CorrespondingSourceObject: {fileID: 0} |
| | | m_PrefabInstance: {fileID: 0} |
| | | m_PrefabAsset: {fileID: 0} |
| | | m_GameObject: {fileID: 1663573000831476} |
| | | m_LocalRotation: {x: -0.000000020360515, y: 1, z: 0.00000020861623, w: 0.00000030477918} |
| | | m_LocalPosition: {x: 0.5, y: 0, z: 0} |
| | | m_LocalScale: {x: 1, y: 1, z: 1} |
| | | m_Children: [] |
| | | m_Father: {fileID: 4099818628537976} |
| | | m_RootOrder: 0 |
| | | m_LocalEulerAnglesHint: {x: 0, y: 180.00002, z: 0} |
| | | --- !u!23 &23541405159921826 |
| | | MeshRenderer: |
| | | m_ObjectHideFlags: 0 |
| | | m_CorrespondingSourceObject: {fileID: 0} |
| | | m_PrefabInstance: {fileID: 0} |
| | | m_PrefabAsset: {fileID: 0} |
| | | m_GameObject: {fileID: 1663573000831476} |
| | | m_Enabled: 1 |
| | | m_CastShadows: 1 |
| | | m_ReceiveShadows: 1 |
| | | m_DynamicOccludee: 1 |
| | | m_MotionVectors: 1 |
| | | m_LightProbeUsage: 1 |
| | | m_ReflectionProbeUsage: 1 |
| | | m_RayTracingMode: 2 |
| | | m_RayTraceProcedural: 0 |
| | | m_RenderingLayerMask: 1 |
| | | m_RendererPriority: 0 |
| | | m_Materials: |
| | | - {fileID: 2100000, guid: 008790df986e3469285ea0c078de4b7f, type: 2} |
| | | m_StaticBatchInfo: |
| | | firstSubMesh: 0 |
| | | subMeshCount: 0 |
| | | m_StaticBatchRoot: {fileID: 0} |
| | | m_ProbeAnchor: {fileID: 0} |
| | | m_LightProbeVolumeOverride: {fileID: 0} |
| | | m_ScaleInLightmap: 1 |
| | | m_ReceiveGI: 1 |
| | | m_PreserveUVs: 0 |
| | | m_IgnoreNormalsForChartDetection: 0 |
| | | m_ImportantGI: 0 |
| | | m_StitchLightmapSeams: 0 |
| | | m_SelectedEditorRenderState: 3 |
| | | m_MinimumChartSize: 4 |
| | | m_AutoUVMaxDistance: 0.5 |
| | | m_AutoUVMaxAngle: 89 |
| | | m_LightmapParameters: {fileID: 0} |
| | | m_SortingLayerID: 0 |
| | | m_SortingLayer: 0 |
| | | m_SortingOrder: 0 |
| | | m_AdditionalVertexStreams: {fileID: 0} |
| | | --- !u!33 &33521311580114450 |
| | | MeshFilter: |
| | | m_ObjectHideFlags: 0 |
| | | m_CorrespondingSourceObject: {fileID: 0} |
| | | m_PrefabInstance: {fileID: 0} |
| | | m_PrefabAsset: {fileID: 0} |
| | | m_GameObject: {fileID: 1663573000831476} |
| | | m_Mesh: {fileID: 10210, guid: 0000000000000000e000000000000000, type: 0} |
| | | --- !u!1 &1699053510457970 |
| | | GameObject: |
| | | m_ObjectHideFlags: 0 |
| | | m_CorrespondingSourceObject: {fileID: 0} |
| | | m_PrefabInstance: {fileID: 0} |
| | | m_PrefabAsset: {fileID: 0} |
| | | serializedVersion: 6 |
| | | m_Component: |
| | | - component: {fileID: 4607948758076226} |
| | | - component: {fileID: 23820400616506566} |
| | | - component: {fileID: 33350661775210590} |
| | | m_Layer: 0 |
| | | m_Name: Green |
| | | m_TagString: Untagged |
| | | m_Icon: {fileID: 0} |
| | | m_NavMeshLayer: 0 |
| | | m_StaticEditorFlags: 0 |
| | | m_IsActive: 1 |
| | | --- !u!4 &4607948758076226 |
| | | Transform: |
| | | m_ObjectHideFlags: 0 |
| | | m_CorrespondingSourceObject: {fileID: 0} |
| | | m_PrefabInstance: {fileID: 0} |
| | | m_PrefabAsset: {fileID: 0} |
| | | m_GameObject: {fileID: 1699053510457970} |
| | | m_LocalRotation: {x: -0.000000020360515, y: 1, z: 0.00000020861623, w: 0.00000030477918} |
| | | m_LocalPosition: {x: -0.5, y: 0, z: 0} |
| | | m_LocalScale: {x: 1, y: 1, z: 1} |
| | | m_Children: [] |
| | | m_Father: {fileID: 4491171297730104} |
| | | m_RootOrder: 0 |
| | | m_LocalEulerAnglesHint: {x: 0, y: 180.00002, z: 0} |
| | | --- !u!23 &23820400616506566 |
| | | MeshRenderer: |
| | | m_ObjectHideFlags: 0 |
| | | m_CorrespondingSourceObject: {fileID: 0} |
| | | m_PrefabInstance: {fileID: 0} |
| | | m_PrefabAsset: {fileID: 0} |
| | | m_GameObject: {fileID: 1699053510457970} |
| | | m_Enabled: 1 |
| | | m_CastShadows: 1 |
| | | m_ReceiveShadows: 1 |
| | | m_DynamicOccludee: 1 |
| | | m_MotionVectors: 1 |
| | | m_LightProbeUsage: 1 |
| | | m_ReflectionProbeUsage: 1 |
| | | m_RayTracingMode: 2 |
| | | m_RayTraceProcedural: 0 |
| | | m_RenderingLayerMask: 1 |
| | | m_RendererPriority: 0 |
| | | m_Materials: |
| | | - {fileID: 2100000, guid: 1bfcbc6372f4d45f19690ea277e1019f, type: 2} |
| | | m_StaticBatchInfo: |
| | | firstSubMesh: 0 |
| | | subMeshCount: 0 |
| | | m_StaticBatchRoot: {fileID: 0} |
| | | m_ProbeAnchor: {fileID: 0} |
| | | m_LightProbeVolumeOverride: {fileID: 0} |
| | | m_ScaleInLightmap: 1 |
| | | m_ReceiveGI: 1 |
| | | m_PreserveUVs: 0 |
| | | m_IgnoreNormalsForChartDetection: 0 |
| | | m_ImportantGI: 0 |
| | | m_StitchLightmapSeams: 0 |
| | | m_SelectedEditorRenderState: 3 |
| | | m_MinimumChartSize: 4 |
| | | m_AutoUVMaxDistance: 0.5 |
| | | m_AutoUVMaxAngle: 89 |
| | | m_LightmapParameters: {fileID: 0} |
| | | m_SortingLayerID: 0 |
| | | m_SortingLayer: 0 |
| | | m_SortingOrder: 0 |
| | | m_AdditionalVertexStreams: {fileID: 0} |
| | | --- !u!33 &33350661775210590 |
| | | MeshFilter: |
| | | m_ObjectHideFlags: 0 |
| | | m_CorrespondingSourceObject: {fileID: 0} |
| | | m_PrefabInstance: {fileID: 0} |
| | | m_PrefabAsset: {fileID: 0} |
| | | m_GameObject: {fileID: 1699053510457970} |
| | | m_Mesh: {fileID: 10210, guid: 0000000000000000e000000000000000, type: 0} |
| | | --- !u!1 &1769573041013492 |
| | | GameObject: |
| | | m_ObjectHideFlags: 0 |
| | | m_CorrespondingSourceObject: {fileID: 0} |
| | | m_PrefabInstance: {fileID: 0} |
| | | m_PrefabAsset: {fileID: 0} |
| | | serializedVersion: 6 |
| | | m_Component: |
| | | - component: {fileID: 4099818628537976} |
| | | m_Layer: 0 |
| | | m_Name: RedAnchor |
| | | m_TagString: Untagged |
| | | m_Icon: {fileID: 0} |
| | | m_NavMeshLayer: 0 |
| | | m_StaticEditorFlags: 0 |
| | | m_IsActive: 1 |
| | | --- !u!4 &4099818628537976 |
| | | Transform: |
| | | m_ObjectHideFlags: 0 |
| | | m_CorrespondingSourceObject: {fileID: 0} |
| | | m_PrefabInstance: {fileID: 0} |
| | | m_PrefabAsset: {fileID: 0} |
| | | m_GameObject: {fileID: 1769573041013492} |
| | | m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} |
| | | m_LocalPosition: {x: -0.5, y: 0, z: 0} |
| | | m_LocalScale: {x: 1, y: 1, z: 1} |
| | | m_Children: |
| | | - {fileID: 4087321752853002} |
| | | m_Father: {fileID: 4169980140215914} |
| | | m_RootOrder: 1 |
| | | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} |
| | | --- !u!1 &1787721136844666 |
| | | GameObject: |
| | | m_ObjectHideFlags: 0 |
| | | m_CorrespondingSourceObject: {fileID: 0} |
| | | m_PrefabInstance: {fileID: 0} |
| | | m_PrefabAsset: {fileID: 0} |
| | | serializedVersion: 6 |
| | | m_Component: |
| | | - component: {fileID: 4033886752365058} |
| | | - component: {fileID: 114315104238988312} |
| | | m_Layer: 0 |
| | | m_Name: HealthBar |
| | | m_TagString: Untagged |
| | | m_Icon: {fileID: 0} |
| | | m_NavMeshLayer: 0 |
| | | m_StaticEditorFlags: 0 |
| | | m_IsActive: 1 |
| | | --- !u!4 &4033886752365058 |
| | | Transform: |
| | | m_ObjectHideFlags: 0 |
| | | m_CorrespondingSourceObject: {fileID: 0} |
| | | m_PrefabInstance: {fileID: 0} |
| | | m_PrefabAsset: {fileID: 0} |
| | | m_GameObject: {fileID: 1787721136844666} |
| | | m_LocalRotation: {x: 0.7071068, y: 0, z: 0, w: 0.7071068} |
| | | m_LocalPosition: {x: 0, y: 3, z: 0} |
| | | m_LocalScale: {x: 1, y: 1, z: 1} |
| | | m_Children: |
| | | - {fileID: 4169980140215914} |
| | | m_Father: {fileID: 4054417465033028} |
| | | m_RootOrder: 0 |
| | | m_LocalEulerAnglesHint: {x: 90, y: 0, z: 0} |
| | | --- !u!114 &114315104238988312 |
| | | MonoBehaviour: |
| | | m_ObjectHideFlags: 0 |
| | | m_CorrespondingSourceObject: {fileID: 0} |
| | | m_PrefabInstance: {fileID: 0} |
| | | m_PrefabAsset: {fileID: 0} |
| | | m_GameObject: {fileID: 1787721136844666} |
| | | m_Enabled: 1 |
| | | m_EditorHideFlags: 0 |
| | | m_Script: {fileID: 11500000, guid: 5440fde571ec4db4a719f37df8e972f0, type: 3} |
| | | m_Name: |
| | | m_EditorClassIdentifier: |
| | | damageableBehaviour: {fileID: 114126723238285906} |
| | | healthBar: {fileID: 4491171297730104} |
| | | backgroundBar: {fileID: 4099818628537976} |
| | | textMesh: {fileID: 0} |
| | | levelQuad: {fileID: 0} |
| | | levelMaterial: [] |
| | | showWhenFull: 0 |
| | |
| | | if (UnityInput.GetKeyDown(key)) |
| | | { |
| | | Tower controller = EndlessLevelManager.instance.TowerLibrary[key - KeyCode.Alpha1]; |
| | | if (EndlessLevelManager.instance.Currency.CanAfford(controller.purchaseCost)) |
| | | if (m_GameUI.isBuilding) |
| | | { |
| | | if (m_GameUI.isBuilding) |
| | | { |
| | | m_GameUI.CancelGhostPlacement(); |
| | | } |
| | | EndlessGameUI.instance.SetToBuildMode(controller); |
| | | EndlessGameUI.instance.TryMoveGhost(InputController.instance.basicMouseInfo); |
| | | m_GameUI.CancelGhostPlacement(); |
| | | } |
| | | EndlessGameUI.instance.SetToBuildMode(controller); |
| | | EndlessGameUI.instance.TryMoveGhost(InputController.instance.basicMouseInfo); |
| | | break; |
| | | } |
| | | } |
| | |
| | | |
| | | namespace TowerDefense.Input |
| | | { |
| | | [RequireComponent(typeof(GameUI))] |
| | | public class TowerDefenseKeyboardMouseInput : KeyboardMouseInput |
| | | { |
| | | /// <summary> |
| | | /// Cached eference to gameUI |
| | | /// </summary> |
| | | GameUI m_GameUI; |
| | | [RequireComponent(typeof(GameUI))] |
| | | public class TowerDefenseKeyboardMouseInput : KeyboardMouseInput |
| | | { |
| | | /// <summary> |
| | | /// Cached eference to gameUI |
| | | /// </summary> |
| | | GameUI m_GameUI; |
| | | |
| | | /// <summary> |
| | | /// 是否处于拖动状态。 |
| | | /// </summary> |
| | | protected bool isInDragState = false; |
| | | /// <summary> |
| | | /// 是否处于拖动状态。 |
| | | /// </summary> |
| | | protected bool isInDragState = false; |
| | | |
| | | /// <summary> |
| | | /// Register input events |
| | | /// </summary> |
| | | protected override void OnEnable() |
| | | { |
| | | base.OnEnable(); |
| | | |
| | | m_GameUI = GetComponent<GameUI>(); |
| | | /// <summary> |
| | | /// Register input events |
| | | /// </summary> |
| | | protected override void OnEnable() |
| | | { |
| | | base.OnEnable(); |
| | | |
| | | if (InputController.instanceExists) |
| | | { |
| | | InputController controller = InputController.instance; |
| | | m_GameUI = GetComponent<GameUI>(); |
| | | |
| | | controller.tapped += OnTap; |
| | | controller.mouseMoved += OnMouseMoved; |
| | | if (InputController.instanceExists) |
| | | { |
| | | InputController controller = InputController.instance; |
| | | |
| | | // River Add for Mouse Start Drag & Draged. |
| | | controller.startedDrag += OnStartDrag; |
| | | controller.dragged += this.OnDrag; |
| | | controller.released += this.OnEndDrag; |
| | | } |
| | | } |
| | | controller.tapped += OnTap; |
| | | controller.mouseMoved += OnMouseMoved; |
| | | |
| | | // River Add for Mouse Start Drag & Draged. |
| | | controller.startedDrag += OnStartDrag; |
| | | controller.dragged += this.OnDrag; |
| | | controller.released += this.OnEndDrag; |
| | | } |
| | | } |
| | | |
| | | |
| | | /// <summary> |
| | | /// Deregister input events |
| | | /// </summary> |
| | | protected override void OnDisable() |
| | | { |
| | | if (!InputController.instanceExists) |
| | | { |
| | | return; |
| | | } |
| | | /// <summary> |
| | | /// Deregister input events |
| | | /// </summary> |
| | | protected override void OnDisable() |
| | | { |
| | | if (!InputController.instanceExists) |
| | | { |
| | | return; |
| | | } |
| | | |
| | | InputController controller = InputController.instance; |
| | | InputController controller = InputController.instance; |
| | | |
| | | controller.tapped -= OnTap; |
| | | controller.mouseMoved -= OnMouseMoved; |
| | | controller.tapped -= OnTap; |
| | | controller.mouseMoved -= OnMouseMoved; |
| | | |
| | | controller.startedDrag -= this.OnStartDrag; |
| | | controller.dragged -= this.OnDrag; |
| | | controller.released -= this.OnEndDrag; |
| | | } |
| | | controller.startedDrag -= this.OnStartDrag; |
| | | controller.dragged -= this.OnDrag; |
| | | controller.released -= this.OnEndDrag; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// Handle camera panning behaviour |
| | | /// </summary> |
| | | protected override void Update() |
| | | { |
| | | base.Update(); |
| | | |
| | | // Escape handling |
| | | if (UnityInput.GetKeyDown(KeyCode.Escape)) |
| | | { |
| | | switch (m_GameUI.state) |
| | | { |
| | | case State.Normal: |
| | | if (m_GameUI.isTowerSelected) |
| | | { |
| | | m_GameUI.DeselectTower(); |
| | | } |
| | | else |
| | | { |
| | | m_GameUI.Pause(); |
| | | } |
| | | break; |
| | | case State.BuildingWithDrag: |
| | | case State.Building: |
| | | m_GameUI.CancelGhostPlacement(); |
| | | break; |
| | | } |
| | | } |
| | | |
| | | // place towers with keyboard numbers |
| | | if (LevelManager.instanceExists) |
| | | { |
| | | int towerLibraryCount = LevelManager.instance.towerLibrary.Count; |
| | | /// <summary> |
| | | /// Handle camera panning behaviour |
| | | /// </summary> |
| | | protected override void Update() |
| | | { |
| | | base.Update(); |
| | | |
| | | // find the lowest value between 9 (keyboard numbers) |
| | | // and the amount of towers in the library |
| | | int count = Mathf.Min(9, towerLibraryCount); |
| | | KeyCode highestKey = KeyCode.Alpha1 + count; |
| | | |
| | | for (var key = KeyCode.Alpha1; key < highestKey; key++) |
| | | { |
| | | // add offset for the KeyCode Alpha 1 index to find correct keycodes |
| | | if (UnityInput.GetKeyDown(key)) |
| | | { |
| | | Tower controller = LevelManager.instance.towerLibrary[key - KeyCode.Alpha1]; |
| | | if (LevelManager.instance.currency.CanAfford(controller.purchaseCost)) |
| | | { |
| | | if (m_GameUI.isBuilding) |
| | | { |
| | | m_GameUI.CancelGhostPlacement(); |
| | | } |
| | | GameUI.instance.SetToBuildMode(controller); |
| | | GameUI.instance.TryMoveGhost(InputController.instance.basicMouseInfo); |
| | | } |
| | | break; |
| | | } |
| | | } |
| | | |
| | | // special case for 0 mapping to index 9 |
| | | if (count < 10 && UnityInput.GetKeyDown(KeyCode.Alpha0)) |
| | | { |
| | | Tower controller = LevelManager.instance.towerLibrary[9]; |
| | | GameUI.instance.SetToBuildMode(controller); |
| | | GameUI.instance.TryMoveGhost(InputController.instance.basicMouseInfo); |
| | | } |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// Ghost follows pointer |
| | | /// </summary> |
| | | void OnMouseMoved(PointerInfo pointer) |
| | | { |
| | | // We only respond to mouse info |
| | | var mouseInfo = pointer as MouseCursorInfo; |
| | | |
| | | if ((mouseInfo != null) && (m_GameUI.isBuilding)) |
| | | { |
| | | m_GameUI.TryMoveGhost(pointer, false); |
| | | } |
| | | } |
| | | |
| | | protected virtual void OnStartDrag(PointerActionInfo pointer) |
| | | { |
| | | // select towers |
| | | m_GameUI.TrySelectTower(pointer); |
| | | // River: 为了开始拖动后可以直接显示GhostTower |
| | | m_GameUI.TryMoveGhost(pointer, false); |
| | | |
| | | this.isInDragState = true; |
| | | } |
| | | |
| | | protected override void OnDrag(PointerActionInfo pointer) |
| | | { |
| | | if ((pointer != null) && (m_GameUI.isBuilding)) |
| | | { |
| | | m_GameUI.TryMoveGhost(pointer, false); |
| | | } |
| | | } |
| | | |
| | | protected void OnEndDrag(PointerActionInfo pointer) |
| | | { |
| | | // EndDrag 只能放置相关的GhostTower. |
| | | if (this.isInDragState) |
| | | m_GameUI.onEndTowerDrag(pointer); |
| | | //m_GameUI.TryPlaceTower(pointer); |
| | | |
| | | this.isInDragState = false; |
| | | } |
| | | |
| | | |
| | | /// <summary> |
| | | /// Select towers or position ghosts |
| | | /// </summary> |
| | | void OnTap(PointerActionInfo pointer) |
| | | { |
| | | // We only respond to mouse info |
| | | var mouseInfo = pointer as MouseButtonInfo; |
| | | |
| | | if (mouseInfo != null && !mouseInfo.startedOverUI) |
| | | { |
| | | if (m_GameUI.isBuilding) |
| | | { |
| | | if (mouseInfo.mouseButtonId == 0) // LMB confirms |
| | | { |
| | | if( m_GameUI.TryPlaceTower(pointer)) |
| | | // Escape handling |
| | | if (UnityInput.GetKeyDown(KeyCode.Escape)) |
| | | { |
| | | switch (m_GameUI.state) |
| | | { |
| | | case State.Normal: |
| | | if (m_GameUI.isTowerSelected) |
| | | { |
| | | // 开启相应的兵线: |
| | | Tower tw = m_GameUI.FindTowerWithGridIdx(m_GameUI.currentGrid.x, m_GameUI.currentGrid.y); |
| | | if ((tw != null) && (tw.bInAttackMode )) |
| | | LevelManager.instance.startWaveLine(m_GameUI.currentGrid.x, false, tw.attributeId); |
| | | } |
| | | } |
| | | else // RMB cancels |
| | | { |
| | | m_GameUI.CancelGhostPlacement(); |
| | | } |
| | | } |
| | | else |
| | | { |
| | | if (mouseInfo.mouseButtonId == 0) |
| | | { |
| | | // select towers |
| | | m_GameUI.TrySelectTower(pointer); |
| | | // River: 为了TAP后立刻显示出来相关的Ghost. |
| | | m_GameUI.TryMoveGhost(pointer, false); |
| | | m_GameUI.DeselectTower(); |
| | | } |
| | | else |
| | | { |
| | | m_GameUI.Pause(); |
| | | } |
| | | break; |
| | | case State.BuildingWithDrag: |
| | | case State.Building: |
| | | m_GameUI.CancelGhostPlacement(); |
| | | break; |
| | | } |
| | | } |
| | | |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | // place towers with keyboard numbers |
| | | if (LevelManager.instanceExists) |
| | | { |
| | | int towerLibraryCount = LevelManager.instance.towerLibrary.Count; |
| | | |
| | | // find the lowest value between 9 (keyboard numbers) |
| | | // and the amount of towers in the library |
| | | int count = Mathf.Min(9, towerLibraryCount); |
| | | KeyCode highestKey = KeyCode.Alpha1 + count; |
| | | |
| | | for (var key = KeyCode.Alpha1; key < highestKey; key++) |
| | | { |
| | | // add offset for the KeyCode Alpha 1 index to find correct keycodes |
| | | if (UnityInput.GetKeyDown(key)) |
| | | { |
| | | Tower controller = LevelManager.instance.towerLibrary[key - KeyCode.Alpha1]; |
| | | if (m_GameUI.isBuilding) |
| | | { |
| | | m_GameUI.CancelGhostPlacement(); |
| | | } |
| | | GameUI.instance.SetToBuildMode(controller); |
| | | GameUI.instance.TryMoveGhost(InputController.instance.basicMouseInfo); |
| | | break; |
| | | } |
| | | } |
| | | |
| | | // special case for 0 mapping to index 9 |
| | | if (count < 10 && UnityInput.GetKeyDown(KeyCode.Alpha0)) |
| | | { |
| | | Tower controller = LevelManager.instance.towerLibrary[9]; |
| | | GameUI.instance.SetToBuildMode(controller); |
| | | GameUI.instance.TryMoveGhost(InputController.instance.basicMouseInfo); |
| | | } |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// Ghost follows pointer |
| | | /// </summary> |
| | | void OnMouseMoved(PointerInfo pointer) |
| | | { |
| | | // We only respond to mouse info |
| | | var mouseInfo = pointer as MouseCursorInfo; |
| | | |
| | | if ((mouseInfo != null) && (m_GameUI.isBuilding)) |
| | | { |
| | | m_GameUI.TryMoveGhost(pointer, false); |
| | | } |
| | | } |
| | | |
| | | protected virtual void OnStartDrag(PointerActionInfo pointer) |
| | | { |
| | | // select towers |
| | | m_GameUI.TrySelectTower(pointer); |
| | | // River: 为了开始拖动后可以直接显示GhostTower |
| | | m_GameUI.TryMoveGhost(pointer, false); |
| | | |
| | | this.isInDragState = true; |
| | | } |
| | | |
| | | protected override void OnDrag(PointerActionInfo pointer) |
| | | { |
| | | if ((pointer != null) && (m_GameUI.isBuilding)) |
| | | { |
| | | m_GameUI.TryMoveGhost(pointer, false); |
| | | } |
| | | } |
| | | |
| | | protected void OnEndDrag(PointerActionInfo pointer) |
| | | { |
| | | // EndDrag 只能放置相关的GhostTower. |
| | | if (this.isInDragState) |
| | | m_GameUI.onEndTowerDrag(pointer); |
| | | //m_GameUI.TryPlaceTower(pointer); |
| | | |
| | | this.isInDragState = false; |
| | | } |
| | | |
| | | |
| | | /// <summary> |
| | | /// Select towers or position ghosts |
| | | /// </summary> |
| | | void OnTap(PointerActionInfo pointer) |
| | | { |
| | | // We only respond to mouse info |
| | | var mouseInfo = pointer as MouseButtonInfo; |
| | | |
| | | if (mouseInfo != null && !mouseInfo.startedOverUI) |
| | | { |
| | | if (m_GameUI.isBuilding) |
| | | { |
| | | if (mouseInfo.mouseButtonId == 0) // LMB confirms |
| | | { |
| | | if (m_GameUI.TryPlaceTower(pointer)) |
| | | { |
| | | // 开启相应的兵线: |
| | | Tower tw = m_GameUI.FindTowerWithGridIdx(m_GameUI.currentGrid.x, m_GameUI.currentGrid.y); |
| | | if ((tw != null) && (tw.bInAttackMode)) |
| | | LevelManager.instance.startWaveLine(m_GameUI.currentGrid.x, false, tw.attributeId); |
| | | } |
| | | } |
| | | else // RMB cancels |
| | | { |
| | | m_GameUI.CancelGhostPlacement(); |
| | | } |
| | | } |
| | | else |
| | | { |
| | | if (mouseInfo.mouseButtonId == 0) |
| | | { |
| | | // select towers |
| | | m_GameUI.TrySelectTower(pointer); |
| | | // River: 为了TAP后立刻显示出来相关的Ghost. |
| | | m_GameUI.TryMoveGhost(pointer, false); |
| | | |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | |
| | | using KTGMGemClient; |
| | | using System.Collections; |
| | | using System; |
| | | using ActionGameFramework.Health; |
| | | using Core.Utilities; |
| | |
| | | public class Tower : Targetable |
| | | { |
| | | public readonly float INSCENE_TU_DAMAGE = 30f; |
| | | |
| | | public static readonly int MAX_LEVEL = 4; |
| | | |
| | | /// <summary> |
| | |
| | | /// 当前塔防对应的MonsterMaterial,自身和对方显示不同的Mat. |
| | | /// </summary> |
| | | public Material materialMonsterSelf; |
| | | public Material materialMonsterOppo; |
| | | |
| | | /// <summary> |
| | | /// 0 空状态 1 等待状态 2 攻击状态. |
| | | /// </summary> |
| | | protected int curActionState = 0; |
| | | public Material materialMonsterOppo; |
| | | |
| | | /// <summary> |
| | | /// 塔防对应的充能状态. |
| | |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// This function is called when the object becomes enabled and active. |
| | | /// </summary> |
| | | void OnEnable() |
| | | { |
| | | |
| | | // if (bulletCtl != null) |
| | | // { |
| | | // Debug.Log("打开了bulletCtl"); |
| | | // bulletCtl.gameObject.SetActive(true); |
| | | // } |
| | | |
| | | |
| | | // if (energyCtl != null) |
| | | // { |
| | | // Debug.Log("打开了energyCtl"); |
| | | // energyCtl.gameObject.SetActive(true); |
| | | // } |
| | | } |
| | | |
| | | public void CheckCtrl() |
| | | { |
| | | if (bulletCtl != null) |
| | |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 初始化当前塔防的局内升级,lvl从1开始. |
| | | /// </summary> |
| | | /// <param name="lvl"></param> |
| | | public void initInSceneTowerLevel(int lvl) |
| | | { |
| | | inSceneTowerLevel = lvl; |
| | | if (lvl <= 1) |
| | | { |
| | | ResetInSceneTowerLevel(); |
| | | return; |
| | | } |
| | | // 设置攻击数据的加强,暂时是测试数据,后面需要读取表格数据处理: |
| | | float damageAdd = 0; |
| | | // float damageAdd = (inSceneTowerLevel - 1) * INSCENE_TU_DAMAGE; |
| | | for (int ti = 0; ti < levels.Length; ti++) |
| | | { |
| | | if (levels[ti].levelDamager) |
| | | { |
| | | levels[ti].levelDamager.doubleHit = bDoubleHitElit; |
| | | levels[ti].levelDamager.inSceneUpGradeDamage = damageAdd; |
| | | } |
| | | } |
| | | } |
| | | |
| | | protected void ResetInSceneTowerLevel() |
| | | { |
| | | for (int ti = 0; ti < levels.Length; ti++) |
| | | { |
| | | if (levels[ti].levelDamager) |
| | | { |
| | | levels[ti].levelDamager.inSceneUpGradeDamage = 0; |
| | | levels[ti].levelDamager.doubleHit = bDoubleHitElit; |
| | | } |
| | | } |
| | | return; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 升级当前塔防的局内等级,需要播放相关的特效 |
| | | /// </summary> |
| | | public void upGradeInSceneTL() |
| | |
| | | |
| | | // 设置攻击数据的加强,暂时是测试数据,后面需要读取表格数据处理: |
| | | float damageAdd = inSceneTowerLevel * INSCENE_TU_DAMAGE; |
| | | |
| | | for (int ti = 0; ti < levels.Length; ti++) |
| | | { |
| | | if (levels[ti].levelDamager) |
| | | { |
| | | levels[ti].levelDamager.inSceneUpGradeDamage = damageAdd; |
| | | levels[ti].levelDamager.towerName = name; |
| | | levels[ti].levelDamager.bSet = true; |
| | | } |
| | | } |
| | | |
| | | Debug.Log("Upgrade Tower name is:" + name); |
| | | |
| | |
| | | public IPlacementArea placementArea { get; private set; } |
| | | |
| | | /// <summary> |
| | | /// The purchase cost of the tower |
| | | /// </summary> |
| | | public int purchaseCost |
| | | { |
| | | get { return levels[0].cost; } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// The event that fires off when a player deletes a tower |
| | | /// </summary> |
| | | public Action towerDeleted; |
| | |
| | | /// The event that fires off when a tower has been destroyed |
| | | /// </summary> |
| | | public Action towerDestroyed; |
| | | |
| | | /// <summary> |
| | | /// 放置到目标位置 |
| | | /// </summary> |
| | | /// <param name="destination"></param> |
| | | public virtual void SetToDestination(IntVector2 destination) |
| | | { |
| | | gridPosition = destination; |
| | | transform.position = placementArea.GridToWorld(destination, dimensions); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// Provide the tower with data to initialize with |
| | |
| | | } |
| | | |
| | | SetLevel(lvl); |
| | | |
| | | if (LevelManager.instanceExists) |
| | | { |
| | | LevelManager.instance.levelStateChanged += OnLevelStateChanged; |
| | | } |
| | | else if (EndlessLevelManager.instanceExists) |
| | | EndlessLevelManager.instance.LevelStateChanged += OnLevelStateChanged; |
| | | |
| | | // 查找Targetter: |
| | | Targetter target = GetComponentInChildren<Targetter>(); |
| | | if (target) |
| | | { |
| | | target.bOpponent = opponentSide; |
| | | } |
| | | else |
| | | Debug.Log("在当前的Tower中找不到Targetter."); |
| | | |
| | | // |
| | | // 初始化当前的局内Tower等级数据 |
| | | initInSceneTowerLevel(SceneTowerLvl.getInSceneTowerLvl(towerName)); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// Provides information on the cost to upgrade |
| | | /// </summary> |
| | | /// <returns>Returns -1 if the towers is already at max level, other returns the cost to upgrade</returns> |
| | | public int GetCostForNextLevel() |
| | | { |
| | | if (isAtMaxLevel) |
| | | { |
| | | return -1; |
| | | } |
| | | return levels[currentLevel + 1].cost; |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | // Invoke base kill method |
| | | Kill(); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// Provides the value recived for selling this tower |
| | | /// </summary> |
| | | /// <returns>A sell value of the tower</returns> |
| | | public int GetSellLevel() |
| | | { |
| | | return GetSellLevel(currentLevel); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// Provides the value recived for selling this tower of a particular level |
| | | /// </summary> |
| | | /// <param name="level">Level of tower</param> |
| | | /// <returns>A sell value of the tower</returns> |
| | | public int GetSellLevel(int level) |
| | | { |
| | | // sell for full price if waves haven't started yet |
| | | if (LevelManager.instanceExists && LevelManager.instance.levelState == LevelState.Building |
| | | || EndlessLevelManager.instanceExists && EndlessLevelManager.instance.EndlessLeveltate == LevelState.Building) |
| | | { |
| | | int cost = 0; |
| | | for (int i = 0; i <= level; i++) |
| | | { |
| | | cost += levels[i].cost; |
| | | } |
| | | |
| | | return cost; |
| | | } |
| | | return levels[currentLevel].sell; |
| | | } |
| | | |
| | | |
| | | /// <summary> |
| | | /// Used to (try to) upgrade the tower data |
| | | /// </summary> |
| | |
| | | public override void Remove() |
| | | { |
| | | base.Remove(); |
| | | |
| | | // 清空局内升级数据: |
| | | ResetInSceneTowerLevel(); |
| | | attackRise = 0.0f; |
| | | placementArea.Clear(gridPosition, dimensions); |
| | | Destroy(gameObject); |
| | |
| | | // initialize TowerLevel |
| | | currentTowerLevel.Initialize(this, enemyLayerMask, configuration.alignmentProvider); |
| | | |
| | | // health data |
| | | ScaleHealth(); |
| | | |
| | | // |
| | | // disable affectors |
| | | LevelState levelState = LevelState.Intro; |
| | | if (LevelManager.instanceExists) |
| | |
| | | bool initialise = levelState == LevelState.AllEnemiesSpawned || levelState == LevelState.SpawningEnemies; |
| | | initialise = false; |
| | | currentTowerLevel.SetAffectorState(initialise, gridPosition.x); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// Scales the health based on the previous health |
| | | /// Requires override when the rules for scaling health on upgrade changes |
| | | /// </summary> |
| | | protected virtual void ScaleHealth() |
| | | { |
| | | configuration.SetMaxHealth(currentTowerLevel.maxHealth); |
| | | |
| | | if (currentLevel == 0) |
| | | { |
| | | configuration.SetHealth(currentTowerLevel.maxHealth); |
| | | } |
| | | else |
| | | { |
| | | int currentHealth = Mathf.FloorToInt(configuration.normalisedHealth * currentTowerLevel.maxHealth); |
| | | configuration.SetHealth(currentHealth); |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | using System.Collections.Generic; |
| | | using ActionGameFramework.Health; |
| | | using Core.Health; |
| | | using KTGMGemClient; |
| | | using TowerDefense.Affectors; |
| | |
| | | public TowerPlacementGhost towerGhostPrefab; |
| | | |
| | | /// <summary> |
| | | /// Build effect gameObject to instantiate on start |
| | | /// </summary> |
| | | //public GameObject buildEffectPrefab; |
| | | |
| | | /// <summary> |
| | | /// 升级特效 |
| | | /// </summary> |
| | | public GameObject UpgradeEffectPrefab; |
| | | |
| | | /// <summary> |
| | | /// 当前的Level对应的DamagerData. |
| | | /// </summary> |
| | | public Damager levelDamager; |
| | | |
| | | /// <summary> |
| | | /// Reference to scriptable object with level data on it |
| | | /// </summary> |
| | | public TowerLevelData levelData; |
| | | |
| | | /// <summary> |
| | | /// The parent tower controller of this tower |
| | |
| | | public LayerMask mask { get; protected set; } |
| | | |
| | | /// <summary> |
| | | /// Gets the cost value |
| | | /// </summary> |
| | | public int cost |
| | | { |
| | | get { return levelData.cost; } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// Gets the sell value |
| | | /// </summary> |
| | | public int sell |
| | | { |
| | | get { return levelData.sell; } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// Gets the max health |
| | | /// </summary> |
| | | public int maxHealth |
| | | { |
| | | get { return levelData.maxHealth; } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// Gets the starting health |
| | | /// </summary> |
| | | public int startingHealth |
| | | { |
| | | get { return levelData.startingHealth; } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// Gets the tower description |
| | | /// </summary> |
| | | public string description |
| | | { |
| | | get { return levelData.description; } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// Gets the tower description |
| | | /// </summary> |
| | | public string upgradeDescription |
| | | { |
| | | get { return levelData.upgradeDescription; } |
| | | } |
| | | |
| | | |
| | | /// <summary> |
| | | /// Initialises the Effects attached to this object |
| | | /// </summary> |
| | | public virtual void Initialize(Tower tower, LayerMask enemyMask, IAlignmentProvider alignment) |
| | |
| | | effect.Initialize(alignment, mask); |
| | | effect.towerPtr = tower; |
| | | AttackAffector attackAffector = effect.GetComponent<AttackAffector>(); |
| | | |
| | | // if (attackAffector.projectile != null) |
| | | // { |
| | | // Damager damager = attackAffector.projectile.gameObject.GetComponent<Damager>(); |
| | | // damager.TowerAttributeId = tower.attributeId; |
| | | // } |
| | | } |
| | | m_ParentTower = tower; |
| | | Transform starTs = transform.Find("Star"); |
| | |
| | | starTs.localRotation = Quaternion.Euler(60, 180, 0); |
| | | } |
| | | |
| | | Vector3 normalScale; |
| | | |
| | | private void Awake() |
| | | { |
| | | normalScale = new Vector3(1.5f, 1.5f, 1.5f); |
| | | canPlaceMesh.enabled = false; |
| | | } |
| | | |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | /// <summary> |
| | | /// Returns a list of affectors that implement ITowerRadiusVisualizer |
| | | /// </summary> |
| | |
| | | { |
| | | } |
| | | |
| | | |
| | | /// <summary> |
| | | /// 获取当前TowerLevel对应的AttackRise. |
| | | /// </summary> |
| | | /// /// </summary> |
| | | public float attackRise { get { return m_ParentTower.attackRise; } } |
| | | |
| | | public void OnAfterDeserialize() |
| | |
| | | } |
| | | else if (isFreeAttackGrid(pointerInfo) && !bSkill) |
| | | { |
| | | if (!TryPlaceTower(pointerInfo, false, true)) |
| | | if (!TryPlaceTower(pointerInfo, false)) |
| | | { |
| | | CancelPlaceTower(pointerInfo); |
| | | Debug.Log("这里需要返回原位"); |
| | |
| | | /// Attempt to position a tower at the given location |
| | | /// </summary> |
| | | /// <param name="pointerInfo">The pointer we're using to position the tower</param> |
| | | public bool TryPlaceTower(PointerInfo pointerInfo, bool force = false, bool zeroCost = false) |
| | | public bool TryPlaceTower(PointerInfo pointerInfo, bool force = false) |
| | | { |
| | | UIPointer pointer = WrapPointer(pointerInfo); |
| | | |
| | |
| | | return false; |
| | | } |
| | | |
| | | return BuyTower(pointer, force, zeroCost); |
| | | return BuyTower(pointer, force); |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | { |
| | | return; |
| | | } |
| | | int upgradeCost = currentSelectedTower.GetCostForNextLevel(); |
| | | bool successfulUpgrade = EndlessLevelManager.instance.Currency.TryPurchase(upgradeCost); |
| | | if (successfulUpgrade) |
| | | { |
| | | currentSelectedTower.UpgradeTower(); |
| | | } |
| | | currentSelectedTower.UpgradeTower(); |
| | | DeselectTower(); |
| | | } |
| | | |
| | |
| | | { |
| | | throw new InvalidOperationException("Selected Tower is null"); |
| | | } |
| | | int sellValue = currentSelectedTower.GetSellLevel(); |
| | | if (EndlessLevelManager.instanceExists && sellValue > 0) |
| | | { |
| | | EndlessLevelManager.instance.Currency.AddCurrency(sellValue); |
| | | currentSelectedTower.Sell(); |
| | | currentSelectedTower.Sell(); |
| | | |
| | | // 从列表中删除Tower. |
| | | delTower(currentSelectedTower); |
| | | } |
| | | // 从列表中删除Tower. |
| | | delTower(currentSelectedTower); |
| | | DeselectTower(); |
| | | } |
| | | |
| | |
| | | { |
| | | return; |
| | | } |
| | | int cost = m_CurrentTower.controller.purchaseCost; |
| | | bool successfulPurchase = EndlessLevelManager.instance.Currency.TryPurchase(cost); |
| | | if (successfulPurchase) |
| | | { |
| | | PlaceTower(); |
| | | } |
| | | PlaceTower(); |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | /// Throws exception when not in a build mode or when tower is not a valid position |
| | | /// </exception> |
| | | /// </summary> |
| | | public bool BuyTower(UIPointer pointer, bool force = false, bool zeroCost = false) |
| | | public bool BuyTower(UIPointer pointer, bool force = false) |
| | | { |
| | | if (!isBuilding) return false; |
| | | |
| | |
| | | return false; |
| | | } |
| | | |
| | | int cost = m_CurrentTower.controller.purchaseCost; |
| | | if (zeroCost) |
| | | cost = 0; |
| | | bool successfulPurchase = EndlessLevelManager.instance.Currency.TryPurchase(cost); |
| | | bool successfulPurchase = EndlessLevelManager.instance.Currency.TryPurchase(0); |
| | | if (successfulPurchase) |
| | | { |
| | | PlaceGhost(pointer); |
| | |
| | | public void PlayUpgradeEffect(Tower newTower) |
| | | { |
| | | newTower.currentTowerLevel.PlayUpGradeEffect(); |
| | | // GameObject effect = TowerUpgradeEffectPrefab; |
| | | |
| | | // if (newTower.towerFeature == EFeatureTower.NULL) |
| | | // { |
| | | // string path = $"UI/ToBattle_{newTower.attributeId}"; |
| | | // GameObject prefab = Resources.Load<GameObject>(path); |
| | | // effect = Instantiate(prefab); |
| | | // } |
| | | |
| | | // // 在sTower的位置播放升级特效 |
| | | // GameObject obj = Instantiate(effect); |
| | | // obj.transform.position = newTower.transform.position; |
| | | // Vector3 pos = obj.transform.position; |
| | | // pos.y += 5f; |
| | | // obj.transform.position = pos; |
| | | // ParticleSystem ps = obj.GetComponent<ParticleSystem>(); |
| | | |
| | | // if (ps == null) |
| | | // ps = obj.transform.GetChild(0).GetComponent<ParticleSystem>(); |
| | | // ps.Play(); |
| | | // Destroy(obj, ps.main.duration); |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | if (m_CurrentTower == null || m_CurrentArea == null) |
| | | return false; |
| | | |
| | | return EndlessLevelManager.instance.Currency.CanAfford(m_CurrentTower.controller.purchaseCost); |
| | | return true; |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | // 当前类所在的Btn. |
| | | public Button randomBtn; |
| | | |
| | | //public Button skillBtn; |
| | | |
| | | /// <summary> |
| | | /// 购买二级宝石的按钮贴图. |
| | | /// </summary> |
| | |
| | | bSetBuyLvlUp = false; |
| | | bCdTimeStart = false; |
| | | randomBtn.onClick.AddListener(delegate () { onClick(EFeatureTower.NULL); }); |
| | | //skillBtn.onClick.AddListener(delegate () { onClick(EFeatureTower.Skill_Bomb); }); |
| | | UpdateDescDisplay(); |
| | | } |
| | | |
| | |
| | | int minLevel = Mathf.Min(EndlessGameUI.instance.MinLevel, 1); |
| | | |
| | | NormalDesc.text = $"购买{minLevel + 1}级宝石"; |
| | | //SkillDesc.text = $"购买{minLevel + 1}级技能宝石"; |
| | | } |
| | | |
| | | public void ChangeBtnClickNormal() |
| | | { |
| | | randomBtn.onClick.RemoveAllListeners(); |
| | | //skillBtn.onClick.RemoveAllListeners(); |
| | | randomBtn.onClick.AddListener(delegate () { onClick(EFeatureTower.NULL); }); |
| | | //skillBtn.onClick.AddListener(delegate () { onClick(EFeatureTower.Skill_Bomb); }); |
| | | } |
| | | public void ChangeBtnClick() |
| | | { |
| | | randomBtn.onClick.RemoveAllListeners(); |
| | | //skillBtn.onClick.RemoveAllListeners(); |
| | | randomBtn.onClick.AddListener(() => |
| | | { |
| | | AudioSourceManager.Ins.Play(AudioEnum.UIDisable); |
| | | }); |
| | | // skillBtn.onClick.AddListener(() => |
| | | // { |
| | | // AudioSourceManager.Ins.Play(AudioEnum.UIDisable); |
| | | // }); |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | { |
| | | return; |
| | | } |
| | | int upgradeCost = currentSelectedTower.GetCostForNextLevel(); |
| | | bool successfulUpgrade = LevelManager.instance.currency.TryPurchase(upgradeCost); |
| | | if (successfulUpgrade) |
| | | { |
| | | currentSelectedTower.UpgradeTower(); |
| | | } |
| | | //towerUI.Hide(); |
| | | currentSelectedTower.UpgradeTower(); |
| | | DeselectTower(); |
| | | } |
| | | |
| | |
| | | { |
| | | throw new InvalidOperationException("Selected Tower is null"); |
| | | } |
| | | int sellValue = currentSelectedTower.GetSellLevel(); |
| | | if (LevelManager.instanceExists && sellValue > 0) |
| | | { |
| | | LevelManager.instance.currency.AddCurrency(sellValue); |
| | | currentSelectedTower.Sell(); |
| | | currentSelectedTower.Sell(); |
| | | |
| | | // 从列表中删除Tower. |
| | | delTower(currentSelectedTower); |
| | | } |
| | | // 从列表中删除Tower. |
| | | delTower(currentSelectedTower); |
| | | DeselectTower(); |
| | | } |
| | | |
| | |
| | | { |
| | | return; |
| | | } |
| | | int cost = m_CurrentTower.controller.purchaseCost; |
| | | bool successfulPurchase = LevelManager.instance.currency.TryPurchase(cost); |
| | | if (successfulPurchase) |
| | | { |
| | | PlaceTower(); |
| | | } |
| | | PlaceTower(); |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | CancelGhostPlacement(); |
| | | return; |
| | | } |
| | | int cost = m_CurrentTower.controller.purchaseCost; |
| | | if (zeroCost) |
| | | cost = 0; |
| | | bool successfulPurchase = LevelManager.instance.currency.TryPurchase(cost); |
| | | if (successfulPurchase) |
| | | { |
| | | PlaceGhost(pointer); |
| | | } |
| | | PlaceGhost(pointer); |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | { |
| | | return false; |
| | | } |
| | | return LevelManager.instance.currency.CanAfford(m_CurrentTower.controller.purchaseCost); |
| | | return true; |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | } |
| | | TowerLevel towerLevel = tower.levels[levelOfTower]; |
| | | DisplayText(towerName, tower.towerName); |
| | | DisplayText(description, towerLevel.description); |
| | | DisplayText(dps, towerLevel.GetTowerDps().ToString("f2")); |
| | | DisplayText(health, string.Format("{0}/{1}", tower.configuration.currentHealth, towerLevel.maxHealth)); |
| | | DisplayText(level, (levelOfTower + 1).ToString()); |
| | | DisplayText(dimensions, string.Format("{0}, {1}", tower.dimensions.x, tower.dimensions.y)); |
| | | if (levelOfTower + 1 < tower.levels.Length) |
| | | { |
| | | DisplayText(upgradeCost, tower.levels[levelOfTower + 1].cost.ToString()); |
| | | } |
| | | |
| | | int sellValue = tower.GetSellLevel(levelOfTower); |
| | | DisplayText(sellPrice, sellValue.ToString()); |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | if (towerData.levels.Length > 0) |
| | | { |
| | | TowerLevel firstTower = towerData.levels[0]; |
| | | buttonText.text = firstTower.cost.ToString(); |
| | | towerIcon.sprite = firstTower.levelData.icon; |
| | | } |
| | | else |
| | | { |
| | |
| | | return; |
| | | } |
| | | |
| | | // Enable button |
| | | if (m_Currency.CanAfford(m_Tower.purchaseCost) && !buyButton.interactable) |
| | | { |
| | | buyButton.interactable = true; |
| | | energyIcon.color = energyDefaultColor; |
| | | } |
| | | else if (!m_Currency.CanAfford(m_Tower.purchaseCost) && buyButton.interactable) |
| | | { |
| | | buyButton.interactable = false; |
| | | energyIcon.color = energyInvalidColor; |
| | | } |
| | | // // Enable button |
| | | // if (m_Currency.CanAfford(m_Tower.purchaseCost) && !buyButton.interactable) |
| | | // { |
| | | // buyButton.interactable = true; |
| | | // energyIcon.color = energyDefaultColor; |
| | | // } |
| | | // else if (!m_Currency.CanAfford(m_Tower.purchaseCost) && buyButton.interactable) |
| | | // { |
| | | // buyButton.interactable = false; |
| | | // energyIcon.color = energyInvalidColor; |
| | | // } |
| | | } |
| | | } |
| | | } |
| | |
| | | |
| | | namespace TowerDefense.UI.HUD |
| | | { |
| | | /// <summary> |
| | | /// Controls the UI objects that draw the tower data |
| | | /// </summary> |
| | | [RequireComponent(typeof(Canvas))] |
| | | public class TowerUI : MonoBehaviour |
| | | { |
| | | /// <summary> |
| | | /// The text object for the name |
| | | /// </summary> |
| | | public Text towerName; |
| | | /// <summary> |
| | | /// Controls the UI objects that draw the tower data |
| | | /// </summary> |
| | | [RequireComponent(typeof(Canvas))] |
| | | public class TowerUI : MonoBehaviour |
| | | { |
| | | /// <summary> |
| | | /// The text object for the name |
| | | /// </summary> |
| | | public Text towerName; |
| | | |
| | | /// <summary> |
| | | /// The text object for the description |
| | | /// </summary> |
| | | public Text description; |
| | | |
| | | public Text upgradeDescription; |
| | | /// <summary> |
| | | /// The text object for the description |
| | | /// </summary> |
| | | public Text description; |
| | | |
| | | /// <summary> |
| | | /// The attached sell button |
| | | /// </summary> |
| | | public Button sellButton; |
| | | public Text upgradeDescription; |
| | | |
| | | /// <summary> |
| | | /// The attached upgrade button |
| | | /// </summary> |
| | | public Button upgradeButton; |
| | | /// <summary> |
| | | /// The attached sell button |
| | | /// </summary> |
| | | public Button sellButton; |
| | | |
| | | /// <summary> |
| | | /// Component to display the relevant information of the tower |
| | | /// </summary> |
| | | public TowerInfoDisplay towerInfoDisplay; |
| | | /// <summary> |
| | | /// The attached upgrade button |
| | | /// </summary> |
| | | public Button upgradeButton; |
| | | |
| | | public RectTransform panelRectTransform; |
| | | /// <summary> |
| | | /// Component to display the relevant information of the tower |
| | | /// </summary> |
| | | public TowerInfoDisplay towerInfoDisplay; |
| | | |
| | | public GameObject[] confirmationButtons; |
| | | public RectTransform panelRectTransform; |
| | | |
| | | /// <summary> |
| | | /// The main game camera |
| | | /// </summary> |
| | | protected Camera m_GameCamera; |
| | | public GameObject[] confirmationButtons; |
| | | |
| | | /// <summary> |
| | | /// The current tower to draw |
| | | /// </summary> |
| | | protected Tower m_Tower; |
| | | /// <summary> |
| | | /// The main game camera |
| | | /// </summary> |
| | | protected Camera m_GameCamera; |
| | | |
| | | /// <summary> |
| | | /// The canvas attached to the gameObject |
| | | /// </summary> |
| | | protected Canvas m_Canvas; |
| | | /// <summary> |
| | | /// The current tower to draw |
| | | /// </summary> |
| | | protected Tower m_Tower; |
| | | |
| | | /// <summary> |
| | | /// Draws the tower data on to the canvas,在界面上显示塔防信息,显示操作和信息界面。 |
| | | /// 继续修改,确保其它方面的内容处理。 |
| | | /// </summary> |
| | | /// <param name="towerToShow"> |
| | | /// The tower to gain info from |
| | | /// </param> |
| | | public virtual void Show(Tower towerToShow) |
| | | { |
| | | if (towerToShow == null) |
| | | { |
| | | return; |
| | | } |
| | | m_Tower = towerToShow; |
| | | AdjustPosition(); |
| | | /// <summary> |
| | | /// The canvas attached to the gameObject |
| | | /// </summary> |
| | | protected Canvas m_Canvas; |
| | | |
| | | int sellValue = m_Tower.GetSellLevel(); |
| | | /// |
| | | // TEST COED TO DELETE: |
| | | if( sellButton != null) |
| | | { |
| | | // TEST CODE TO DELETE: |
| | | if( m_Tower != null ) |
| | | GameUI.instance.startDragTower(m_Tower); |
| | | /** 以下代码用于测试合成: |
| | | /// <summary> |
| | | /// Draws the tower data on to the canvas,在界面上显示塔防信息,显示操作和信息界面。 |
| | | /// 继续修改,确保其它方面的内容处理。 |
| | | /// </summary> |
| | | /// <param name="towerToShow"> |
| | | /// The tower to gain info from |
| | | /// </param> |
| | | public virtual void Show(Tower towerToShow) |
| | | { |
| | | if (towerToShow == null) |
| | | { |
| | | return; |
| | | } |
| | | m_Tower = towerToShow; |
| | | AdjustPosition(); |
| | | |
| | | // TEST COED TO DELETE: |
| | | if (sellButton != null) |
| | | { |
| | | // TEST CODE TO DELETE: |
| | | if (m_Tower != null) |
| | | GameUI.instance.startDragTower(m_Tower); |
| | | /** 以下代码用于测试合成: |
| | | if((!m_Tower.isAtMaxLevel) && GameUI.instance.deleteSameLvlTower( m_Tower)) |
| | | { |
| | | GameUI.instance.UpgradeSelectedTower(); |
| | | }*/ |
| | | return; |
| | | } |
| | | else |
| | | { |
| | | if (GameUI.instance.towerInList(m_Tower) ) |
| | | return; |
| | | } |
| | | return; |
| | | } |
| | | else |
| | | { |
| | | if (GameUI.instance.towerInList(m_Tower)) |
| | | return; |
| | | } |
| | | |
| | | m_Canvas.enabled = true; |
| | | m_Canvas.enabled = true; |
| | | |
| | | if (upgradeButton != null) |
| | | { |
| | | upgradeButton.interactable = true; |
| | | bool maxLevel = m_Tower.isAtMaxLevel; |
| | | upgradeButton.gameObject.SetActive(!maxLevel); |
| | | } |
| | | LevelManager.instance.currency.currencyChanged += OnCurrencyChanged; |
| | | towerInfoDisplay.Show(towerToShow); |
| | | foreach (var button in confirmationButtons) |
| | | { |
| | | button.SetActive(false); |
| | | } |
| | | } |
| | | |
| | | /// |
| | | if (sellButton != null) |
| | | { |
| | | sellButton.gameObject.SetActive(sellValue > 0); |
| | | } |
| | | if (upgradeButton != null) |
| | | { |
| | | upgradeButton.interactable = |
| | | LevelManager.instance.currency.CanAfford(m_Tower.GetCostForNextLevel()); |
| | | bool maxLevel = m_Tower.isAtMaxLevel; |
| | | upgradeButton.gameObject.SetActive(!maxLevel); |
| | | if (!maxLevel) |
| | | { |
| | | upgradeDescription.text = |
| | | m_Tower.levels[m_Tower.currentLevel + 1].upgradeDescription.ToUpper(); |
| | | } |
| | | } |
| | | LevelManager.instance.currency.currencyChanged += OnCurrencyChanged; |
| | | towerInfoDisplay.Show(towerToShow); |
| | | foreach (var button in confirmationButtons) |
| | | { |
| | | button.SetActive(false); |
| | | } |
| | | } |
| | | /// <summary> |
| | | /// Hides the tower info UI and the radius visualizer |
| | | /// </summary> |
| | | public virtual void Hide() |
| | | { |
| | | m_Tower = null; |
| | | if (GameUI.instanceExists) |
| | | { |
| | | GameUI.instance.HideRadiusVisualizer(); |
| | | } |
| | | m_Canvas.enabled = false; |
| | | LevelManager.instance.currency.currencyChanged -= OnCurrencyChanged; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// Hides the tower info UI and the radius visualizer |
| | | /// </summary> |
| | | public virtual void Hide() |
| | | { |
| | | m_Tower = null; |
| | | if (GameUI.instanceExists) |
| | | { |
| | | GameUI.instance.HideRadiusVisualizer(); |
| | | } |
| | | m_Canvas.enabled = false; |
| | | LevelManager.instance.currency.currencyChanged -= OnCurrencyChanged; |
| | | } |
| | | /// <summary> |
| | | /// Upgrades the tower through <see cref="GameUI"/> |
| | | /// </summary> |
| | | public void UpgradeButtonClick() |
| | | { |
| | | GameUI.instance.UpgradeSelectedTower(); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// Upgrades the tower through <see cref="GameUI"/> |
| | | /// </summary> |
| | | public void UpgradeButtonClick() |
| | | { |
| | | GameUI.instance.UpgradeSelectedTower(); |
| | | } |
| | | /// <summary> |
| | | /// Sells the tower through <see cref="GameUI"/> |
| | | /// </summary> |
| | | public void SellButtonClick() |
| | | { |
| | | GameUI.instance.SellSelectedTower(); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// Sells the tower through <see cref="GameUI"/> |
| | | /// </summary> |
| | | public void SellButtonClick() |
| | | { |
| | | GameUI.instance.SellSelectedTower(); |
| | | } |
| | | /// <summary> |
| | | /// Get the text attached to the buttons |
| | | /// </summary> |
| | | protected virtual void Awake() |
| | | { |
| | | m_Canvas = GetComponent<Canvas>(); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// Get the text attached to the buttons |
| | | /// </summary> |
| | | protected virtual void Awake() |
| | | { |
| | | m_Canvas = GetComponent<Canvas>(); |
| | | } |
| | | /// <summary> |
| | | /// Fires when tower is selected/deselected |
| | | /// </summary> |
| | | /// <param name="newTower"></param> |
| | | protected virtual void OnUISelectionChanged(Tower newTower) |
| | | { |
| | | if (newTower != null) |
| | | { |
| | | Show(newTower); |
| | | } |
| | | else |
| | | { |
| | | Hide(); |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// Fires when tower is selected/deselected |
| | | /// </summary> |
| | | /// <param name="newTower"></param> |
| | | protected virtual void OnUISelectionChanged(Tower newTower) |
| | | { |
| | | if (newTower != null) |
| | | { |
| | | Show(newTower); |
| | | } |
| | | else |
| | | { |
| | | Hide(); |
| | | } |
| | | } |
| | | /// <summary> |
| | | /// Subscribe to mouse button action |
| | | /// </summary> |
| | | protected virtual void Start() |
| | | { |
| | | m_GameCamera = Camera.main; |
| | | m_Canvas.enabled = false; |
| | | if (GameUI.instanceExists) |
| | | { |
| | | GameUI.instance.selectionChanged += OnUISelectionChanged; |
| | | GameUI.instance.stateChanged += OnGameUIStateChanged; |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// Subscribe to mouse button action |
| | | /// </summary> |
| | | protected virtual void Start() |
| | | { |
| | | m_GameCamera = Camera.main; |
| | | m_Canvas.enabled = false; |
| | | if (GameUI.instanceExists) |
| | | { |
| | | GameUI.instance.selectionChanged += OnUISelectionChanged; |
| | | GameUI.instance.stateChanged += OnGameUIStateChanged; |
| | | } |
| | | } |
| | | /// <summary> |
| | | /// Adjust position when the camera moves |
| | | /// </summary> |
| | | protected virtual void Update() |
| | | { |
| | | AdjustPosition(); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// Adjust position when the camera moves |
| | | /// </summary> |
| | | protected virtual void Update() |
| | | { |
| | | AdjustPosition(); |
| | | } |
| | | /// <summary> |
| | | /// Unsubscribe from currencyChanged |
| | | /// </summary> |
| | | protected virtual void OnDisable() |
| | | { |
| | | if (LevelManager.instanceExists) |
| | | { |
| | | LevelManager.instance.currency.currencyChanged -= OnCurrencyChanged; |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// Unsubscribe from currencyChanged |
| | | /// </summary> |
| | | protected virtual void OnDisable() |
| | | { |
| | | if (LevelManager.instanceExists) |
| | | { |
| | | LevelManager.instance.currency.currencyChanged -= OnCurrencyChanged; |
| | | } |
| | | } |
| | | /// <summary> |
| | | /// Adjust the position of the UI |
| | | /// </summary> |
| | | protected void AdjustPosition() |
| | | { |
| | | if (m_Tower == null) |
| | | { |
| | | return; |
| | | } |
| | | Vector3 point = m_GameCamera.WorldToScreenPoint(m_Tower.position); |
| | | point.z = 0; |
| | | panelRectTransform.transform.position = point; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// Adjust the position of the UI |
| | | /// </summary> |
| | | protected void AdjustPosition() |
| | | { |
| | | if (m_Tower == null) |
| | | { |
| | | return; |
| | | } |
| | | Vector3 point = m_GameCamera.WorldToScreenPoint(m_Tower.position); |
| | | point.z = 0; |
| | | panelRectTransform.transform.position = point; |
| | | } |
| | | /// <summary> |
| | | /// Fired when the <see cref="GameUI"/> state changes |
| | | /// If the new state is <see cref="GameUI.State.GameOver"/> we need to hide the <see cref="TowerUI"/> |
| | | /// </summary> |
| | | /// <param name="oldState">The previous state</param> |
| | | /// <param name="newState">The state to transition to</param> |
| | | protected void OnGameUIStateChanged(GameUI.State oldState, GameUI.State newState) |
| | | { |
| | | if (newState == GameUI.State.GameOver) |
| | | { |
| | | Hide(); |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// Fired when the <see cref="GameUI"/> state changes |
| | | /// If the new state is <see cref="GameUI.State.GameOver"/> we need to hide the <see cref="TowerUI"/> |
| | | /// </summary> |
| | | /// <param name="oldState">The previous state</param> |
| | | /// <param name="newState">The state to transition to</param> |
| | | protected void OnGameUIStateChanged(GameUI.State oldState, GameUI.State newState) |
| | | { |
| | | if (newState == GameUI.State.GameOver) |
| | | { |
| | | Hide(); |
| | | } |
| | | } |
| | | /// <summary> |
| | | /// Check if player can afford upgrade on currency changed |
| | | /// </summary> |
| | | void OnCurrencyChanged() |
| | | { |
| | | if (m_Tower != null && upgradeButton != null) |
| | | { |
| | | upgradeButton.interactable = true; |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// Check if player can afford upgrade on currency changed |
| | | /// </summary> |
| | | void OnCurrencyChanged() |
| | | { |
| | | if (m_Tower != null && upgradeButton != null) |
| | | { |
| | | upgradeButton.interactable = |
| | | LevelManager.instance.currency.CanAfford(m_Tower.GetCostForNextLevel()); |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// Unsubscribe from GameUI selectionChanged and stateChanged |
| | | /// </summary> |
| | | void OnDestroy() |
| | | { |
| | | if (GameUI.instanceExists) |
| | | { |
| | | GameUI.instance.selectionChanged -= OnUISelectionChanged; |
| | | GameUI.instance.stateChanged -= OnGameUIStateChanged; |
| | | } |
| | | } |
| | | } |
| | | /// <summary> |
| | | /// Unsubscribe from GameUI selectionChanged and stateChanged |
| | | /// </summary> |
| | | void OnDestroy() |
| | | { |
| | | if (GameUI.instanceExists) |
| | | { |
| | | GameUI.instance.selectionChanged -= OnUISelectionChanged; |
| | | GameUI.instance.stateChanged -= OnGameUIStateChanged; |
| | | } |
| | | } |
| | | } |
| | | } |
| | |
| | | [["1","低级火灵之力",[2,1],[1,10,0],"-1","增加全体火精灵10%攻击力","6","8",10001,1,"99"],["2","低级水灵之力",[2,2],[1,20,0],-1,"增加全体水精灵20%攻击力",6,8,10002,1,"99"],["3","低级木灵之力",[2,3],[1,15,0],-1,"增加全体木精灵15%攻击力",6,8,10003,1,"99"],["4","攻击力增加",[1,0],[1,8,0],"-1","增加全体8%攻击力","0",5,"10005","1","99"],["5","意外收获",[0],[2,200,0],0,"增加200金币","0","5","10007","1","99"],["6","精灵魔盒",[0],[3,2,200],0,"随机获得一个2级精灵","2","4",10006,"1","10"],["7","暴击增加",[1,0],[5,50,0],-1,"全体暴击率+5%","0","3","10021","1","3"],["8","爆伤增加",[1,0],[6,80,0],-1,"全体暴击伤害+8%","0","3","10022","1","2"],["9","火灵之力",[2,1],[1,15,0],-1,"增加全体火精灵15%攻击力",9,12,10001,2,"99"],["10","水灵之力",[2,2],[1,40,0],-1,"增加全体水精灵40%攻击力",9,12,10002,2,"99"],["11","木灵之力",[2,3],[1,30,0],-1,"增加全体木精灵30%攻击力",9,12,10003,2,"99"],["12","精灵之力",[1,0],[1,50,0],2,"2波增加全体精灵50%攻击力","99",99,"10005",2,1],["13","飞来横财",[0],[2,400,0],0,"增加400金币","6","8","10008","2","99"],["14","超级精灵魔盒",[0],[3,3,400],0,"随机获得一个3级精灵","5","7",10006,"2","10"],["15","暴击增加",[1,0],[5,100,0],-1,"全体暴击率+10%","4","7","10021","2","3"],["16","爆伤增加",[1,0],[6,150,0],-1,"全体暴击伤害+15%","4","7","10022","2","2"],["17","攻速增加",[1,0],[4,0.1,0.5],"-1","全体攻速+10%","0","5","10023","2","1"],["18","弹夹扩容",[3,109],[7,2,0],-1,"玉米精灵高能子弹+1","6",99,"10016","2","1"],["19","爆裂狂怒",[3,101],[9,7,0],-1,"火鸟精灵充能后攻速+35%","6",99,"10026","2","1"],["20","高级火灵之力",[2,1],[1,20,0],-1,"增加全体火精灵20%攻击力",13,"16","10001",3,"99"],["21","高级水灵之力",[2,2],[1,55,0],-1,"增加全体水精灵55%攻击力",13,"16","10002",3,"99"],["22","高级木灵之力",[2,3],[1,40,0],-1,"增加全体木精灵40%攻击力",13,"16","10003",3,"99"],["23","特级火灵之力",[2,1],[1,30,0],-1,"增加全体火精灵30%攻击力","17","99","10001","4","0"],["24","特级水灵之力",[2,2],[1,70,0],-1,"增加全体水精灵70%攻击力","17","99","10002","4","0"],["25","特级木灵之力",[2,3],[1,60,0],-1,"增加全体木精灵60%攻击力","17","99","10003","4","0"],["26","狂暴之力",[1,0],[1,65,0],2,"2波内增加全体精灵65%攻击力","99",99,10005,3,1],["27","攻速增加_水",[2,2],[4,0.3,0.5],-1,"水精灵攻速+30%","6",99,"10019",3,"2"],["28","攻速增加_木",[2,3],[4,0.2,0.5],-1,"木精灵攻速+20%",6,99,"10017",3,"2"],["29","暴击_木",[3,109],[5,300,0],-1,"木系精灵暴击率+30%",6,99,"10015",3,"2"],["30","暴怒_木",[3,109],[6,350,0],-1,"木系精灵暴击伤害+35%",6,99,"10014",3,"2"],["31","暴击_火",[3,101],[5,100,0],-1,"火系精灵暴击率+10%",6,99,"10012",3,"3"],["32","暴怒_火",[3,101],[6,200,0],-1,"火系精灵暴击伤害+20%",6,99,"10011",3,"2"],["33","超级弹夹",[3,109],[7,3,0],-1,"玉米精灵高能子弹+2","9",99,"10016","4","1"],["34","超级爆裂狂怒",[3,101],[9,9,0],-1,"火鸟精灵充能后攻速+60%","9",99,"10026","4","1"],["35","技能提升",[4,0],[10,1,0],-1,"全体技能等级+1",6,99,"10005",3,"4"],["36","快速蓄能",[3,109],[11,0.3,0.8],-1,"玉米精灵蓄力时间-30%","7",99,"10018","4","3"],["37","中大奖",[0],[2,800,0],0,"增加800金币","9",99,"10010","3","99"],["38","特级精灵魔盒",[0],[3,4,800],0,"随机获得一个4级精灵","11","99","10006","4","2"]] |
| | | [["1","低级火灵之力",[2,1],[1,10,0],"-1","增加全体火精灵10%攻击力","6","8",10001,1,"99"],["2","低级水灵之力",[2,2],[1,20,0],-1,"增加全体水精灵20%攻击力",6,8,10002,1,"99"],["3","低级木灵之力",[2,3],[1,15,0],-1,"增加全体木精灵15%攻击力",6,8,10003,1,"99"],["4","攻击力增加",[1,0],[1,8,0],"-1","增加全体8%攻击力","0",5,"10005","1","99"],["5","意外收获",[0],[2,200,0],0,"增加200金币","0","5","10007","1","99"],["6","精灵魔盒",[0],[3,2,200],0,"随机获得一个2级精灵","2","4",10006,"1","10"],["7","暴击增加",[1,0],[5,50,0],-1,"全体暴击率+5%","0","3","10021","1","3"],["8","爆伤增加",[1,0],[6,80,0],-1,"全体暴击伤害+8%","0","3","10022","1","2"],["9","火灵之力",[2,1],[1,15,0],-1,"增加全体火精灵15%攻击力",9,12,10001,2,"99"],["10","水灵之力",[2,2],[1,40,0],-1,"增加全体水精灵40%攻击力",9,12,10002,2,"99"],["11","木灵之力",[2,3],[1,30,0],-1,"增加全体木精灵30%攻击力",9,12,10003,2,"99"],["12","精灵之力",[1,0],[1,50,0],2,"2波增加全体精灵50%攻击力","99",99,"10005",2,1],["13","飞来横财",[0],[2,400,0],0,"增加400金币","6","8","10008","2","99"],["14","超级精灵魔盒",[0],[3,3,400],0,"随机获得一个3级精灵","5","7",10006,"2","10"],["15","暴击增加",[1,0],[5,100,0],-1,"全体暴击率+10%","4","7","10021","2","3"],["16","爆伤增加",[1,0],[6,150,0],-1,"全体暴击伤害+15%","4","7","10022","2","2"],["17","攻速增加",[1,0],[4,0.1,0.5],"-1","全体攻速+10%","0","5","10023","2","1"],["18","弹夹扩容",[3,109],[7,2,0],-1,"玉米精灵高能子弹+1","6",99,"10016","2","1"],["19","爆裂狂怒",[3,101],[9,7,0],-1,"火鸟精灵充能后攻速+35%","6",99,"10026","2","1"],["20","高级火灵之力",[2,1],[1,20,0],-1,"增加全体火精灵20%攻击力",13,"16","10001",3,"99"],["21","高级水灵之力",[2,2],[1,55,0],-1,"增加全体水精灵55%攻击力",13,"16","10002",3,"99"],["22","高级木灵之力",[2,3],[1,40,0],-1,"增加全体木精灵40%攻击力",13,"16","10003",3,"99"],["23","特级火灵之力",[2,1],[1,30,0],-1,"增加全体火精灵30%攻击力","17","99","10001","4","99"],["24","特级水灵之力",[2,2],[1,70,0],-1,"增加全体水精灵70%攻击力","17","99","10002","4","99"],["25","特级木灵之力",[2,3],[1,60,0],-1,"增加全体木精灵60%攻击力","17","99","10003","4","99"],["26","狂暴之力",[1,0],[1,65,0],2,"2波内增加全体精灵65%攻击力","99",99,10005,3,1],["27","攻速增加_水",[2,2],[4,0.3,0.5],-1,"水精灵攻速+30%","6",99,"10019",3,"2"],["28","攻速增加_木",[2,3],[4,0.2,0.5],-1,"木精灵攻速+20%",6,99,"10017",3,"2"],["29","暴击_木",[3,109],[5,300,0],-1,"木系精灵暴击率+30%",6,99,"10015",3,"2"],["30","暴怒_木",[3,109],[6,350,0],-1,"木系精灵暴击伤害+35%",6,99,"10014",3,"2"],["31","暴击_火",[3,101],[5,100,0],-1,"火系精灵暴击率+10%",6,99,"10012",3,"3"],["32","暴怒_火",[3,101],[6,200,0],-1,"火系精灵暴击伤害+20%",6,99,"10011",3,"2"],["33","超级弹夹",[3,109],[7,3,0],-1,"玉米精灵高能子弹+2","9",99,"10016","4","1"],["34","超级爆裂狂怒",[3,101],[9,9,0],-1,"火鸟精灵充能后攻速+60%","9",99,"10026","4","1"],["35","技能提升",[4,0],[10,1,0],-1,"全体技能等级+1",6,99,"10005",3,"4"],["36","快速蓄能",[3,109],[11,0.3,0.8],-1,"玉米精灵蓄力时间-30%","7",99,"10018","4","3"],["37","中大奖",[0],[2,800,0],0,"增加800金币","9",99,"10010","3","99"],["38","特级精灵魔盒",[0],[3,4,800],0,"随机获得一个4级精灵","11","99","10006","4","2"]] |