This commit is contained in:
BOT Alex 2024-04-21 08:57:25 +02:00
commit 1267eecf05
8 changed files with 248 additions and 445 deletions

File diff suppressed because one or more lines are too long

View File

@ -48,7 +48,7 @@ ParticleSystem:
ringBufferMode: 0 ringBufferMode: 0
ringBufferLoopRange: {x: 0, y: 1} ringBufferLoopRange: {x: 0, y: 1}
emitterVelocityMode: 1 emitterVelocityMode: 1
looping: 1 looping: 0
prewarm: 0 prewarm: 0
playOnAwake: 1 playOnAwake: 1
useUnscaledTime: 0 useUnscaledTime: 0
@ -4945,7 +4945,7 @@ ParticleSystem:
ringBufferMode: 0 ringBufferMode: 0
ringBufferLoopRange: {x: 0, y: 1} ringBufferLoopRange: {x: 0, y: 1}
emitterVelocityMode: 1 emitterVelocityMode: 1
looping: 1 looping: 0
prewarm: 0 prewarm: 0
playOnAwake: 1 playOnAwake: 1
useUnscaledTime: 0 useUnscaledTime: 0

View File

@ -14,6 +14,7 @@ GameObject:
- component: {fileID: -4368249141776341009} - component: {fileID: -4368249141776341009}
- component: {fileID: 1772828647246745231} - component: {fileID: 1772828647246745231}
- component: {fileID: 3214375543219620994} - component: {fileID: 3214375543219620994}
- component: {fileID: 5395307781823163591}
m_Layer: 8 m_Layer: 8
m_Name: BaseTower m_Name: BaseTower
m_TagString: Untagged m_TagString: Untagged
@ -36,6 +37,7 @@ Transform:
m_Children: m_Children:
- {fileID: 5000648575824335922} - {fileID: 5000648575824335922}
- {fileID: 8658008248069201232} - {fileID: 8658008248069201232}
- {fileID: 8250573608784804583}
m_Father: {fileID: 0} m_Father: {fileID: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &7883233016828513649 --- !u!114 &7883233016828513649
@ -54,6 +56,30 @@ MonoBehaviour:
OnHealthZero: OnHealthZero:
m_PersistentCalls: m_PersistentCalls:
m_Calls: m_Calls:
- m_Target: {fileID: 5395307781823163591}
m_TargetAssemblyTypeName: Spawn, Assembly-CSharp
m_MethodName: SpawnNow
m_Mode: 1
m_Arguments:
m_ObjectArgument: {fileID: 0}
m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine
m_IntArgument: 0
m_FloatArgument: 0
m_StringArgument:
m_BoolArgument: 0
m_CallState: 2
- m_Target: {fileID: 3214375543219620994}
m_TargetAssemblyTypeName: PlaySound, Assembly-CSharp
m_MethodName: PlayASound
m_Mode: 5
m_Arguments:
m_ObjectArgument: {fileID: 0}
m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine
m_IntArgument: 0
m_FloatArgument: 0
m_StringArgument: Tower Die
m_BoolArgument: 0
m_CallState: 2
- m_Target: {fileID: 7883233016828513649} - m_Target: {fileID: 7883233016828513649}
m_TargetAssemblyTypeName: HealthComponent, Assembly-CSharp m_TargetAssemblyTypeName: HealthComponent, Assembly-CSharp
m_MethodName: SimpleKill m_MethodName: SimpleKill
@ -164,6 +190,20 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: d720360aef3510faf93af9ce3a78b2fc, type: 3} m_Script: {fileID: 11500000, guid: d720360aef3510faf93af9ce3a78b2fc, type: 3}
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
--- !u!114 &5395307781823163591
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 872127579833310669}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 8284bc9546293b11491f9b612f1201e2, type: 3}
m_Name:
m_EditorClassIdentifier:
prefab: {fileID: 8118098614606808160, guid: ccb00436ef21d07468d582c764f12304, type: 3}
desrtoyAfter: 10
--- !u!1 &4657144566828515878 --- !u!1 &4657144566828515878
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@ -639,3 +679,82 @@ RectTransform:
type: 3} type: 3}
m_PrefabInstance: {fileID: 4242914981235942237} m_PrefabInstance: {fileID: 4242914981235942237}
m_PrefabAsset: {fileID: 0} m_PrefabAsset: {fileID: 0}
--- !u!1001 &4633451711229928249
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
serializedVersion: 3
m_TransformParent: {fileID: 527409087646353271}
m_Modifications:
- target: {fileID: 3617163679098575326, guid: ccb00436ef21d07468d582c764f12304,
type: 3}
propertyPath: m_LocalPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3617163679098575326, guid: ccb00436ef21d07468d582c764f12304,
type: 3}
propertyPath: m_LocalPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3617163679098575326, guid: ccb00436ef21d07468d582c764f12304,
type: 3}
propertyPath: m_LocalPosition.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3617163679098575326, guid: ccb00436ef21d07468d582c764f12304,
type: 3}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: 3617163679098575326, guid: ccb00436ef21d07468d582c764f12304,
type: 3}
propertyPath: m_LocalRotation.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3617163679098575326, guid: ccb00436ef21d07468d582c764f12304,
type: 3}
propertyPath: m_LocalRotation.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3617163679098575326, guid: ccb00436ef21d07468d582c764f12304,
type: 3}
propertyPath: m_LocalRotation.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3617163679098575326, guid: ccb00436ef21d07468d582c764f12304,
type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3617163679098575326, guid: ccb00436ef21d07468d582c764f12304,
type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3617163679098575326, guid: ccb00436ef21d07468d582c764f12304,
type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8118098614606808160, guid: ccb00436ef21d07468d582c764f12304,
type: 3}
propertyPath: m_Name
value: Explosionparticles
objectReference: {fileID: 0}
- target: {fileID: 8118098614606808160, guid: ccb00436ef21d07468d582c764f12304,
type: 3}
propertyPath: m_IsActive
value: 0
objectReference: {fileID: 0}
m_RemovedComponents: []
m_RemovedGameObjects: []
m_AddedGameObjects: []
m_AddedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: ccb00436ef21d07468d582c764f12304, type: 3}
--- !u!4 &8250573608784804583 stripped
Transform:
m_CorrespondingSourceObject: {fileID: 3617163679098575326, guid: ccb00436ef21d07468d582c764f12304,
type: 3}
m_PrefabInstance: {fileID: 4633451711229928249}
m_PrefabAsset: {fileID: 0}

