diff --git a/Assets/Models.meta b/Assets/Models.meta new file mode 100644 index 0000000..2e4a3ef --- /dev/null +++ b/Assets/Models.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: da64e159659706174b961afd273fd7a9 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Models/1ShootTower2.fbx b/Assets/Models/1ShootTower2.fbx new file mode 100644 index 0000000..cb1517c Binary files /dev/null and b/Assets/Models/1ShootTower2.fbx differ diff --git a/Assets/Models/1ShootTower2.fbx.meta b/Assets/Models/1ShootTower2.fbx.meta new file mode 100644 index 0000000..198f782 --- /dev/null +++ b/Assets/Models/1ShootTower2.fbx.meta @@ -0,0 +1,109 @@ +fileFormatVersion: 2 +guid: eb5e13df78999ef878da1db5c63224e2 +ModelImporter: + serializedVersion: 22200 + internalIDToNameTable: [] + externalObjects: {} + materials: + materialImportMode: 2 + materialName: 0 + materialSearch: 1 + materialLocation: 1 + animations: + legacyGenerateAnimations: 4 + bakeSimulation: 0 + resampleCurves: 1 + optimizeGameObjects: 0 + removeConstantScaleCurves: 0 + motionNodeName: + rigImportErrors: + rigImportWarnings: + animationImportErrors: + animationImportWarnings: + animationRetargetingWarnings: + animationDoRetargetingWarnings: 0 + importAnimatedCustomProperties: 0 + importConstraints: 0 + animationCompression: 1 + animationRotationError: 0.5 + animationPositionError: 0.5 + animationScaleError: 0.5 + animationWrapMode: 0 + extraExposedTransformPaths: [] + extraUserProperties: [] + clipAnimations: [] + isReadable: 0 + meshes: + lODScreenPercentages: [] + globalScale: 0.1 + meshCompression: 0 + addColliders: 0 + useSRGBMaterialColor: 1 + sortHierarchyByName: 1 + importPhysicalCameras: 1 + importVisibility: 1 + importBlendShapes: 1 + importCameras: 1 + importLights: 1 + nodeNameCollisionStrategy: 1 + fileIdsGeneration: 2 + swapUVChannels: 0 + generateSecondaryUV: 0 + useFileUnits: 1 + keepQuads: 0 + weldVertices: 1 + bakeAxisConversion: 1 + preserveHierarchy: 0 + skinWeightsMode: 0 + maxBonesPerVertex: 4 + minBoneWeight: 0.001 + optimizeBones: 1 + meshOptimizationFlags: -1 + indexFormat: 0 + secondaryUVAngleDistortion: 8 + secondaryUVAreaDistortion: 15.000001 + secondaryUVHardAngle: 88 + secondaryUVMarginMethod: 1 + secondaryUVMinLightmapResolution: 40 + secondaryUVMinObjectScale: 1 + secondaryUVPackMargin: 4 + useFileScale: 1 + strictVertexDataChecks: 0 + tangentSpace: + normalSmoothAngle: 60 + normalImportMode: 0 + tangentImportMode: 3 + normalCalculationMode: 4 + legacyComputeAllNormalsFromSmoothingGroupsWhenMeshHasBlendShapes: 0 + blendShapeNormalImportMode: 1 + normalSmoothingSource: 0 + referencedClips: [] + importAnimation: 1 + humanDescription: + serializedVersion: 3 + human: [] + skeleton: [] + armTwist: 0.5 + foreArmTwist: 0.5 + upperLegTwist: 0.5 + legTwist: 0.5 + armStretch: 0.05 + legStretch: 0.05 + feetSpacing: 0 + globalScale: 0.1 + rootMotionBoneName: + hasTranslationDoF: 0 + hasExtraRoot: 0 + skeletonHasParents: 1 + lastHumanDescriptionAvatarSource: {instanceID: 0} + autoGenerateAvatarMappingIfUnspecified: 1 + animationType: 2 + humanoidOversampling: 1 + avatarSetup: 0 + addHumanoidExtraRootOnlyWhenUsingAvatar: 1 + importBlendShapeDeformPercent: 1 + remapMaterialsIfMaterialImportModeIsNone: 0 + additionalBone: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Prefabs/Towers/BaseTower.prefab b/Assets/Prefabs/Towers/BaseTower.prefab index 473ac0a..4764fc0 100644 --- a/Assets/Prefabs/Towers/BaseTower.prefab +++ b/Assets/Prefabs/Towers/BaseTower.prefab @@ -1,191 +1,70 @@ %YAML 1.1 %TAG !u! tag:unity3d.com,2011: ---- !u!1 &4241178655744724118 -GameObject: +--- !u!1001 &61646009847259292 +PrefabInstance: m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 7523567070824087546} - - component: {fileID: 5439060163005320995} - - component: {fileID: 4540713304376874692} - - component: {fileID: 6795469177534142411} - m_Layer: 0 - m_Name: BaseTower - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &7523567070824087546 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 4241178655744724118} 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: 2145028294596449649} - m_Father: {fileID: 0} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!33 &5439060163005320995 -MeshFilter: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 4241178655744724118} - m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} ---- !u!23 &4540713304376874692 -MeshRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 4241178655744724118} - m_Enabled: 1 - m_CastShadows: 1 - m_ReceiveShadows: 1 - m_DynamicOccludee: 1 - m_StaticShadowCaster: 0 - m_MotionVectors: 1 - m_LightProbeUsage: 1 - m_ReflectionProbeUsage: 1 - m_RayTracingMode: 2 - m_RayTraceProcedural: 0 - m_RenderingLayerMask: 1 - m_RendererPriority: 0 - m_Materials: - - {fileID: 2100000, guid: 31321ba15b8f8eb4c954353edc038b1d, type: 2} - m_StaticBatchInfo: - firstSubMesh: 0 - subMeshCount: 0 - m_StaticBatchRoot: {fileID: 0} - m_ProbeAnchor: {fileID: 0} - m_LightProbeVolumeOverride: {fileID: 0} - m_ScaleInLightmap: 1 - m_ReceiveGI: 1 - m_PreserveUVs: 0 - m_IgnoreNormalsForChartDetection: 0 - m_ImportantGI: 0 - m_StitchLightmapSeams: 1 - m_SelectedEditorRenderState: 3 - m_MinimumChartSize: 4 - m_AutoUVMaxDistance: 0.5 - m_AutoUVMaxAngle: 89 - m_LightmapParameters: {fileID: 0} - m_SortingLayerID: 0 - m_SortingLayer: 0 - m_SortingOrder: 0 - m_AdditionalVertexStreams: {fileID: 0} ---- !u!65 &6795469177534142411 -BoxCollider: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 4241178655744724118} - m_Material: {fileID: 0} - m_IncludeLayers: - serializedVersion: 2 - m_Bits: 0 - m_ExcludeLayers: - serializedVersion: 2 - m_Bits: 0 - m_LayerOverridePriority: 0 - m_IsTrigger: 0 - m_ProvidesContacts: 0 - m_Enabled: 1 - serializedVersion: 3 - m_Size: {x: 1, y: 1, z: 1} - m_Center: {x: 0, y: 0, z: 0} ---- !u!1 &4398724951968777500 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 2145028294596449649} - - component: {fileID: 4393199539658335282} - - component: {fileID: 3019045528950232983} - m_Layer: 0 - m_Name: UpIndicator - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &2145028294596449649 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 4398724951968777500} - serializedVersion: 2 - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 0.625, z: 0} - m_LocalScale: {x: 0.25, y: 0.25, z: 0.25} - m_ConstrainProportionsScale: 1 - m_Children: [] - m_Father: {fileID: 7523567070824087546} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!23 &4393199539658335282 -MeshRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 4398724951968777500} - m_Enabled: 1 - m_CastShadows: 1 - m_ReceiveShadows: 1 - m_DynamicOccludee: 1 - m_StaticShadowCaster: 0 - m_MotionVectors: 1 - m_LightProbeUsage: 1 - m_ReflectionProbeUsage: 1 - m_RayTracingMode: 2 - m_RayTraceProcedural: 0 - m_RenderingLayerMask: 1 - m_RendererPriority: 0 - m_Materials: - - {fileID: 2100000, guid: e3bc062a72e91a9259a02cfbccc0bacb, type: 2} - m_StaticBatchInfo: - firstSubMesh: 0 - subMeshCount: 0 - m_StaticBatchRoot: {fileID: 0} - m_ProbeAnchor: {fileID: 0} - m_LightProbeVolumeOverride: {fileID: 0} - m_ScaleInLightmap: 1 - m_ReceiveGI: 1 - m_PreserveUVs: 0 - m_IgnoreNormalsForChartDetection: 0 - m_ImportantGI: 0 - m_StitchLightmapSeams: 1 - m_SelectedEditorRenderState: 3 - m_MinimumChartSize: 4 - m_AutoUVMaxDistance: 0.5 - m_AutoUVMaxAngle: 89 - m_LightmapParameters: {fileID: 0} - m_SortingLayerID: 0 - m_SortingLayer: 0 - m_SortingOrder: 0 - m_AdditionalVertexStreams: {fileID: 0} ---- !u!33 &3019045528950232983 -MeshFilter: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 4398724951968777500} - m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} + m_Modification: + serializedVersion: 3 + m_TransformParent: {fileID: 0} + m_Modifications: + - target: {fileID: -8679921383154817045, guid: eb5e13df78999ef878da1db5c63224e2, + type: 3} + propertyPath: m_LocalPosition.x + value: -2.74387 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: eb5e13df78999ef878da1db5c63224e2, + type: 3} + propertyPath: m_LocalPosition.y + value: 0.08719492 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: eb5e13df78999ef878da1db5c63224e2, + type: 3} + propertyPath: m_LocalPosition.z + value: 3.3228698 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: eb5e13df78999ef878da1db5c63224e2, + type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: eb5e13df78999ef878da1db5c63224e2, + type: 3} + propertyPath: m_LocalRotation.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: eb5e13df78999ef878da1db5c63224e2, + type: 3} + propertyPath: m_LocalRotation.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: eb5e13df78999ef878da1db5c63224e2, + type: 3} + propertyPath: m_LocalRotation.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: eb5e13df78999ef878da1db5c63224e2, + type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: eb5e13df78999ef878da1db5c63224e2, + type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: eb5e13df78999ef878da1db5c63224e2, + type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 919132149155446097, guid: eb5e13df78999ef878da1db5c63224e2, + type: 3} + propertyPath: m_Name + value: 1ShootTower2 (1) + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_RemovedGameObjects: [] + m_AddedGameObjects: [] + m_AddedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: eb5e13df78999ef878da1db5c63224e2, type: 3} diff --git a/Assets/Prefabs/Towers/BaseTower.prefab.meta b/Assets/Prefabs/Towers/BaseTower.prefab.meta index e42d5d4..031dca8 100644 --- a/Assets/Prefabs/Towers/BaseTower.prefab.meta +++ b/Assets/Prefabs/Towers/BaseTower.prefab.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: c309e2ab8a7e17f049cee02d2d5e1af3 +guid: f54a14318952c90c5b47a300aedb0d15 PrefabImporter: externalObjects: {} userData: diff --git a/Assets/Prefabs/Towers/Turret.prefab b/Assets/Prefabs/Towers/Turret.prefab index 684eeeb..88c5ed2 100644 --- a/Assets/Prefabs/Towers/Turret.prefab +++ b/Assets/Prefabs/Towers/Turret.prefab @@ -1,6 +1,6 @@ %YAML 1.1 %TAG !u! tag:unity3d.com,2011: ---- !u!1 &3083473288927039800 +--- !u!1 &1909060460904820462 GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} @@ -8,9 +8,9 @@ GameObject: m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - - component: {fileID: 4144966226015051435} - - component: {fileID: 3224375042761175994} - - component: {fileID: 72007931888250727} + - component: {fileID: 3688593234855359137} + - component: {fileID: 7215452495559205732} + - component: {fileID: 8981486734084153558} m_Layer: 0 m_Name: HorizontalArc m_TagString: Untagged @@ -18,30 +18,30 @@ GameObject: m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 ---- !u!4 &4144966226015051435 +--- !u!4 &3688593234855359137 Transform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 3083473288927039800} + m_GameObject: {fileID: 1909060460904820462} 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: 5637138106755445514} - m_Father: {fileID: 6499929602381336473} + - {fileID: 4562397451506195939} + m_Father: {fileID: 9116936080776508834} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!120 &3224375042761175994 +--- !u!120 &7215452495559205732 LineRenderer: serializedVersion: 2 m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 3083473288927039800} + m_GameObject: {fileID: 1909060460904820462} m_Enabled: 1 m_CastShadows: 1 m_ReceiveShadows: 1 @@ -136,13 +136,13 @@ LineRenderer: m_UseWorldSpace: 1 m_Loop: 0 m_ApplyActiveColorSpace: 1 ---- !u!114 &72007931888250727 +--- !u!114 &8981486734084153558 MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 3083473288927039800} + m_GameObject: {fileID: 1909060460904820462} m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: 11500000, guid: 907145a413a8aab36826e850743ffdcc, type: 3} @@ -151,11 +151,11 @@ MonoBehaviour: orientation: 0 samples: 15 visualRadius: 1 - knob: {fileID: 6989781039509307755} + knob: {fileID: 8756968480882234867} knobSensitiviy: 1 moveKnobAxisName: Mouse X rotationMinMax: {x: -30, y: 30} ---- !u!1 &4511371932741949226 +--- !u!1 &2485007193584062128 GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} @@ -163,9 +163,247 @@ GameObject: m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - - component: {fileID: 2685035597097927690} - - component: {fileID: 3193646361492154326} - - component: {fileID: 5640598242552733345} + - component: {fileID: 1134124277600307769} + - component: {fileID: 5737168580623661280} + - component: {fileID: 432796252682377629} + - component: {fileID: 3370533879401949812} + - component: {fileID: 1398471167256814047} + m_Layer: 0 + m_Name: SliderKnob + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1134124277600307769 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2485007193584062128} + serializedVersion: 2 + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0.000000070586, y: 0.000000017498, z: 0.843} + m_LocalScale: {x: 0.1, y: 0.1, z: 0.1} + m_ConstrainProportionsScale: 1 + m_Children: [] + m_Father: {fileID: 4508182228569071021} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!23 &5737168580623661280 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2485007193584062128} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 1fb12e769af8dfc4b9c47b291e1da192, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!33 &432796252682377629 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2485007193584062128} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!64 &3370533879401949812 +MeshCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2485007193584062128} + m_Material: {fileID: 0} + m_IncludeLayers: + serializedVersion: 2 + m_Bits: 0 + m_ExcludeLayers: + serializedVersion: 2 + m_Bits: 0 + m_LayerOverridePriority: 0 + m_IsTrigger: 0 + m_ProvidesContacts: 0 + m_Enabled: 1 + serializedVersion: 5 + m_Convex: 0 + m_CookingOptions: 30 + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!114 &1398471167256814047 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2485007193584062128} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 9998882d4b72010a9b0ca2d8bd35835e, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!1 &3770528383299556987 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 4562397451506195939} + - component: {fileID: 1552403747463715071} + - component: {fileID: 271800776993535811} + - component: {fileID: 1616640625290415239} + - component: {fileID: 8756968480882234867} + m_Layer: 0 + m_Name: SliderKnob + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &4562397451506195939 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3770528383299556987} + serializedVersion: 2 + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0.843} + m_LocalScale: {x: 0.1, y: 0.1, z: 0.1} + m_ConstrainProportionsScale: 1 + m_Children: [] + m_Father: {fileID: 3688593234855359137} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!23 &1552403747463715071 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3770528383299556987} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 1fb12e769af8dfc4b9c47b291e1da192, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!33 &271800776993535811 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3770528383299556987} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!64 &1616640625290415239 +MeshCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3770528383299556987} + m_Material: {fileID: 0} + m_IncludeLayers: + serializedVersion: 2 + m_Bits: 0 + m_ExcludeLayers: + serializedVersion: 2 + m_Bits: 0 + m_LayerOverridePriority: 0 + m_IsTrigger: 0 + m_ProvidesContacts: 0 + m_Enabled: 1 + serializedVersion: 5 + m_Convex: 0 + m_CookingOptions: 30 + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!114 &8756968480882234867 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3770528383299556987} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 9998882d4b72010a9b0ca2d8bd35835e, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!1 &8350726662087383414 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 4508182228569071021} + - component: {fileID: 1366289561210151836} + - component: {fileID: 5247639431516572416} m_Layer: 0 m_Name: VerticalArc m_TagString: Untagged @@ -173,30 +411,30 @@ GameObject: m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 ---- !u!4 &2685035597097927690 +--- !u!4 &4508182228569071021 Transform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 4511371932741949226} + m_GameObject: {fileID: 8350726662087383414} serializedVersion: 2 - m_LocalRotation: {x: -0.7071068, y: 0, z: 0, w: 0.7071068} - m_LocalPosition: {x: 0, y: 0.75, z: 0.1} + 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: 8705600569309606266} - m_Father: {fileID: 6499929602381336473} - m_LocalEulerAnglesHint: {x: -90, y: 0, z: 0} ---- !u!120 &3193646361492154326 + - {fileID: 1134124277600307769} + m_Father: {fileID: 9116936080776508834} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!120 &1366289561210151836 LineRenderer: serializedVersion: 2 m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 4511371932741949226} + m_GameObject: {fileID: 8350726662087383414} m_Enabled: 1 m_CastShadows: 1 m_ReceiveShadows: 1 @@ -291,13 +529,13 @@ LineRenderer: m_UseWorldSpace: 1 m_Loop: 0 m_ApplyActiveColorSpace: 1 ---- !u!114 &5640598242552733345 +--- !u!114 &5247639431516572416 MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 4511371932741949226} + m_GameObject: {fileID: 8350726662087383414} m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: 11500000, guid: 907145a413a8aab36826e850743ffdcc, type: 3} @@ -306,11 +544,11 @@ MonoBehaviour: orientation: 1 samples: 15 visualRadius: 1 - knob: {fileID: 319728215962205379} + knob: {fileID: 1398471167256814047} knobSensitiviy: 1 moveKnobAxisName: Mouse Y rotationMinMax: {x: -30, y: 30} ---- !u!1 &5590613211210629988 +--- !u!1 &8708866392971799934 GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} @@ -318,159 +556,52 @@ GameObject: m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - - component: {fileID: 8231444434154675001} - - component: {fileID: 3249777024242727896} - - component: {fileID: 7248559923621457761} - - component: {fileID: 8492018035124418673} + - component: {fileID: 2141594701022449211} + - component: {fileID: 3987931586699850031} m_Layer: 0 - m_Name: Barrel + m_Name: TrajectoryLine m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 ---- !u!4 &8231444434154675001 +--- !u!4 &2141594701022449211 Transform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 5590613211210629988} + m_GameObject: {fileID: 8708866392971799934} serializedVersion: 2 m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 0.75, z: 0} + m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} m_ConstrainProportionsScale: 0 m_Children: [] - m_Father: {fileID: 6499929602381336473} + m_Father: {fileID: 9116936080776508834} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!33 &3249777024242727896 -MeshFilter: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 5590613211210629988} - m_Mesh: {fileID: 10206, guid: 0000000000000000e000000000000000, type: 0} ---- !u!23 &7248559923621457761 -MeshRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 5590613211210629988} - m_Enabled: 0 - m_CastShadows: 1 - m_ReceiveShadows: 1 - m_DynamicOccludee: 1 - m_StaticShadowCaster: 0 - m_MotionVectors: 1 - m_LightProbeUsage: 1 - m_ReflectionProbeUsage: 1 - m_RayTracingMode: 2 - m_RayTraceProcedural: 0 - m_RenderingLayerMask: 1 - m_RendererPriority: 0 - m_Materials: - - {fileID: 2100000, guid: 31321ba15b8f8eb4c954353edc038b1d, type: 2} - m_StaticBatchInfo: - firstSubMesh: 0 - subMeshCount: 0 - m_StaticBatchRoot: {fileID: 0} - m_ProbeAnchor: {fileID: 0} - m_LightProbeVolumeOverride: {fileID: 0} - m_ScaleInLightmap: 1 - m_ReceiveGI: 1 - m_PreserveUVs: 0 - m_IgnoreNormalsForChartDetection: 0 - m_ImportantGI: 0 - m_StitchLightmapSeams: 1 - m_SelectedEditorRenderState: 3 - m_MinimumChartSize: 4 - m_AutoUVMaxDistance: 0.5 - m_AutoUVMaxAngle: 89 - m_LightmapParameters: {fileID: 0} - m_SortingLayerID: 0 - m_SortingLayer: 0 - m_SortingOrder: 0 - m_AdditionalVertexStreams: {fileID: 0} ---- !u!65 &8492018035124418673 -BoxCollider: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 5590613211210629988} - m_Material: {fileID: 0} - m_IncludeLayers: - serializedVersion: 2 - m_Bits: 0 - m_ExcludeLayers: - serializedVersion: 2 - m_Bits: 0 - m_LayerOverridePriority: 0 - m_IsTrigger: 0 - m_ProvidesContacts: 0 - m_Enabled: 0 - serializedVersion: 3 - m_Size: {x: 0.99999976, y: 1, z: 0.99999976} - m_Center: {x: -7.1054274e-15, y: 0, z: 0.000000059604638} ---- !u!1 &6053249415262728388 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 8705600569309606266} - - component: {fileID: 3265041720031347224} - - component: {fileID: 5182623784987730361} - - component: {fileID: 9197055104184844621} - - component: {fileID: 319728215962205379} - m_Layer: 0 - m_Name: SliderKnob - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &8705600569309606266 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 6053249415262728388} +--- !u!120 &3987931586699850031 +LineRenderer: serializedVersion: 2 - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0.000000070586, y: 0.000000017498, z: 0.843} - m_LocalScale: {x: 0.1, y: 0.1, z: 0.1} - m_ConstrainProportionsScale: 1 - m_Children: [] - m_Father: {fileID: 2685035597097927690} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!23 &3265041720031347224 -MeshRenderer: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 6053249415262728388} + m_GameObject: {fileID: 8708866392971799934} m_Enabled: 1 - m_CastShadows: 1 + m_CastShadows: 0 m_ReceiveShadows: 1 m_DynamicOccludee: 1 m_StaticShadowCaster: 0 - m_MotionVectors: 1 - m_LightProbeUsage: 1 - m_ReflectionProbeUsage: 1 - m_RayTracingMode: 2 + m_MotionVectors: 0 + m_LightProbeUsage: 0 + m_ReflectionProbeUsage: 0 + m_RayTracingMode: 0 m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: - - {fileID: 2100000, guid: 1fb12e769af8dfc4b9c47b291e1da192, type: 2} + - {fileID: 10306, guid: 0000000000000000f000000000000000, type: 0} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 @@ -491,169 +622,67 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 - m_AdditionalVertexStreams: {fileID: 0} ---- !u!33 &5182623784987730361 -MeshFilter: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 6053249415262728388} - m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} ---- !u!64 &9197055104184844621 -MeshCollider: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 6053249415262728388} - m_Material: {fileID: 0} - m_IncludeLayers: - serializedVersion: 2 - m_Bits: 0 - m_ExcludeLayers: - serializedVersion: 2 - m_Bits: 0 - m_LayerOverridePriority: 0 - m_IsTrigger: 0 - m_ProvidesContacts: 0 - m_Enabled: 1 - serializedVersion: 5 - m_Convex: 0 - m_CookingOptions: 30 - m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} ---- !u!114 &319728215962205379 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 6053249415262728388} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 9998882d4b72010a9b0ca2d8bd35835e, type: 3} - m_Name: - m_EditorClassIdentifier: ---- !u!1 &8582801154640721559 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 5637138106755445514} - - component: {fileID: 6057977207758474935} - - component: {fileID: 1328201225010837278} - - component: {fileID: 6433205082115147417} - - component: {fileID: 6989781039509307755} - m_Layer: 0 - m_Name: SliderKnob - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &5637138106755445514 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 8582801154640721559} - serializedVersion: 2 - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0.843} - m_LocalScale: {x: 0.1, y: 0.1, z: 0.1} - m_ConstrainProportionsScale: 1 - m_Children: [] - m_Father: {fileID: 4144966226015051435} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!23 &6057977207758474935 -MeshRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 8582801154640721559} - m_Enabled: 1 - m_CastShadows: 1 - m_ReceiveShadows: 1 - m_DynamicOccludee: 1 - m_StaticShadowCaster: 0 - m_MotionVectors: 1 - m_LightProbeUsage: 1 - m_ReflectionProbeUsage: 1 - m_RayTracingMode: 2 - m_RayTraceProcedural: 0 - m_RenderingLayerMask: 1 - m_RendererPriority: 0 - m_Materials: - - {fileID: 2100000, guid: 1fb12e769af8dfc4b9c47b291e1da192, type: 2} - m_StaticBatchInfo: - firstSubMesh: 0 - subMeshCount: 0 - m_StaticBatchRoot: {fileID: 0} - m_ProbeAnchor: {fileID: 0} - m_LightProbeVolumeOverride: {fileID: 0} - m_ScaleInLightmap: 1 - m_ReceiveGI: 1 - m_PreserveUVs: 0 - m_IgnoreNormalsForChartDetection: 0 - m_ImportantGI: 0 - m_StitchLightmapSeams: 1 - m_SelectedEditorRenderState: 3 - m_MinimumChartSize: 4 - m_AutoUVMaxDistance: 0.5 - m_AutoUVMaxAngle: 89 - m_LightmapParameters: {fileID: 0} - m_SortingLayerID: 0 - m_SortingLayer: 0 - m_SortingOrder: 0 - m_AdditionalVertexStreams: {fileID: 0} ---- !u!33 &1328201225010837278 -MeshFilter: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 8582801154640721559} - m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} ---- !u!64 &6433205082115147417 -MeshCollider: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 8582801154640721559} - m_Material: {fileID: 0} - m_IncludeLayers: - serializedVersion: 2 - m_Bits: 0 - m_ExcludeLayers: - serializedVersion: 2 - m_Bits: 0 - m_LayerOverridePriority: 0 - m_IsTrigger: 0 - m_ProvidesContacts: 0 - m_Enabled: 1 - serializedVersion: 5 - m_Convex: 0 - m_CookingOptions: 30 - m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} ---- !u!114 &6989781039509307755 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 8582801154640721559} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 9998882d4b72010a9b0ca2d8bd35835e, type: 3} - m_Name: - m_EditorClassIdentifier: ---- !u!1001 &3629188724500721763 + m_Positions: [] + m_Parameters: + serializedVersion: 3 + widthMultiplier: 1 + widthCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0.19745255 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + colorGradient: + serializedVersion: 2 + key0: {r: 1, g: 1, b: 1, a: 1} + key1: {r: 1, g: 1, b: 1, a: 1} + key2: {r: 0, g: 0, b: 0, a: 0} + key3: {r: 0, g: 0, b: 0, a: 0} + key4: {r: 0, g: 0, b: 0, a: 0} + key5: {r: 0, g: 0, b: 0, a: 0} + key6: {r: 0, g: 0, b: 0, a: 0} + key7: {r: 0, g: 0, b: 0, a: 0} + ctime0: 0 + ctime1: 65535 + ctime2: 0 + ctime3: 0 + ctime4: 0 + ctime5: 0 + ctime6: 0 + ctime7: 0 + atime0: 0 + atime1: 65535 + atime2: 0 + atime3: 0 + atime4: 0 + atime5: 0 + atime6: 0 + atime7: 0 + m_Mode: 0 + m_ColorSpace: -1 + m_NumColorKeys: 2 + m_NumAlphaKeys: 2 + numCornerVertices: 0 + numCapVertices: 0 + alignment: 0 + textureMode: 0 + textureScale: {x: 1, y: 1} + shadowBias: 0 + generateLightingData: 0 + m_MaskInteraction: 0 + m_UseWorldSpace: 1 + m_Loop: 0 + m_ApplyActiveColorSpace: 1 +--- !u!1001 &8778754593817981653 PrefabInstance: m_ObjectHideFlags: 0 serializedVersion: 2 @@ -661,231 +690,137 @@ PrefabInstance: serializedVersion: 3 m_TransformParent: {fileID: 0} m_Modifications: - - target: {fileID: 639897978325975064, guid: c309e2ab8a7e17f049cee02d2d5e1af3, - type: 3} - propertyPath: m_Positions.Array.size - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 639897978325975064, guid: c309e2ab8a7e17f049cee02d2d5e1af3, - type: 3} - propertyPath: m_Parameters.colorGradient.key0.b - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 639897978325975064, guid: c309e2ab8a7e17f049cee02d2d5e1af3, - type: 3} - propertyPath: m_Parameters.colorGradient.key0.g - value: 1 - objectReference: {fileID: 0} - - target: {fileID: 639897978325975064, guid: c309e2ab8a7e17f049cee02d2d5e1af3, - type: 3} - propertyPath: m_Parameters.colorGradient.key0.r - value: 0.30863357 - objectReference: {fileID: 0} - - target: {fileID: 639897978325975064, guid: c309e2ab8a7e17f049cee02d2d5e1af3, - type: 3} - propertyPath: m_Parameters.colorGradient.key1.b - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 639897978325975064, guid: c309e2ab8a7e17f049cee02d2d5e1af3, - type: 3} - propertyPath: m_Parameters.colorGradient.key1.r - value: 0.30980393 - objectReference: {fileID: 0} - - target: {fileID: 639897978325975064, guid: c309e2ab8a7e17f049cee02d2d5e1af3, - type: 3} - propertyPath: m_Parameters.colorGradient.m_Mode - value: 1 - objectReference: {fileID: 0} - - target: {fileID: 639897978325975064, guid: c309e2ab8a7e17f049cee02d2d5e1af3, - type: 3} - propertyPath: m_Parameters.colorGradient.m_ColorSpace - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 639897978325975064, guid: c309e2ab8a7e17f049cee02d2d5e1af3, - type: 3} - propertyPath: m_Parameters.widthCurve.m_Curve.Array.data[0].value - value: 0.14800072 - objectReference: {fileID: 0} - - target: {fileID: 1425401315373935596, guid: c309e2ab8a7e17f049cee02d2d5e1af3, - type: 3} - propertyPath: orientation - value: 1 - objectReference: {fileID: 0} - - target: {fileID: 1842811169542586225, guid: c309e2ab8a7e17f049cee02d2d5e1af3, - type: 3} - propertyPath: rotationMinMax.x - value: -38.7 - objectReference: {fileID: 0} - - target: {fileID: 4241178655744724118, guid: c309e2ab8a7e17f049cee02d2d5e1af3, - type: 3} - propertyPath: m_Name - value: Turret - objectReference: {fileID: 0} - - target: {fileID: 6795469177534142411, guid: c309e2ab8a7e17f049cee02d2d5e1af3, - type: 3} - propertyPath: m_Enabled - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 7523567070824087546, guid: c309e2ab8a7e17f049cee02d2d5e1af3, + - target: {fileID: 527409087646353271, guid: f54a14318952c90c5b47a300aedb0d15, type: 3} propertyPath: m_LocalPosition.x - value: -0.12817177 + value: 0 objectReference: {fileID: 0} - - target: {fileID: 7523567070824087546, guid: c309e2ab8a7e17f049cee02d2d5e1af3, + - target: {fileID: 527409087646353271, guid: f54a14318952c90c5b47a300aedb0d15, type: 3} propertyPath: m_LocalPosition.y value: 0 objectReference: {fileID: 0} - - target: {fileID: 7523567070824087546, guid: c309e2ab8a7e17f049cee02d2d5e1af3, + - target: {fileID: 527409087646353271, guid: f54a14318952c90c5b47a300aedb0d15, type: 3} propertyPath: m_LocalPosition.z - value: 0.34760666 + value: 0 objectReference: {fileID: 0} - - target: {fileID: 7523567070824087546, guid: c309e2ab8a7e17f049cee02d2d5e1af3, + - target: {fileID: 527409087646353271, guid: f54a14318952c90c5b47a300aedb0d15, type: 3} propertyPath: m_LocalRotation.w - value: 0.5129842 + value: 1 objectReference: {fileID: 0} - - target: {fileID: 7523567070824087546, guid: c309e2ab8a7e17f049cee02d2d5e1af3, + - target: {fileID: 527409087646353271, guid: f54a14318952c90c5b47a300aedb0d15, type: 3} propertyPath: m_LocalRotation.x - value: -0 + value: 0 objectReference: {fileID: 0} - - target: {fileID: 7523567070824087546, guid: c309e2ab8a7e17f049cee02d2d5e1af3, + - target: {fileID: 527409087646353271, guid: f54a14318952c90c5b47a300aedb0d15, type: 3} propertyPath: m_LocalRotation.y - value: 0.858398 + value: 0 objectReference: {fileID: 0} - - target: {fileID: 7523567070824087546, guid: c309e2ab8a7e17f049cee02d2d5e1af3, + - target: {fileID: 527409087646353271, guid: f54a14318952c90c5b47a300aedb0d15, type: 3} propertyPath: m_LocalRotation.z - value: -0 + value: 0 objectReference: {fileID: 0} - - target: {fileID: 7523567070824087546, guid: c309e2ab8a7e17f049cee02d2d5e1af3, + - target: {fileID: 527409087646353271, guid: f54a14318952c90c5b47a300aedb0d15, type: 3} propertyPath: m_LocalEulerAnglesHint.x value: 0 objectReference: {fileID: 0} - - target: {fileID: 7523567070824087546, guid: c309e2ab8a7e17f049cee02d2d5e1af3, + - target: {fileID: 527409087646353271, guid: f54a14318952c90c5b47a300aedb0d15, type: 3} propertyPath: m_LocalEulerAnglesHint.y - value: 118.274 + value: 0 objectReference: {fileID: 0} - - target: {fileID: 7523567070824087546, guid: c309e2ab8a7e17f049cee02d2d5e1af3, + - target: {fileID: 527409087646353271, guid: f54a14318952c90c5b47a300aedb0d15, type: 3} propertyPath: m_LocalEulerAnglesHint.z value: 0 objectReference: {fileID: 0} - - target: {fileID: 7730797280345979287, guid: c309e2ab8a7e17f049cee02d2d5e1af3, + - target: {fileID: 817228733949022968, guid: f54a14318952c90c5b47a300aedb0d15, type: 3} - propertyPath: m_IsActive - value: 1 + propertyPath: m_Name + value: Base objectReference: {fileID: 0} - - target: {fileID: 8501533562697966838, guid: c309e2ab8a7e17f049cee02d2d5e1af3, + - target: {fileID: 872127579833310669, guid: f54a14318952c90c5b47a300aedb0d15, type: 3} - propertyPath: m_Positions.Array.size - value: 0 + propertyPath: m_Name + value: Turret objectReference: {fileID: 0} - - target: {fileID: 8501533562697966838, guid: c309e2ab8a7e17f049cee02d2d5e1af3, + - target: {fileID: 8365322460670124409, guid: f54a14318952c90c5b47a300aedb0d15, type: 3} - propertyPath: m_Parameters.colorGradient.key0.b - value: 0 + propertyPath: m_Name + value: Barrel objectReference: {fileID: 0} - - target: {fileID: 8501533562697966838, guid: c309e2ab8a7e17f049cee02d2d5e1af3, + - target: {fileID: 8650694973862404236, guid: f54a14318952c90c5b47a300aedb0d15, type: 3} - propertyPath: m_Parameters.colorGradient.key0.g - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 8501533562697966838, guid: c309e2ab8a7e17f049cee02d2d5e1af3, - type: 3} - propertyPath: m_Parameters.colorGradient.key0.r - value: 1 - objectReference: {fileID: 0} - - target: {fileID: 8501533562697966838, guid: c309e2ab8a7e17f049cee02d2d5e1af3, - type: 3} - propertyPath: m_Parameters.colorGradient.key1.b - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 8501533562697966838, guid: c309e2ab8a7e17f049cee02d2d5e1af3, - type: 3} - propertyPath: m_Parameters.colorGradient.key1.g - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 8501533562697966838, guid: c309e2ab8a7e17f049cee02d2d5e1af3, - type: 3} - propertyPath: m_Parameters.colorGradient.key1.r - value: 1 - objectReference: {fileID: 0} - - target: {fileID: 8501533562697966838, guid: c309e2ab8a7e17f049cee02d2d5e1af3, - type: 3} - propertyPath: m_Parameters.colorGradient.m_Mode - value: 1 - objectReference: {fileID: 0} - - target: {fileID: 8501533562697966838, guid: c309e2ab8a7e17f049cee02d2d5e1af3, - type: 3} - propertyPath: m_Parameters.colorGradient.m_ColorSpace - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 8501533562697966838, guid: c309e2ab8a7e17f049cee02d2d5e1af3, - type: 3} - propertyPath: m_Parameters.widthCurve.m_Curve.Array.data[0].value - value: 0.20800006 + propertyPath: m_Name + value: Head objectReference: {fileID: 0} m_RemovedComponents: [] m_RemovedGameObjects: [] m_AddedGameObjects: - - targetCorrespondingSourceObject: {fileID: 7523567070824087546, guid: c309e2ab8a7e17f049cee02d2d5e1af3, + - targetCorrespondingSourceObject: {fileID: 527409087646353271, guid: f54a14318952c90c5b47a300aedb0d15, type: 3} insertIndex: -1 - addedObject: {fileID: 2685035597097927690} - - targetCorrespondingSourceObject: {fileID: 7523567070824087546, guid: c309e2ab8a7e17f049cee02d2d5e1af3, + addedObject: {fileID: 2141594701022449211} + - targetCorrespondingSourceObject: {fileID: 527409087646353271, guid: f54a14318952c90c5b47a300aedb0d15, type: 3} insertIndex: -1 - addedObject: {fileID: 8231444434154675001} - - targetCorrespondingSourceObject: {fileID: 7523567070824087546, guid: c309e2ab8a7e17f049cee02d2d5e1af3, + addedObject: {fileID: 4508182228569071021} + - targetCorrespondingSourceObject: {fileID: 527409087646353271, guid: f54a14318952c90c5b47a300aedb0d15, type: 3} insertIndex: -1 - addedObject: {fileID: 4144966226015051435} + addedObject: {fileID: 3688593234855359137} m_AddedComponents: - - targetCorrespondingSourceObject: {fileID: 4241178655744724118, guid: c309e2ab8a7e17f049cee02d2d5e1af3, + - targetCorrespondingSourceObject: {fileID: 872127579833310669, guid: f54a14318952c90c5b47a300aedb0d15, type: 3} insertIndex: -1 - addedObject: {fileID: 5440735504016821781} - - targetCorrespondingSourceObject: {fileID: 4241178655744724118, guid: c309e2ab8a7e17f049cee02d2d5e1af3, + addedObject: {fileID: 5888942256506690542} + - targetCorrespondingSourceObject: {fileID: 872127579833310669, guid: f54a14318952c90c5b47a300aedb0d15, type: 3} insertIndex: -1 - addedObject: {fileID: 7323039027591738477} - - targetCorrespondingSourceObject: {fileID: 4241178655744724118, guid: c309e2ab8a7e17f049cee02d2d5e1af3, + addedObject: {fileID: 4899864418954658791} + - targetCorrespondingSourceObject: {fileID: 872127579833310669, guid: f54a14318952c90c5b47a300aedb0d15, type: 3} insertIndex: -1 - addedObject: {fileID: 841175348891104259} - m_SourcePrefab: {fileID: 100100000, guid: c309e2ab8a7e17f049cee02d2d5e1af3, type: 3} ---- !u!1 &614396578925772021 stripped + addedObject: {fileID: 7437064479105606814} + m_SourcePrefab: {fileID: 100100000, guid: f54a14318952c90c5b47a300aedb0d15, type: 3} +--- !u!1 &991916436778619820 stripped GameObject: - m_CorrespondingSourceObject: {fileID: 4241178655744724118, guid: c309e2ab8a7e17f049cee02d2d5e1af3, + m_CorrespondingSourceObject: {fileID: 8365322460670124409, guid: f54a14318952c90c5b47a300aedb0d15, type: 3} - m_PrefabInstance: {fileID: 3629188724500721763} + m_PrefabInstance: {fileID: 8778754593817981653} m_PrefabAsset: {fileID: 0} ---- !u!114 &5440735504016821781 +--- !u!1 &8488737342646939416 stripped +GameObject: + m_CorrespondingSourceObject: {fileID: 872127579833310669, guid: f54a14318952c90c5b47a300aedb0d15, + type: 3} + m_PrefabInstance: {fileID: 8778754593817981653} + m_PrefabAsset: {fileID: 0} +--- !u!114 &5888942256506690542 MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 614396578925772021} + m_GameObject: {fileID: 8488737342646939416} m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: 11500000, guid: f10d9733c7bd6bfd7ad6ba157ed4dd18, type: 3} m_Name: m_EditorClassIdentifier: delayBetweenBulletSequences: 0.1 ---- !u!114 &7323039027591738477 +--- !u!114 &4899864418954658791 MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 614396578925772021} + m_GameObject: {fileID: 8488737342646939416} m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: 11500000, guid: 62293fbacde88045196dca1e291b5f23, type: 3} @@ -898,32 +833,28 @@ MonoBehaviour: OnHealthChange: m_PersistentCalls: m_Calls: [] ---- !u!114 &841175348891104259 +--- !u!114 &7437064479105606814 MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 614396578925772021} + m_GameObject: {fileID: 8488737342646939416} m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: 11500000, guid: 3c6fb039e74d12a7bbfde22591bc7eee, type: 3} m_Name: m_EditorClassIdentifier: - horizontalArc: {fileID: 72007931888250727} - verticalArc: {fileID: 5640598242552733345} - attackSecondsDelay: 20 - projectileSequence: - - Arc: 0 - Amount: 1 - Speed: 100 - bulletPrefab: {fileID: 0} - Burst: 0 - BurstDelay: 0 - barrel: {fileID: 5590613211210629988} ---- !u!4 &6499929602381336473 stripped + horizontalArc: {fileID: 8981486734084153558} + verticalArc: {fileID: 5247639431516572416} + attackSecondsDelay: 10 + projectileSequence: [] + barrel: {fileID: 991916436778619820} + trajectory: {fileID: 3987931586699850031} + trajectoryBounces: 4 +--- !u!4 &9116936080776508834 stripped Transform: - m_CorrespondingSourceObject: {fileID: 7523567070824087546, guid: c309e2ab8a7e17f049cee02d2d5e1af3, + m_CorrespondingSourceObject: {fileID: 527409087646353271, guid: f54a14318952c90c5b47a300aedb0d15, type: 3} - m_PrefabInstance: {fileID: 3629188724500721763} + m_PrefabInstance: {fileID: 8778754593817981653} m_PrefabAsset: {fileID: 0} diff --git a/Assets/Scenes/TowerTest.unity b/Assets/Scenes/TowerTest.unity index 75bb325..ca52e04 100644 --- a/Assets/Scenes/TowerTest.unity +++ b/Assets/Scenes/TowerTest.unity @@ -209,13 +209,13 @@ Transform: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 330585543} serializedVersion: 2 - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 1, z: -2.6} + m_LocalRotation: {x: 0.17984354, y: -0.2199579, z: 0.04129667, w: 0.95789844} + m_LocalPosition: {x: 0.989, y: 1.63, z: -2.004} m_LocalScale: {x: 1, y: 1, z: 1} m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 0} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_LocalEulerAnglesHint: {x: 21.267, y: -25.865, z: 0} --- !u!114 &330585547 MonoBehaviour: m_ObjectHideFlags: 0 @@ -378,6 +378,216 @@ MonoBehaviour: m_LightCookieSize: {x: 1, y: 1} m_LightCookieOffset: {x: 0, y: 0} m_SoftShadowQuality: 1 +--- !u!1 &643774939 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 643774943} + - component: {fileID: 643774942} + - component: {fileID: 643774941} + - component: {fileID: 643774940} + m_Layer: 0 + m_Name: Wall (3) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!65 &643774940 +BoxCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 643774939} + m_Material: {fileID: 0} + m_IncludeLayers: + serializedVersion: 2 + m_Bits: 0 + m_ExcludeLayers: + serializedVersion: 2 + m_Bits: 0 + m_LayerOverridePriority: 0 + m_IsTrigger: 0 + m_ProvidesContacts: 0 + m_Enabled: 1 + serializedVersion: 3 + m_Size: {x: 1, y: 1, z: 1} + m_Center: {x: 0, y: 0, z: 0} +--- !u!23 &643774941 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 643774939} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 31321ba15b8f8eb4c954353edc038b1d, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!33 &643774942 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 643774939} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!4 &643774943 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 643774939} + serializedVersion: 2 + m_LocalRotation: {x: 0, y: 0.7071068, z: 0, w: 0.7071068} + m_LocalPosition: {x: 8.81, y: 0, z: 5.15} + m_LocalScale: {x: 18.010532, y: 21.082876, z: 0.17439} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 0} + m_LocalEulerAnglesHint: {x: 0, y: 90, z: 0} +--- !u!1 &769011490 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 769011494} + - component: {fileID: 769011493} + - component: {fileID: 769011492} + - component: {fileID: 769011491} + m_Layer: 0 + m_Name: Wall + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!65 &769011491 +BoxCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 769011490} + m_Material: {fileID: 0} + m_IncludeLayers: + serializedVersion: 2 + m_Bits: 0 + m_ExcludeLayers: + serializedVersion: 2 + m_Bits: 0 + m_LayerOverridePriority: 0 + m_IsTrigger: 0 + m_ProvidesContacts: 0 + m_Enabled: 1 + serializedVersion: 3 + m_Size: {x: 1, y: 1, z: 1} + m_Center: {x: 0, y: 0, z: 0} +--- !u!23 &769011492 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 769011490} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 31321ba15b8f8eb4c954353edc038b1d, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!33 &769011493 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 769011490} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!4 &769011494 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 769011490} + serializedVersion: 2 + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: -4.1} + m_LocalScale: {x: 18.010532, y: 21.082876, z: 0.17439} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 0} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1 &832575517 GameObject: m_ObjectHideFlags: 0 @@ -445,6 +655,41 @@ PrefabInstance: propertyPath: projectileSequence.Array.data[0].bulletPrefab value: objectReference: {fileID: 1006877822} + - target: {fileID: 963397980498552487, guid: 9415cb10a1bd579269301ca4f61a1554, + type: 3} + propertyPath: m_Materials.Array.data[0] + value: + objectReference: {fileID: 2100000, guid: 9896f9d54cb5db749bd49b9da446a549, type: 2} + - target: {fileID: 4508182228569071021, guid: 9415cb10a1bd579269301ca4f61a1554, + type: 3} + propertyPath: m_LocalPosition.x + value: -0.154 + objectReference: {fileID: 0} + - target: {fileID: 4508182228569071021, guid: 9415cb10a1bd579269301ca4f61a1554, + type: 3} + propertyPath: m_LocalPosition.y + value: 0.433 + objectReference: {fileID: 0} + - target: {fileID: 4508182228569071021, guid: 9415cb10a1bd579269301ca4f61a1554, + type: 3} + propertyPath: m_LocalPosition.z + value: -0.237 + objectReference: {fileID: 0} + - target: {fileID: 4508182228569071021, guid: 9415cb10a1bd579269301ca4f61a1554, + type: 3} + propertyPath: m_LocalRotation.w + value: 0.7071068 + objectReference: {fileID: 0} + - target: {fileID: 4508182228569071021, guid: 9415cb10a1bd579269301ca4f61a1554, + type: 3} + propertyPath: m_LocalRotation.z + value: -0.7071068 + objectReference: {fileID: 0} + - target: {fileID: 4508182228569071021, guid: 9415cb10a1bd579269301ca4f61a1554, + type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: -90 + objectReference: {fileID: 0} - target: {fileID: 6499929602381336473, guid: 9415cb10a1bd579269301ca4f61a1554, type: 3} propertyPath: m_LocalPosition.x @@ -453,7 +698,7 @@ PrefabInstance: - target: {fileID: 6499929602381336473, guid: 9415cb10a1bd579269301ca4f61a1554, type: 3} propertyPath: m_LocalPosition.y - value: 0 + value: 0.73 objectReference: {fileID: 0} - target: {fileID: 6499929602381336473, guid: 9415cb10a1bd579269301ca4f61a1554, type: 3} @@ -495,6 +740,46 @@ PrefabInstance: propertyPath: m_LocalEulerAnglesHint.z value: 0 objectReference: {fileID: 0} + - target: {fileID: 7437064479105606814, guid: 9415cb10a1bd579269301ca4f61a1554, + type: 3} + propertyPath: barrel + value: + objectReference: {fileID: 1890448162} + - target: {fileID: 7437064479105606814, guid: 9415cb10a1bd579269301ca4f61a1554, + type: 3} + propertyPath: attackSecondsDelay + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 9116936080776508834, guid: 9415cb10a1bd579269301ca4f61a1554, + type: 3} + propertyPath: m_LocalPosition.y + value: 0.875 + objectReference: {fileID: 0} + - target: {fileID: 9116936080776508834, guid: 9415cb10a1bd579269301ca4f61a1554, + type: 3} + propertyPath: m_LocalRotation.w + value: 0.7071068 + objectReference: {fileID: 0} + - target: {fileID: 9116936080776508834, guid: 9415cb10a1bd579269301ca4f61a1554, + type: 3} + propertyPath: m_LocalRotation.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 9116936080776508834, guid: 9415cb10a1bd579269301ca4f61a1554, + type: 3} + propertyPath: m_LocalRotation.y + value: 0.7071068 + objectReference: {fileID: 0} + - target: {fileID: 9116936080776508834, guid: 9415cb10a1bd579269301ca4f61a1554, + type: 3} + propertyPath: m_LocalRotation.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 9116936080776508834, guid: 9415cb10a1bd579269301ca4f61a1554, + type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 90 + objectReference: {fileID: 0} m_RemovedComponents: [] m_RemovedGameObjects: [] m_AddedGameObjects: [] @@ -506,6 +791,432 @@ GameObject: type: 3} m_PrefabInstance: {fileID: 667212637924654954} m_PrefabAsset: {fileID: 0} +--- !u!1 &1085503232 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1085503236} + - component: {fileID: 1085503235} + - component: {fileID: 1085503234} + - component: {fileID: 1085503233} + m_Layer: 0 + m_Name: Wall (4) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!65 &1085503233 +BoxCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1085503232} + m_Material: {fileID: 0} + m_IncludeLayers: + serializedVersion: 2 + m_Bits: 0 + m_ExcludeLayers: + serializedVersion: 2 + m_Bits: 0 + m_LayerOverridePriority: 0 + m_IsTrigger: 0 + m_ProvidesContacts: 0 + m_Enabled: 1 + serializedVersion: 3 + m_Size: {x: 1, y: 1, z: 1} + m_Center: {x: 0, y: 0, z: 0} +--- !u!23 &1085503234 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1085503232} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 31321ba15b8f8eb4c954353edc038b1d, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!33 &1085503235 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1085503232} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!4 &1085503236 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1085503232} + serializedVersion: 2 + m_LocalRotation: {x: 0, y: 0.7071068, z: 0, w: 0.7071068} + m_LocalPosition: {x: -8.38, y: 0, z: 4.34} + m_LocalScale: {x: 18.010532, y: 21.082876, z: 0.17439} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 0} + m_LocalEulerAnglesHint: {x: 0, y: 90, z: 0} +--- !u!1 &1197417724 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1197417728} + - component: {fileID: 1197417727} + - component: {fileID: 1197417726} + - component: {fileID: 1197417725} + m_Layer: 0 + m_Name: Wall (2) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!65 &1197417725 +BoxCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1197417724} + m_Material: {fileID: 0} + m_IncludeLayers: + serializedVersion: 2 + m_Bits: 0 + m_ExcludeLayers: + serializedVersion: 2 + m_Bits: 0 + m_LayerOverridePriority: 0 + m_IsTrigger: 0 + m_ProvidesContacts: 0 + m_Enabled: 1 + serializedVersion: 3 + m_Size: {x: 1, y: 1, z: 1} + m_Center: {x: 0, y: 0, z: 0} +--- !u!23 &1197417726 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1197417724} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 31321ba15b8f8eb4c954353edc038b1d, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!33 &1197417727 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1197417724} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!4 &1197417728 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1197417724} + serializedVersion: 2 + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 13.76} + m_LocalScale: {x: 18.010532, y: 21.082876, z: 0.17439} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 0} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1621186629 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1621186633} + - component: {fileID: 1621186632} + - component: {fileID: 1621186631} + - component: {fileID: 1621186630} + m_Layer: 0 + m_Name: Wall (1) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!65 &1621186630 +BoxCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1621186629} + m_Material: {fileID: 0} + m_IncludeLayers: + serializedVersion: 2 + m_Bits: 0 + m_ExcludeLayers: + serializedVersion: 2 + m_Bits: 0 + m_LayerOverridePriority: 0 + m_IsTrigger: 0 + m_ProvidesContacts: 0 + m_Enabled: 1 + serializedVersion: 3 + m_Size: {x: 1, y: 1, z: 1} + m_Center: {x: 0, y: 0, z: 0} +--- !u!23 &1621186631 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1621186629} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 31321ba15b8f8eb4c954353edc038b1d, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!33 &1621186632 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1621186629} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!4 &1621186633 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1621186629} + serializedVersion: 2 + m_LocalRotation: {x: -0.7071068, y: 0, z: 0, w: 0.7071068} + m_LocalPosition: {x: 0, y: 0, z: 4.88} + m_LocalScale: {x: 18.010532, y: 21.082876, z: 0.17439} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 0} + m_LocalEulerAnglesHint: {x: -90, y: 0, z: 0} +--- !u!1 &1797347348 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1797347352} + - component: {fileID: 1797347351} + - component: {fileID: 1797347350} + - component: {fileID: 1797347349} + m_Layer: 0 + m_Name: Wall (5) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!65 &1797347349 +BoxCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1797347348} + m_Material: {fileID: 0} + m_IncludeLayers: + serializedVersion: 2 + m_Bits: 0 + m_ExcludeLayers: + serializedVersion: 2 + m_Bits: 0 + m_LayerOverridePriority: 0 + m_IsTrigger: 0 + m_ProvidesContacts: 0 + m_Enabled: 1 + serializedVersion: 3 + m_Size: {x: 1, y: 1, z: 1} + m_Center: {x: 0, y: 0, z: 0} +--- !u!23 &1797347350 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1797347348} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 31321ba15b8f8eb4c954353edc038b1d, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!33 &1797347351 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1797347348} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!4 &1797347352 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1797347348} + serializedVersion: 2 + m_LocalRotation: {x: -0.7071068, y: 0, z: 0, w: 0.7071068} + m_LocalPosition: {x: 0, y: 9.4, z: 4.88} + m_LocalScale: {x: 18.010532, y: 21.082876, z: 0.17439} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 0} + m_LocalEulerAnglesHint: {x: -90, y: 0, z: 0} +--- !u!1 &1890448162 stripped +GameObject: + m_CorrespondingSourceObject: {fileID: 7625877907635197182, guid: 9415cb10a1bd579269301ca4f61a1554, + type: 3} + m_PrefabInstance: {fileID: 891862850} + m_PrefabAsset: {fileID: 0} --- !u!1001 &667212637924654954 PrefabInstance: m_ObjectHideFlags: 0 @@ -583,3 +1294,9 @@ SceneRoots: - {fileID: 832575519} - {fileID: 891862850} - {fileID: 667212637924654954} + - {fileID: 769011494} + - {fileID: 1197417728} + - {fileID: 643774943} + - {fileID: 1085503236} + - {fileID: 1621186633} + - {fileID: 1797347352} diff --git a/Assets/Scripts/Tower/Projectile.cs b/Assets/Scripts/Tower/Projectile.cs new file mode 100644 index 0000000..a82b6f8 --- /dev/null +++ b/Assets/Scripts/Tower/Projectile.cs @@ -0,0 +1,22 @@ +using UnityEngine; +using UnityEngine.Assertions; + +[RequireComponent(typeof(Collider))] +public class Projectile : MonoBehaviour +{ + [SerializeField, Range(0f, 1f)] + private float bounciness = 0.5f; + + private Collider projCol; + + private void Awake() + { + projCol = GetComponent(); + Assert.IsNotNull(projCol); + + PhysicMaterial pMat = new(); + pMat.bounciness = this.bounciness; + + projCol.material = pMat; + } +} diff --git a/Assets/Scripts/Tower/Projectile.cs.meta b/Assets/Scripts/Tower/Projectile.cs.meta new file mode 100644 index 0000000..faaa765 --- /dev/null +++ b/Assets/Scripts/Tower/Projectile.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: a98521a4b559621438fc196adc605f3b +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/Tower/ProjectileTower.cs b/Assets/Scripts/Tower/ProjectileTower.cs index bee2320..7b3c033 100644 --- a/Assets/Scripts/Tower/ProjectileTower.cs +++ b/Assets/Scripts/Tower/ProjectileTower.cs @@ -1,5 +1,6 @@ using System; using System.Collections; +using System.Collections.Generic; using UnityEngine; using UnityEngine.Assertions; @@ -9,6 +10,9 @@ public class ProjectileTower : Tower [SerializeField, Range(0.01f, 20f)] private float attackSecondsDelay = 1f; [SerializeField] private ProjectilePattern[] projectileSequence; [SerializeField] private GameObject barrel; + [SerializeField] private LineRenderer trajectory; + [SerializeField] private int trajectoryBounces = 2; + private const float k_trajectory_maxdist = 100f; private ProjectileSpawner projectileSpawner; @@ -24,10 +28,39 @@ public class ProjectileTower : Tower horizontalArc.Value.AddListener(UpdateBarrelRotation); verticalArc.Value.AddListener(UpdateBarrelRotation); + horizontalArc.Value.AddListener(UpdateTrajectory); + verticalArc.Value.AddListener(UpdateTrajectory); + UpdateBarrelRotation(); + UpdateTrajectory(); StartCoroutine(AttackLoop()); } + private void UpdateTrajectory(float unused) => UpdateTrajectory(); + + private void UpdateTrajectory() + { + if (trajectory == null) return; + + // TODO: change to barrel tip + Vector3 origin = transform.position; + Vector3 dir = AimDirection; + List pointsInTrajectory = new(); + for (int i = 0; i < trajectoryBounces; i++) + { + RaycastHit hit; + if (!Physics.Raycast(origin, dir, out hit, k_trajectory_maxdist)) + break; + + pointsInTrajectory.Add(hit.point); + dir = Vector3.Reflect(dir, hit.normal); + origin = hit.point; + } + + trajectory.positionCount = pointsInTrajectory.Count; + trajectory.SetPositions(pointsInTrajectory.ToArray()); + } + protected override void OnDestroy() { horizontalArc.Value.RemoveListener(UpdateBarrelRotation); @@ -51,6 +84,6 @@ public class ProjectileTower : Tower // Rotate barrel to match rotation private void UpdateBarrelRotation() { - barrel.transform.rotation = Quaternion.Euler(verticalArc.Value, horizontalArc.Value, 0f); + barrel.transform.localRotation = Quaternion.Euler(verticalArc.Value, horizontalArc.Value, 0f); } } diff --git a/Assets/Scripts/Tower/Tower.cs b/Assets/Scripts/Tower/Tower.cs index 5b38fe2..aeeb8b4 100644 --- a/Assets/Scripts/Tower/Tower.cs +++ b/Assets/Scripts/Tower/Tower.cs @@ -4,6 +4,8 @@ using UnityEngine.Assertions; [RequireComponent(typeof(HealthComponent))] public abstract class Tower : MonoBehaviour { + public bool towerSelected { get; set; } = true; + [SerializeField] protected EditableArc horizontalArc; [SerializeField] protected EditableArc verticalArc; diff --git a/Assets/Scripts/Utilities/EditableArc.cs b/Assets/Scripts/Utilities/EditableArc.cs index 2e3ec54..471ada0 100644 --- a/Assets/Scripts/Utilities/EditableArc.cs +++ b/Assets/Scripts/Utilities/EditableArc.cs @@ -24,8 +24,8 @@ public class EditableArc : MonoBehaviour public Observer Value { get; private set; } = new(0); public Vector2 RotationMinMax => rotationMinMax; - public Vector3 normal => orientation == ArcOrientation.HORIZONTAL ? transform.up : transform.right; - public Vector3 tangent => orientation == ArcOrientation.HORIZONTAL ? transform.right : transform.up; + public Vector3 normal => orientation == ArcOrientation.HORIZONTAL ? transform.up : transform.forward; + public Vector3 tangent => orientation == ArcOrientation.HORIZONTAL ? transform.forward : transform.up; public Vector3 ToKnobVector => Quaternion.AngleAxis(Value.Value, normal) * tangent;