View File

@ -620,6 +620,7 @@ RectTransform:
- {fileID: 7094050956717546836} - {fileID: 7094050956717546836}
- {fileID: 5203690656153714838} - {fileID: 5203690656153714838}
- {fileID: 4429602029198271624} - {fileID: 4429602029198271624}
- {fileID: 2823721143316666755}
- {fileID: 9000047314404377693} - {fileID: 9000047314404377693}
- {fileID: 6256671941795819917} - {fileID: 6256671941795819917}
m_Father: {fileID: 0} m_Father: {fileID: 0}
@ -858,9 +859,9 @@ RectTransform:
- {fileID: 6925912160577396843} - {fileID: 6925912160577396843}
m_Father: {fileID: 1571444269651810830} m_Father: {fileID: 1571444269651810830}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0} m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 0} m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 0, y: 0} m_AnchoredPosition: {x: 97.85, y: -475.8032}
m_SizeDelta: {x: 150, y: 150} m_SizeDelta: {x: 150, y: 150}
m_Pivot: {x: 0.5, y: 0.5} m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &1590834972027237251 --- !u!222 &1590834972027237251
@ -1246,18 +1247,18 @@ RectTransform:
m_PrefabInstance: {fileID: 0} m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0} m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2074820118910961211} m_GameObject: {fileID: 2074820118910961211}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1} m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0 m_ConstrainProportionsScale: 0
m_Children: m_Children:
- {fileID: 9031083463025029788} - {fileID: 9031083463025029788}
- {fileID: 6503638792597430501} - {fileID: 6503638792597430501}
m_Father: {fileID: 5203690656153714838} m_Father: {fileID: 3367038424042638127}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5} m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5} m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: -1320, y: 0} m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 100, y: 100} m_SizeDelta: {x: 100, y: 100}
m_Pivot: {x: 0.5, y: 0.5} m_Pivot: {x: 0.5, y: 0.5}
--- !u!1 &2229423673042055192 --- !u!1 &2229423673042055192
@ -1629,9 +1630,9 @@ RectTransform:
- {fileID: 8740154629202535075} - {fileID: 8740154629202535075}
m_Father: {fileID: 1571444269651810830} m_Father: {fileID: 1571444269651810830}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0} m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 0} m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 0, y: 0} m_AnchoredPosition: {x: 97.85, y: -105}
m_SizeDelta: {x: 150, y: 150} m_SizeDelta: {x: 150, y: 150}
m_Pivot: {x: 0.5, y: 0.5} m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &4030747125337201116 --- !u!222 &4030747125337201116
@ -2806,7 +2807,7 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0} m_AnchorMin: {x: 0.5, y: 0}
m_AnchorMax: {x: 0.5, y: 0} m_AnchorMax: {x: 0.5, y: 0}
m_AnchoredPosition: {x: 769, y: -406} m_AnchoredPosition: {x: -863.80005, y: -387.09998}
m_SizeDelta: {x: 100, y: 100} m_SizeDelta: {x: 100, y: 100}
m_Pivot: {x: 0.5, y: 0.5} m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &2593507632019896054 --- !u!222 &2593507632019896054
@ -3197,7 +3198,7 @@ GameObject:
m_Icon: {fileID: 0} m_Icon: {fileID: 0}
m_NavMeshLayer: 0 m_NavMeshLayer: 0
m_StaticEditorFlags: 0 m_StaticEditorFlags: 0
m_IsActive: 1 m_IsActive: 0
--- !u!224 &5203690656153714838 --- !u!224 &5203690656153714838
RectTransform: RectTransform:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@ -3213,7 +3214,6 @@ RectTransform:
- {fileID: 9125599128698433918} - {fileID: 9125599128698433918}
- {fileID: 41458428043916546} - {fileID: 41458428043916546}
- {fileID: 5814772211296616353} - {fileID: 5814772211296616353}
- {fileID: 2823721143316666755}
m_Father: {fileID: 3367038424042638127} m_Father: {fileID: 3367038424042638127}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 1, y: 0.5} m_AnchorMin: {x: 1, y: 0.5}
@ -3343,9 +3343,9 @@ RectTransform:
- {fileID: 2761822326100020935} - {fileID: 2761822326100020935}
m_Father: {fileID: 1571444269651810830} m_Father: {fileID: 1571444269651810830}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0} m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 0} m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 0, y: 0} m_AnchoredPosition: {x: 97.85, y: -846.6064}
m_SizeDelta: {x: 150, y: 150} m_SizeDelta: {x: 150, y: 150}
m_Pivot: {x: 0.5, y: 0.5} m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &8651936493222350935 --- !u!222 &8651936493222350935
@ -4372,9 +4372,9 @@ RectTransform:
- {fileID: 3463979208659812338} - {fileID: 3463979208659812338}
m_Father: {fileID: 1571444269651810830} m_Father: {fileID: 1571444269651810830}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0} m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 0} m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 0, y: 0} m_AnchoredPosition: {x: 97.85, y: -290.4016}
m_SizeDelta: {x: 150, y: 150} m_SizeDelta: {x: 150, y: 150}
m_Pivot: {x: 0.5, y: 0.5} m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &1595412627603319622 --- !u!222 &1595412627603319622
@ -4966,7 +4966,7 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0} m_AnchorMin: {x: 0.5, y: 0}
m_AnchorMax: {x: 0.5, y: 0} m_AnchorMax: {x: 0.5, y: 0}
m_AnchoredPosition: {x: 885.30005, y: -406} m_AnchoredPosition: {x: -747.5, y: -387.09998}
m_SizeDelta: {x: 100, y: 100} m_SizeDelta: {x: 100, y: 100}
m_Pivot: {x: 0.5, y: 0.5} m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &2186931942408298377 --- !u!222 &2186931942408298377
@ -5089,9 +5089,9 @@ RectTransform:
- {fileID: 1879052238577856330} - {fileID: 1879052238577856330}
m_Father: {fileID: 1571444269651810830} m_Father: {fileID: 1571444269651810830}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0} m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 0} m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 0, y: 0} m_AnchoredPosition: {x: 97.85, y: -661.2048}
m_SizeDelta: {x: 150, y: 150} m_SizeDelta: {x: 150, y: 150}
m_Pivot: {x: 0.5, y: 0.5} m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &2364807694092123912 --- !u!222 &2364807694092123912

View File

@ -61,11 +61,6 @@ public class TowerPlacementManager : MonoBehaviour
OnGridDeleteRequested?.Invoke(this); OnGridDeleteRequested?.Invoke(this);
OnSpawnGridRequested?.Invoke(this); OnSpawnGridRequested?.Invoke(this);
} }
if (Input.GetKeyDown(KeyCode.Escape))
{
FinishBuild(); // Exit build mode
}
} }
private void OnEnable() private void OnEnable()

View File

@ -20,4 +20,9 @@ public class EnableCompare : MonoBehaviour
toEnable.SetActive(true); toEnable.SetActive(true);
} }
} }
public void ForceEnable()
{
toEnable.SetActive(true);
}
} }

View File

@ -0,0 +1,16 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Spawn : MonoBehaviour
{
[SerializeField] GameObject prefab;
public float desrtoyAfter = 10f;
public void SpawnNow()
{
var go = Instantiate(prefab);
go.transform.position = transform.position;
Destroy(go, desrtoyAfter);
}
}

View File

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