1
Fork 0
mirror of https://github.com/Steffo99/beat-td.git synced 2024-11-25 00:34:18 +00:00

Done some more stuff

This commit is contained in:
Steffo 2018-04-23 13:50:24 +02:00
parent 73aae2abcc
commit 6b78b2f701
21 changed files with 1533 additions and 58 deletions

View file

@ -75,6 +75,7 @@
<Compile Include="Assets\Scripts\LargeEnemyMovement.cs" /> <Compile Include="Assets\Scripts\LargeEnemyMovement.cs" />
<Compile Include="Assets\Scripts\LoadSceneOnClick.cs" /> <Compile Include="Assets\Scripts\LoadSceneOnClick.cs" />
<Compile Include="Assets\Scripts\PositionFromMouse.cs" /> <Compile Include="Assets\Scripts\PositionFromMouse.cs" />
<Compile Include="Assets\Scripts\SnareCollision.cs" />
<Compile Include="Assets\Scripts\SnareTower.cs" /> <Compile Include="Assets\Scripts\SnareTower.cs" />
<Compile Include="Assets\Scripts\SongData.cs" /> <Compile Include="Assets\Scripts\SongData.cs" />
<Compile Include="Assets\Scripts\SpriteOnLives.cs" /> <Compile Include="Assets\Scripts\SpriteOnLives.cs" />

View file

@ -456,7 +456,7 @@ AudioSource:
OutputAudioMixerGroup: {fileID: 0} OutputAudioMixerGroup: {fileID: 0}
m_audioClip: {fileID: 8300000, guid: d881bbfc851b179449e8de4ef83de168, type: 3} m_audioClip: {fileID: 8300000, guid: d881bbfc851b179449e8de4ef83de168, type: 3}
m_PlayOnAwake: 1 m_PlayOnAwake: 1
m_Volume: 0.1 m_Volume: 0.2
m_Pitch: 1 m_Pitch: 1
Loop: 1 Loop: 1
Mute: 0 Mute: 0
@ -555,6 +555,7 @@ MonoBehaviour:
- {fileID: 1353675573854854, guid: 8436f60a30d755346a1829fc1154f0a2, type: 2} - {fileID: 1353675573854854, guid: 8436f60a30d755346a1829fc1154f0a2, type: 2}
- {fileID: 1116464442260662, guid: 68f4cf9ed4f721340aec1ee79ef4c967, type: 2} - {fileID: 1116464442260662, guid: 68f4cf9ed4f721340aec1ee79ef4c967, type: 2}
- {fileID: 1790912687524718, guid: f84d521163ebde447879f581a32ca118, type: 2} - {fileID: 1790912687524718, guid: f84d521163ebde447879f581a32ca118, type: 2}
index: 0
--- !u!114 &114032699107723242 --- !u!114 &114032699107723242
MonoBehaviour: MonoBehaviour:
m_ObjectHideFlags: 1 m_ObjectHideFlags: 1
@ -579,7 +580,7 @@ MonoBehaviour:
m_EditorClassIdentifier: m_EditorClassIdentifier:
higherSprite: {fileID: 21300000, guid: 7ba187ba05264f64798e5ccc5a527de6, type: 3} higherSprite: {fileID: 21300000, guid: 7ba187ba05264f64798e5ccc5a527de6, type: 3}
lowerSprite: {fileID: 21300000, guid: baadb80603ed5304eb85af6edc502571, type: 3} lowerSprite: {fileID: 21300000, guid: baadb80603ed5304eb85af6edc502571, type: 3}
livesThreshold: 6 livesThreshold: 5
--- !u!114 &114135218223358326 --- !u!114 &114135218223358326
MonoBehaviour: MonoBehaviour:
m_ObjectHideFlags: 1 m_ObjectHideFlags: 1
@ -593,7 +594,7 @@ MonoBehaviour:
m_EditorClassIdentifier: m_EditorClassIdentifier:
higherSprite: {fileID: 21300000, guid: 7ba187ba05264f64798e5ccc5a527de6, type: 3} higherSprite: {fileID: 21300000, guid: 7ba187ba05264f64798e5ccc5a527de6, type: 3}
lowerSprite: {fileID: 21300000, guid: baadb80603ed5304eb85af6edc502571, type: 3} lowerSprite: {fileID: 21300000, guid: baadb80603ed5304eb85af6edc502571, type: 3}
livesThreshold: 3 livesThreshold: 8
--- !u!114 &114153136693258118 --- !u!114 &114153136693258118
MonoBehaviour: MonoBehaviour:
m_ObjectHideFlags: 1 m_ObjectHideFlags: 1
@ -621,7 +622,7 @@ MonoBehaviour:
m_EditorClassIdentifier: m_EditorClassIdentifier:
higherSprite: {fileID: 21300000, guid: 7ba187ba05264f64798e5ccc5a527de6, type: 3} higherSprite: {fileID: 21300000, guid: 7ba187ba05264f64798e5ccc5a527de6, type: 3}
lowerSprite: {fileID: 21300000, guid: baadb80603ed5304eb85af6edc502571, type: 3} lowerSprite: {fileID: 21300000, guid: baadb80603ed5304eb85af6edc502571, type: 3}
livesThreshold: 7 livesThreshold: 4
--- !u!114 &114200885624498918 --- !u!114 &114200885624498918
MonoBehaviour: MonoBehaviour:
m_ObjectHideFlags: 1 m_ObjectHideFlags: 1
@ -635,7 +636,7 @@ MonoBehaviour:
m_EditorClassIdentifier: m_EditorClassIdentifier:
higherSprite: {fileID: 21300000, guid: 7ba187ba05264f64798e5ccc5a527de6, type: 3} higherSprite: {fileID: 21300000, guid: 7ba187ba05264f64798e5ccc5a527de6, type: 3}
lowerSprite: {fileID: 21300000, guid: baadb80603ed5304eb85af6edc502571, type: 3} lowerSprite: {fileID: 21300000, guid: baadb80603ed5304eb85af6edc502571, type: 3}
livesThreshold: 10 livesThreshold: 1
--- !u!114 &114264903686440274 --- !u!114 &114264903686440274
MonoBehaviour: MonoBehaviour:
m_ObjectHideFlags: 1 m_ObjectHideFlags: 1
@ -649,7 +650,7 @@ MonoBehaviour:
m_EditorClassIdentifier: m_EditorClassIdentifier:
higherSprite: {fileID: 21300000, guid: 7ba187ba05264f64798e5ccc5a527de6, type: 3} higherSprite: {fileID: 21300000, guid: 7ba187ba05264f64798e5ccc5a527de6, type: 3}
lowerSprite: {fileID: 21300000, guid: baadb80603ed5304eb85af6edc502571, type: 3} lowerSprite: {fileID: 21300000, guid: baadb80603ed5304eb85af6edc502571, type: 3}
livesThreshold: 1 livesThreshold: 10
--- !u!114 &114321963035045996 --- !u!114 &114321963035045996
MonoBehaviour: MonoBehaviour:
m_ObjectHideFlags: 1 m_ObjectHideFlags: 1
@ -663,8 +664,8 @@ MonoBehaviour:
m_EditorClassIdentifier: m_EditorClassIdentifier:
money: 0 money: 0
lives: 10 lives: 10
towerCosts: 000000000000000000000000
moneyTextObject: {fileID: 0} moneyTextObject: {fileID: 0}
livesTextObject: {fileID: 0}
--- !u!114 &114326414913970376 --- !u!114 &114326414913970376
MonoBehaviour: MonoBehaviour:
m_ObjectHideFlags: 1 m_ObjectHideFlags: 1
@ -678,7 +679,7 @@ MonoBehaviour:
m_EditorClassIdentifier: m_EditorClassIdentifier:
higherSprite: {fileID: 21300000, guid: 7ba187ba05264f64798e5ccc5a527de6, type: 3} higherSprite: {fileID: 21300000, guid: 7ba187ba05264f64798e5ccc5a527de6, type: 3}
lowerSprite: {fileID: 21300000, guid: baadb80603ed5304eb85af6edc502571, type: 3} lowerSprite: {fileID: 21300000, guid: baadb80603ed5304eb85af6edc502571, type: 3}
livesThreshold: 4 livesThreshold: 7
--- !u!114 &114438563625650982 --- !u!114 &114438563625650982
MonoBehaviour: MonoBehaviour:
m_ObjectHideFlags: 1 m_ObjectHideFlags: 1
@ -692,7 +693,7 @@ MonoBehaviour:
m_EditorClassIdentifier: m_EditorClassIdentifier:
higherSprite: {fileID: 21300000, guid: 7ba187ba05264f64798e5ccc5a527de6, type: 3} higherSprite: {fileID: 21300000, guid: 7ba187ba05264f64798e5ccc5a527de6, type: 3}
lowerSprite: {fileID: 21300000, guid: baadb80603ed5304eb85af6edc502571, type: 3} lowerSprite: {fileID: 21300000, guid: baadb80603ed5304eb85af6edc502571, type: 3}
livesThreshold: 5 livesThreshold: 6
--- !u!114 &114571896683674368 --- !u!114 &114571896683674368
MonoBehaviour: MonoBehaviour:
m_ObjectHideFlags: 1 m_ObjectHideFlags: 1
@ -718,7 +719,7 @@ MonoBehaviour:
m_EditorClassIdentifier: m_EditorClassIdentifier:
higherSprite: {fileID: 21300000, guid: 7ba187ba05264f64798e5ccc5a527de6, type: 3} higherSprite: {fileID: 21300000, guid: 7ba187ba05264f64798e5ccc5a527de6, type: 3}
lowerSprite: {fileID: 21300000, guid: baadb80603ed5304eb85af6edc502571, type: 3} lowerSprite: {fileID: 21300000, guid: baadb80603ed5304eb85af6edc502571, type: 3}
livesThreshold: 2 livesThreshold: 9
--- !u!114 &114894975149290724 --- !u!114 &114894975149290724
MonoBehaviour: MonoBehaviour:
m_ObjectHideFlags: 1 m_ObjectHideFlags: 1
@ -743,7 +744,7 @@ MonoBehaviour:
m_EditorClassIdentifier: m_EditorClassIdentifier:
higherSprite: {fileID: 21300000, guid: 7ba187ba05264f64798e5ccc5a527de6, type: 3} higherSprite: {fileID: 21300000, guid: 7ba187ba05264f64798e5ccc5a527de6, type: 3}
lowerSprite: {fileID: 21300000, guid: baadb80603ed5304eb85af6edc502571, type: 3} lowerSprite: {fileID: 21300000, guid: baadb80603ed5304eb85af6edc502571, type: 3}
livesThreshold: 9 livesThreshold: 2
--- !u!114 &114924119225117340 --- !u!114 &114924119225117340
MonoBehaviour: MonoBehaviour:
m_ObjectHideFlags: 1 m_ObjectHideFlags: 1
@ -757,7 +758,7 @@ MonoBehaviour:
m_EditorClassIdentifier: m_EditorClassIdentifier:
higherSprite: {fileID: 21300000, guid: 7ba187ba05264f64798e5ccc5a527de6, type: 3} higherSprite: {fileID: 21300000, guid: 7ba187ba05264f64798e5ccc5a527de6, type: 3}
lowerSprite: {fileID: 21300000, guid: baadb80603ed5304eb85af6edc502571, type: 3} lowerSprite: {fileID: 21300000, guid: baadb80603ed5304eb85af6edc502571, type: 3}
livesThreshold: 8 livesThreshold: 3
--- !u!212 &212052167362182582 --- !u!212 &212052167362182582
SpriteRenderer: SpriteRenderer:
m_ObjectHideFlags: 1 m_ObjectHideFlags: 1
@ -1112,8 +1113,8 @@ SpriteRenderer:
m_AutoUVMaxDistance: 0.5 m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89 m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0} m_LightmapParameters: {fileID: 0}
m_SortingLayerID: 0 m_SortingLayerID: -1577246843
m_SortingLayer: 0 m_SortingLayer: 2
m_SortingOrder: 0 m_SortingOrder: 0
m_Sprite: {fileID: 21300000, guid: 44c980550aedaac4793c6e1f95e084bc, type: 3} m_Sprite: {fileID: 21300000, guid: 44c980550aedaac4793c6e1f95e084bc, type: 3}
m_Color: {r: 1, g: 1, b: 1, a: 1} m_Color: {r: 1, g: 1, b: 1, a: 1}

View file

@ -0,0 +1,129 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1001 &100100000
Prefab:
m_ObjectHideFlags: 1
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 0}
m_Modifications: []
m_RemovedComponents: []
m_SourcePrefab: {fileID: 0}
m_RootGameObject: {fileID: 1527219696020318}
m_IsPrefabAsset: 1
--- !u!1 &1527219696020318
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
serializedVersion: 6
m_Component:
- component: {fileID: 4818425248247040}
- component: {fileID: 212666681993251584}
- component: {fileID: 114116277764334902}
- component: {fileID: 61277172879186436}
m_Layer: 0
m_Name: Snare Projectile
m_TagString: Hit
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &4818425248247040
Transform:
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1527219696020318}
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_Children: []
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!61 &61277172879186436
BoxCollider2D:
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1527219696020318}
m_Enabled: 1
m_Density: 1
m_Material: {fileID: 0}
m_IsTrigger: 1
m_UsedByEffector: 0
m_UsedByComposite: 0
m_Offset: {x: 0, y: 0}
m_SpriteTilingProperty:
border: {x: 0, y: 0, z: 0, w: 0}
pivot: {x: 0.5, y: 0.5}
oldSize: {x: 1, y: 1}
newSize: {x: 0.5, y: 0.5}
adaptiveTilingThreshold: 0.5
drawMode: 0
adaptiveTiling: 0
m_AutoTiling: 0
serializedVersion: 2
m_Size: {x: 0.5, y: 0.5}
m_EdgeRadius: 0
--- !u!114 &114116277764334902
MonoBehaviour:
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1527219696020318}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 12e817cc5c12bdd4bb95e359298b8d56, type: 3}
m_Name:
m_EditorClassIdentifier:
damage: 12
maxRange: 10
speed: 8
--- !u!212 &212666681993251584
SpriteRenderer:
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1527219696020318}
m_Enabled: 1
m_CastShadows: 0
m_ReceiveShadows: 0
m_DynamicOccludee: 1
m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1
m_RenderingLayerMask: 4294967295
m_Materials:
- {fileID: 10754, guid: 0000000000000000f000000000000000, type: 0}
m_StaticBatchInfo:
firstSubMesh: 0
subMeshCount: 0
m_StaticBatchRoot: {fileID: 0}
m_ProbeAnchor: {fileID: 0}
m_LightProbeVolumeOverride: {fileID: 0}
m_ScaleInLightmap: 1
m_PreserveUVs: 0
m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0
m_StitchLightmapSeams: 0
m_SelectedEditorRenderState: 0
m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0}
m_SortingLayerID: -1738644517
m_SortingLayer: 1
m_SortingOrder: 0
m_Sprite: {fileID: 21300000, guid: d5ff12c405991e8499ef1dda13fcf028, type: 3}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_FlipX: 0
m_FlipY: 0
m_DrawMode: 0
m_Size: {x: 0.5, y: 0.5}
m_AdaptiveModeThreshold: 0.5
m_SpriteTileMode: 0
m_WasSpriteAssigned: 1
m_MaskInteraction: 0
m_SpriteSortPoint: 0

View file

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 8b427938956f96c4c9facb6397680650
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 100100000
userData:
assetBundleName:
assetBundleVariant:

View file

@ -38,7 +38,7 @@ Transform:
m_PrefabInternal: {fileID: 100100000} m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1790912687524718} m_GameObject: {fileID: 1790912687524718}
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: 6, y: -1.5, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1} m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: [] m_Children: []
m_Father: {fileID: 0} m_Father: {fileID: 0}
@ -177,6 +177,10 @@ MonoBehaviour:
m_EditorClassIdentifier: m_EditorClassIdentifier:
standardSprite: {fileID: 21300000, guid: 507ee0c49799ed2498ae8dad87342cd4, type: 3} standardSprite: {fileID: 21300000, guid: 507ee0c49799ed2498ae8dad87342cd4, type: 3}
alternateSprite: {fileID: 21300000, guid: c3686ecb6c931114082a4e8deac546f7, type: 3} alternateSprite: {fileID: 21300000, guid: c3686ecb6c931114082a4e8deac546f7, type: 3}
projectileObject: {fileID: 1527219696020318, guid: 8b427938956f96c4c9facb6397680650,
type: 2}
maxRange: 5
maxDamage: 12
--- !u!114 &114865138164003484 --- !u!114 &114865138164003484
MonoBehaviour: MonoBehaviour:
m_ObjectHideFlags: 1 m_ObjectHideFlags: 1

View file

@ -413,26 +413,6 @@ Prefab:
propertyPath: moneyTextObject propertyPath: moneyTextObject
value: value:
objectReference: {fileID: 244445659} objectReference: {fileID: 244445659}
- target: {fileID: 114321963035045996, guid: 75e554cdca74b174b8f51d9615688c48,
type: 2}
propertyPath: livesTextObject
value:
objectReference: {fileID: 0}
- target: {fileID: 114153136693258118, guid: 75e554cdca74b174b8f51d9615688c48,
type: 2}
propertyPath: bpm
value: 120
objectReference: {fileID: 0}
- target: {fileID: 212503120060765600, guid: 75e554cdca74b174b8f51d9615688c48,
type: 2}
propertyPath: m_SortingLayerID
value: -1577246843
objectReference: {fileID: 0}
- target: {fileID: 212503120060765600, guid: 75e554cdca74b174b8f51d9615688c48,
type: 2}
propertyPath: m_SortingLayer
value: 2
objectReference: {fileID: 0}
m_RemovedComponents: [] m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 75e554cdca74b174b8f51d9615688c48, type: 2} m_SourcePrefab: {fileID: 100100000, guid: 75e554cdca74b174b8f51d9615688c48, type: 2}
m_IsPrefabAsset: 0 m_IsPrefabAsset: 0

View file

@ -113,6 +113,48 @@ NavMeshSettings:
debug: debug:
m_Flags: 0 m_Flags: 0
m_NavMeshData: {fileID: 0} m_NavMeshData: {fileID: 0}
--- !u!1001 &5899286
Prefab:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 0}
m_Modifications:
- target: {fileID: 4390904458017506, guid: f84d521163ebde447879f581a32ca118, type: 2}
propertyPath: m_LocalPosition.x
value: 6
objectReference: {fileID: 0}
- target: {fileID: 4390904458017506, guid: f84d521163ebde447879f581a32ca118, type: 2}
propertyPath: m_LocalPosition.y
value: -1.5
objectReference: {fileID: 0}
- target: {fileID: 4390904458017506, guid: f84d521163ebde447879f581a32ca118, type: 2}
propertyPath: m_LocalPosition.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4390904458017506, guid: f84d521163ebde447879f581a32ca118, type: 2}
propertyPath: m_LocalRotation.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4390904458017506, guid: f84d521163ebde447879f581a32ca118, type: 2}
propertyPath: m_LocalRotation.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4390904458017506, guid: f84d521163ebde447879f581a32ca118, type: 2}
propertyPath: m_LocalRotation.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4390904458017506, guid: f84d521163ebde447879f581a32ca118, type: 2}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: 4390904458017506, guid: f84d521163ebde447879f581a32ca118, type: 2}
propertyPath: m_RootOrder
value: 2
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: f84d521163ebde447879f581a32ca118, type: 2}
m_IsPrefabAsset: 0
--- !u!1 &40773579 --- !u!1 &40773579
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@ -190,6 +232,325 @@ Transform:
m_Father: {fileID: 0} m_Father: {fileID: 0}
m_RootOrder: 0 m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &476055946
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 476055947}
- component: {fileID: 476055949}
- component: {fileID: 476055948}
m_Layer: 5
m_Name: Text (1)
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &476055947
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 476055946}
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_Children: []
m_Father: {fileID: 1080839405}
m_RootOrder: 2
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: 7.5, y: 0}
m_SizeDelta: {x: 2, y: 1}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &476055948
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 476055946}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 708705254, guid: f70555f144d8491a825f0804e09c671c, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 0, g: 0, b: 0, a: 1}
m_RaycastTarget: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI,
Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
m_FontData:
m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0}
m_FontSize: 300
m_FontStyle: 0
m_BestFit: 0
m_MinSize: 0
m_MaxSize: 300
m_Alignment: 4
m_AlignByGeometry: 0
m_RichText: 1
m_HorizontalOverflow: 1
m_VerticalOverflow: 1
m_LineSpacing: 1
m_Text: X
--- !u!222 &476055949
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 476055946}
m_CullTransparentMesh: 0
--- !u!1 &697568882
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 1568105291510024, guid: 75e554cdca74b174b8f51d9615688c48,
type: 2}
m_PrefabInternal: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 697568886}
- component: {fileID: 697568885}
- component: {fileID: 697568884}
- component: {fileID: 697568883}
m_Layer: 0
m_Name: GameController
m_TagString: GameController
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!82 &697568883
AudioSource:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 82404362739563692, guid: 75e554cdca74b174b8f51d9615688c48,
type: 2}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 697568882}
m_Enabled: 1
serializedVersion: 4
OutputAudioMixerGroup: {fileID: 0}
m_audioClip: {fileID: 0}
m_PlayOnAwake: 1
m_Volume: 0.1
m_Pitch: 1
Loop: 1
Mute: 0
Spatialize: 0
SpatializePostEffects: 0
Priority: 128
DopplerLevel: 1
MinDistance: 1
MaxDistance: 500
Pan2D: 0
rolloffMode: 0
BypassEffects: 0
BypassListenerEffects: 0
BypassReverbZones: 0
rolloffCustomCurve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 1
inSlope: 0
outSlope: 0
tangentMode: 0
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
- serializedVersion: 3
time: 1
value: 0
inSlope: 0
outSlope: 0
tangentMode: 0
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
panLevelCustomCurve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 0
inSlope: 0
outSlope: 0
tangentMode: 0
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
spreadCustomCurve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 0
inSlope: 0
outSlope: 0
tangentMode: 0
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
reverbZoneMixCustomCurve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 1
inSlope: 0
outSlope: 0
tangentMode: 0
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
--- !u!114 &697568884
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 114321963035045996, guid: 75e554cdca74b174b8f51d9615688c48,
type: 2}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 697568882}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: def57d6e144c2bf4d9f47d39dffc1392, type: 3}
m_Name:
m_EditorClassIdentifier:
money: 0
lives: 10
towerCosts: 000000000000000000000000
moneyTextObject: {fileID: 0}
--- !u!114 &697568885
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 114153136693258118, guid: 75e554cdca74b174b8f51d9615688c48,
type: 2}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 697568882}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 03535b255b63aaa4b8f4718a4e79b51d, type: 3}
m_Name:
m_EditorClassIdentifier:
bpm: 120
delay: 0
songTime: 0
--- !u!4 &697568886
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 4433814812019978, guid: 75e554cdca74b174b8f51d9615688c48,
type: 2}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 697568882}
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_Children: []
m_Father: {fileID: 0}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1001 &732753365
Prefab:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 0}
m_Modifications:
- target: {fileID: 4449562961225802, guid: 8436f60a30d755346a1829fc1154f0a2, type: 2}
propertyPath: m_LocalPosition.x
value: 6
objectReference: {fileID: 0}
- target: {fileID: 4449562961225802, guid: 8436f60a30d755346a1829fc1154f0a2, type: 2}
propertyPath: m_LocalPosition.y
value: 1.5
objectReference: {fileID: 0}
- target: {fileID: 4449562961225802, guid: 8436f60a30d755346a1829fc1154f0a2, type: 2}
propertyPath: m_LocalPosition.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4449562961225802, guid: 8436f60a30d755346a1829fc1154f0a2, type: 2}
propertyPath: m_LocalRotation.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4449562961225802, guid: 8436f60a30d755346a1829fc1154f0a2, type: 2}
propertyPath: m_LocalRotation.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4449562961225802, guid: 8436f60a30d755346a1829fc1154f0a2, type: 2}
propertyPath: m_LocalRotation.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4449562961225802, guid: 8436f60a30d755346a1829fc1154f0a2, type: 2}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: 4449562961225802, guid: 8436f60a30d755346a1829fc1154f0a2, type: 2}
propertyPath: m_RootOrder
value: 4
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 8436f60a30d755346a1829fc1154f0a2, type: 2}
m_IsPrefabAsset: 0
--- !u!1001 &756839715
Prefab:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 0}
m_Modifications:
- target: {fileID: 4473836488108546, guid: 68f4cf9ed4f721340aec1ee79ef4c967, type: 2}
propertyPath: m_LocalPosition.x
value: 6
objectReference: {fileID: 0}
- target: {fileID: 4473836488108546, guid: 68f4cf9ed4f721340aec1ee79ef4c967, type: 2}
propertyPath: m_LocalPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4473836488108546, guid: 68f4cf9ed4f721340aec1ee79ef4c967, type: 2}
propertyPath: m_LocalPosition.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4473836488108546, guid: 68f4cf9ed4f721340aec1ee79ef4c967, type: 2}
propertyPath: m_LocalRotation.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4473836488108546, guid: 68f4cf9ed4f721340aec1ee79ef4c967, type: 2}
propertyPath: m_LocalRotation.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4473836488108546, guid: 68f4cf9ed4f721340aec1ee79ef4c967, type: 2}
propertyPath: m_LocalRotation.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4473836488108546, guid: 68f4cf9ed4f721340aec1ee79ef4c967, type: 2}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: 4473836488108546, guid: 68f4cf9ed4f721340aec1ee79ef4c967, type: 2}
propertyPath: m_RootOrder
value: 3
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 68f4cf9ed4f721340aec1ee79ef4c967, type: 2}
m_IsPrefabAsset: 0
--- !u!1 &835239383 --- !u!1 &835239383
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@ -224,7 +585,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.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: 0, y: 0} m_AnchoredPosition: {x: 0, y: 0.2}
m_SizeDelta: {x: 7.5, y: 3.708} m_SizeDelta: {x: 7.5, y: 3.708}
m_Pivot: {x: 0.5, y: 0.5} m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &835239385 --- !u!114 &835239385
@ -325,6 +686,156 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 8a18338602768f84dbf8f60767c96f58, type: 3} m_Script: {fileID: 11500000, guid: 8a18338602768f84dbf8f60767c96f58, type: 3}
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
--- !u!1 &963202459
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 963202460}
- component: {fileID: 963202462}
- component: {fileID: 963202461}
m_Layer: 5
m_Name: Text (2)
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &963202460
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 963202459}
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_Children: []
m_Father: {fileID: 1080839405}
m_RootOrder: 3
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: 7.5, y: -1.5}
m_SizeDelta: {x: 2, y: 1}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &963202461
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 963202459}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 708705254, guid: f70555f144d8491a825f0804e09c671c, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 0, g: 0, b: 0, a: 1}
m_RaycastTarget: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI,
Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
m_FontData:
m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0}
m_FontSize: 300
m_FontStyle: 0
m_BestFit: 0
m_MinSize: 0
m_MaxSize: 300
m_Alignment: 4
m_AlignByGeometry: 0
m_RichText: 1
m_HorizontalOverflow: 1
m_VerticalOverflow: 1
m_LineSpacing: 1
m_Text: C
--- !u!222 &963202462
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 963202459}
m_CullTransparentMesh: 0
--- !u!1 &1053050556
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1053050557}
- component: {fileID: 1053050559}
- component: {fileID: 1053050558}
m_Layer: 5
m_Name: Text
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &1053050557
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1053050556}
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_Children: []
m_Father: {fileID: 1080839405}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: 7.5, y: 1.5}
m_SizeDelta: {x: 2, y: 1}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &1053050558
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1053050556}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 708705254, guid: f70555f144d8491a825f0804e09c671c, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 0, g: 0, b: 0, a: 1}
m_RaycastTarget: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI,
Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
m_FontData:
m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0}
m_FontSize: 300
m_FontStyle: 0
m_BestFit: 0
m_MinSize: 4
m_MaxSize: 300
m_Alignment: 4
m_AlignByGeometry: 0
m_RichText: 1
m_HorizontalOverflow: 1
m_VerticalOverflow: 1
m_LineSpacing: 1
m_Text: Z
--- !u!222 &1053050559
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1053050556}
m_CullTransparentMesh: 0
--- !u!1 &1080839401 --- !u!1 &1080839401
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@ -371,7 +882,7 @@ MonoBehaviour:
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
m_UiScaleMode: 0 m_UiScaleMode: 0
m_ReferencePixelsPerUnit: 100 m_ReferencePixelsPerUnit: 600
m_ScaleFactor: 1 m_ScaleFactor: 1
m_ReferenceResolution: {x: 800, y: 600} m_ReferenceResolution: {x: 800, y: 600}
m_ScreenMatchMode: 0 m_ScreenMatchMode: 0
@ -379,7 +890,7 @@ MonoBehaviour:
m_PhysicalUnit: 3 m_PhysicalUnit: 3
m_FallbackScreenDPI: 96 m_FallbackScreenDPI: 96
m_DefaultSpriteDPI: 96 m_DefaultSpriteDPI: 96
m_DynamicPixelsPerUnit: 1 m_DynamicPixelsPerUnit: 600
--- !u!223 &1080839404 --- !u!223 &1080839404
Canvas: Canvas:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@ -411,13 +922,16 @@ RectTransform:
m_LocalScale: {x: 1, y: 1, z: 1} m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: m_Children:
- {fileID: 835239384} - {fileID: 835239384}
- {fileID: 1053050557}
- {fileID: 476055947}
- {fileID: 963202460}
m_Father: {fileID: 0} m_Father: {fileID: 0}
m_RootOrder: 1 m_RootOrder: 5
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: 0}
m_AnchorMax: {x: 0, y: 0} m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 0, y: 0} m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 17.75, y: 10} m_SizeDelta: {x: 17.8, y: 10}
m_Pivot: {x: 0.5, y: 0.5} m_Pivot: {x: 0.5, y: 0.5}
--- !u!1 &1181808982 --- !u!1 &1181808982
GameObject: GameObject:
@ -479,5 +993,5 @@ Transform:
m_LocalScale: {x: 1, y: 1, z: 1} m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: [] m_Children: []
m_Father: {fileID: 0} m_Father: {fileID: 0}
m_RootOrder: 2 m_RootOrder: 6
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}

711
Assets/Scenes/Over.unity Normal file
View file

@ -0,0 +1,711 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!29 &1
OcclusionCullingSettings:
m_ObjectHideFlags: 0
serializedVersion: 2
m_OcclusionBakeSettings:
smallestOccluder: 5
smallestHole: 0.25
backfaceThreshold: 100
m_SceneGUID: 00000000000000000000000000000000
m_OcclusionCullingData: {fileID: 0}
--- !u!104 &2
RenderSettings:
m_ObjectHideFlags: 0
serializedVersion: 9
m_Fog: 0
m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1}
m_FogMode: 3
m_FogDensity: 0.01
m_LinearFogStart: 0
m_LinearFogEnd: 300
m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1}
m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1}
m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1}
m_AmbientIntensity: 1
m_AmbientMode: 3
m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1}
m_SkyboxMaterial: {fileID: 0}
m_HaloStrength: 0.5
m_FlareStrength: 1
m_FlareFadeSpeed: 3
m_HaloTexture: {fileID: 0}
m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0}
m_DefaultReflectionMode: 0
m_DefaultReflectionResolution: 128
m_ReflectionBounces: 1
m_ReflectionIntensity: 1
m_CustomReflection: {fileID: 0}
m_Sun: {fileID: 0}
m_IndirectSpecularColor: {r: 0, g: 0, b: 0, a: 1}
m_UseRadianceAmbientProbe: 0
--- !u!157 &3
LightmapSettings:
m_ObjectHideFlags: 0
serializedVersion: 11
m_GIWorkflowMode: 1
m_GISettings:
serializedVersion: 2
m_BounceScale: 1
m_IndirectOutputScale: 1
m_AlbedoBoost: 1
m_TemporalCoherenceThreshold: 1
m_EnvironmentLightingMode: 0
m_EnableBakedLightmaps: 0
m_EnableRealtimeLightmaps: 0
m_LightmapEditorSettings:
serializedVersion: 10
m_Resolution: 2
m_BakeResolution: 40
m_AtlasSize: 1024
m_AO: 0
m_AOMaxDistance: 1
m_CompAOExponent: 1
m_CompAOExponentDirect: 0
m_Padding: 2
m_LightmapParameters: {fileID: 0}
m_LightmapsBakeMode: 1
m_TextureCompression: 1
m_FinalGather: 0
m_FinalGatherFiltering: 1
m_FinalGatherRayCount: 256
m_ReflectionCompression: 2
m_MixedBakeMode: 2
m_BakeBackend: 1
m_PVRSampling: 1
m_PVRDirectSampleCount: 32
m_PVRSampleCount: 500
m_PVRBounces: 2
m_PVRFilterTypeDirect: 0
m_PVRFilterTypeIndirect: 0
m_PVRFilterTypeAO: 0
m_PVRFilteringMode: 1
m_PVRCulling: 1
m_PVRFilteringGaussRadiusDirect: 1
m_PVRFilteringGaussRadiusIndirect: 5
m_PVRFilteringGaussRadiusAO: 2
m_PVRFilteringAtrousPositionSigmaDirect: 0.5
m_PVRFilteringAtrousPositionSigmaIndirect: 2
m_PVRFilteringAtrousPositionSigmaAO: 1
m_ShowResolutionOverlay: 1
m_LightingDataAsset: {fileID: 0}
m_UseShadowmask: 1
--- !u!196 &4
NavMeshSettings:
serializedVersion: 2
m_ObjectHideFlags: 0
m_BuildSettings:
serializedVersion: 2
agentTypeID: 0
agentRadius: 0.5
agentHeight: 2
agentSlope: 45
agentClimb: 0.4
ledgeDropHeight: 0
maxJumpAcrossDistance: 0
minRegionArea: 2
manualCellSize: 0
cellSize: 0.16666667
manualTileSize: 0
tileSize: 256
accuratePlacement: 0
debug:
m_Flags: 0
m_NavMeshData: {fileID: 0}
--- !u!1 &40773579
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 40773582}
- component: {fileID: 40773581}
- component: {fileID: 40773580}
m_Layer: 0
m_Name: Main Camera
m_TagString: MainCamera
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!81 &40773580
AudioListener:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 40773579}
m_Enabled: 1
--- !u!20 &40773581
Camera:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 40773579}
m_Enabled: 1
serializedVersion: 2
m_ClearFlags: 1
m_BackGroundColor: {r: 1, g: 1, b: 1, a: 0}
m_projectionMatrixMode: 1
m_SensorSize: {x: 36, y: 24}
m_LensShift: {x: 0, y: 0}
m_FocalLength: 50
m_NormalizedViewPortRect:
serializedVersion: 2
x: 0
y: 0
width: 1
height: 1
near clip plane: 0.3
far clip plane: 1000
field of view: 60
orthographic: 1
orthographic size: 5
m_Depth: -1
m_CullingMask:
serializedVersion: 2
m_Bits: 4294967295
m_RenderingPath: -1
m_TargetTexture: {fileID: 0}
m_TargetDisplay: 0
m_TargetEye: 3
m_HDR: 1
m_AllowMSAA: 1
m_AllowDynamicResolution: 0
m_ForceIntoRT: 0
m_OcclusionCulling: 1
m_StereoConvergence: 10
m_StereoSeparation: 0.022
--- !u!4 &40773582
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 40773579}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: -10}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &379823580
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 379823581}
- component: {fileID: 379823583}
- component: {fileID: 379823582}
m_Layer: 5
m_Name: Score
m_TagString: Score
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &379823581
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 379823580}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1.5, y: 1.5, z: 1}
m_Children: []
m_Father: {fileID: 1080839405}
m_RootOrder: 3
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: 0, y: 1}
m_SizeDelta: {x: 11, y: 1}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &379823582
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 379823580}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 708705254, guid: f70555f144d8491a825f0804e09c671c, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1}
m_RaycastTarget: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI,
Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
m_FontData:
m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0}
m_FontSize: 300
m_FontStyle: 0
m_BestFit: 0
m_MinSize: 3
m_MaxSize: 300
m_Alignment: 4
m_AlignByGeometry: 0
m_RichText: 1
m_HorizontalOverflow: 0
m_VerticalOverflow: 0
m_LineSpacing: 1
m_Text: You survived X seconds.
--- !u!222 &379823583
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 379823580}
m_CullTransparentMesh: 0
--- !u!1 &835239383
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 835239384}
- component: {fileID: 835239387}
- component: {fileID: 835239386}
- component: {fileID: 835239388}
- component: {fileID: 835239385}
m_Layer: 5
m_Name: Button
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &835239384
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 835239383}
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_Children: []
m_Father: {fileID: 1080839405}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: -2.2, y: -2.13}
m_SizeDelta: {x: 7.5, y: 3.708}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &835239385
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 835239383}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 1392445389, guid: f70555f144d8491a825f0804e09c671c, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Navigation:
m_Mode: 3
m_SelectOnUp: {fileID: 0}
m_SelectOnDown: {fileID: 0}
m_SelectOnLeft: {fileID: 0}
m_SelectOnRight: {fileID: 0}
m_Transition: 2
m_Colors:
m_NormalColor: {r: 1, g: 1, b: 1, a: 1}
m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1}
m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608}
m_ColorMultiplier: 1
m_FadeDuration: 0.1
m_SpriteState:
m_HighlightedSprite: {fileID: 21300000, guid: f7076241dee78324ba7929e6b570735e,
type: 3}
m_PressedSprite: {fileID: 21300000, guid: f7076241dee78324ba7929e6b570735e, type: 3}
m_DisabledSprite: {fileID: 21300000, guid: afecc653761cd7c4c834d486f9e7e689, type: 3}
m_AnimationTriggers:
m_NormalTrigger: Normal
m_HighlightedTrigger: Highlighted
m_PressedTrigger: Pressed
m_DisabledTrigger: Disabled
m_Interactable: 1
m_TargetGraphic: {fileID: 835239386}
m_OnClick:
m_PersistentCalls:
m_Calls:
- m_Target: {fileID: 835239385}
m_MethodName: BroadcastMessage
m_Mode: 5
m_Arguments:
m_ObjectArgument: {fileID: 0}
m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine
m_IntArgument: 0
m_FloatArgument: 0
m_StringArgument: Play
m_BoolArgument: 0
m_CallState: 2
m_TypeName: UnityEngine.UI.Button+ButtonClickedEvent, UnityEngine.UI, Version=1.0.0.0,
Culture=neutral, PublicKeyToken=null
--- !u!114 &835239386
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 835239383}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI,
Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
m_Sprite: {fileID: 21300000, guid: afecc653761cd7c4c834d486f9e7e689, type: 3}
m_Type: 0
m_PreserveAspect: 0
m_FillCenter: 1
m_FillMethod: 4
m_FillAmount: 1
m_FillClockwise: 1
m_FillOrigin: 0
--- !u!222 &835239387
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 835239383}
m_CullTransparentMesh: 0
--- !u!114 &835239388
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 835239383}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 8a18338602768f84dbf8f60767c96f58, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!1 &854413627
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 854413628}
- component: {fileID: 854413630}
- component: {fileID: 854413629}
m_Layer: 5
m_Name: again?
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &854413628
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 854413627}
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_Children: []
m_Father: {fileID: 1080839405}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: 3.71, y: -3.48}
m_SizeDelta: {x: 2.7, y: 1}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &854413629
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 854413627}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 708705254, guid: f70555f144d8491a825f0804e09c671c, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1}
m_RaycastTarget: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI,
Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
m_FontData:
m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0}
m_FontSize: 300
m_FontStyle: 0
m_BestFit: 0
m_MinSize: 3
m_MaxSize: 300
m_Alignment: 4
m_AlignByGeometry: 0
m_RichText: 1
m_HorizontalOverflow: 0
m_VerticalOverflow: 0
m_LineSpacing: 1
m_Text: again?
--- !u!222 &854413630
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 854413627}
m_CullTransparentMesh: 0
--- !u!1 &1080839401
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1080839405}
- component: {fileID: 1080839404}
- component: {fileID: 1080839403}
- component: {fileID: 1080839402}
m_Layer: 5
m_Name: Canvas
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!114 &1080839402
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1080839401}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 1301386320, guid: f70555f144d8491a825f0804e09c671c, type: 3}
m_Name:
m_EditorClassIdentifier:
m_IgnoreReversedGraphics: 1
m_BlockingObjects: 0
m_BlockingMask:
serializedVersion: 2
m_Bits: 4294967295
--- !u!114 &1080839403
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1080839401}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 1980459831, guid: f70555f144d8491a825f0804e09c671c, type: 3}
m_Name:
m_EditorClassIdentifier:
m_UiScaleMode: 0
m_ReferencePixelsPerUnit: 600
m_ScaleFactor: 1
m_ReferenceResolution: {x: 800, y: 600}
m_ScreenMatchMode: 0
m_MatchWidthOrHeight: 0
m_PhysicalUnit: 3
m_FallbackScreenDPI: 96
m_DefaultSpriteDPI: 96
m_DynamicPixelsPerUnit: 600
--- !u!223 &1080839404
Canvas:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1080839401}
m_Enabled: 1
serializedVersion: 3
m_RenderMode: 2
m_Camera: {fileID: 0}
m_PlaneDistance: 100
m_PixelPerfect: 0
m_ReceivesEvents: 1
m_OverrideSorting: 0
m_OverridePixelPerfect: 0
m_SortingBucketNormalizedSize: 0
m_AdditionalShaderChannelsFlag: 0
m_SortingLayerID: 0
m_SortingOrder: 0
m_TargetDisplay: 0
--- !u!224 &1080839405
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1080839401}
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_Children:
- {fileID: 835239384}
- {fileID: 854413628}
- {fileID: 1149357481}
- {fileID: 379823581}
m_Father: {fileID: 0}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 17.8, y: 10}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!1 &1149357480
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1149357481}
- component: {fileID: 1149357483}
- component: {fileID: 1149357482}
m_Layer: 5
m_Name: Game over!
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &1149357481
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1149357480}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 3, y: 3, z: 1}
m_Children: []
m_Father: {fileID: 1080839405}
m_RootOrder: 2
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: 0, y: 3.5}
m_SizeDelta: {x: 5, y: 1}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &1149357482
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1149357480}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 708705254, guid: f70555f144d8491a825f0804e09c671c, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1}
m_RaycastTarget: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI,
Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
m_FontData:
m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0}
m_FontSize: 300
m_FontStyle: 0
m_BestFit: 0
m_MinSize: 3
m_MaxSize: 300
m_Alignment: 4
m_AlignByGeometry: 0
m_RichText: 1
m_HorizontalOverflow: 0
m_VerticalOverflow: 0
m_LineSpacing: 1
m_Text: Game over!
--- !u!222 &1149357483
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1149357480}
m_CullTransparentMesh: 0
--- !u!1 &1181808982
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1181808985}
- component: {fileID: 1181808984}
- component: {fileID: 1181808983}
m_Layer: 0
m_Name: EventSystem
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!114 &1181808983
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1181808982}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 1077351063, guid: f70555f144d8491a825f0804e09c671c, type: 3}
m_Name:
m_EditorClassIdentifier:
m_HorizontalAxis: Horizontal
m_VerticalAxis: Vertical
m_SubmitButton: Submit
m_CancelButton: Cancel
m_InputActionsPerSecond: 10
m_RepeatDelay: 0.5
m_ForceModuleActive: 0
--- !u!114 &1181808984
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1181808982}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: -619905303, guid: f70555f144d8491a825f0804e09c671c, type: 3}
m_Name:
m_EditorClassIdentifier:
m_FirstSelected: {fileID: 0}
m_sendNavigationEvents: 1
m_DragThreshold: 10
--- !u!4 &1181808985
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1181808982}
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_Children: []
m_Father: {fileID: 0}
m_RootOrder: 2
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}

View file

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: b3190d5ca2b9a164488b703447670060
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View file

@ -5,23 +5,34 @@ using UnityEngine;
public class EnemyStatus : MonoBehaviour { public class EnemyStatus : MonoBehaviour {
public int livesCost = 1; public int livesCost = 1;
public int health = 10;
public int masks = 1; public int masks = 1;
public float baseHealth = 10f;
public float healthPerSecond = 0.6f;
private GameStatus gameStatus; private GameStatus gameStatus;
private SongData songData;
private float health;
void Start() void Start()
{ {
gameStatus = GameObject.FindGameObjectWithTag("GameController").GetComponent<GameStatus>(); gameStatus = GameObject.FindGameObjectWithTag("GameController").GetComponent<GameStatus>();
songData = GameObject.FindGameObjectWithTag("GameController").GetComponent<SongData>();
health = baseHealth + healthPerSecond * songData.songTime;
} }
private void OnTriggerEnter2D(Collider2D collision) private void OnTriggerEnter2D(Collider2D collision)
{ {
KickCollision kickCollision = collision.GetComponent("KickCollision") as KickCollision; KickCollision kickCollision = collision.GetComponent("KickCollision") as KickCollision;
SnareCollision snareCollision = collision.GetComponent("SnareCollision") as SnareCollision;
if (kickCollision != null) if (kickCollision != null)
{ {
health -= kickCollision.damage; health -= kickCollision.damage;
} }
if (snareCollision != null)
{
health -= snareCollision.damage;
Destroy(snareCollision.gameObject);
}
} }
void Update() void Update()

View file

@ -2,24 +2,56 @@
using System.Collections.Generic; using System.Collections.Generic;
using UnityEngine; using UnityEngine;
using UnityEngine.UI; using UnityEngine.UI;
using UnityEngine.SceneManagement;
public class GameStatus : MonoBehaviour { public class GameStatus : MonoBehaviour {
public int money = 0; public int money = 0;
public int lives = 10; public int lives = 10;
public int[] towerCosts = new int[] { 0, 0, 0 };
public GameObject moneyTextObject; public GameObject moneyTextObject;
private SongData songData;
private Text moneyText; private Text moneyText;
private bool gameOver;
void Start() void Start()
{ {
moneyText = moneyTextObject.GetComponent<Text>(); moneyText = moneyTextObject.GetComponent<Text>();
songData = GetComponent<SongData>();
} }
void Update() void Update()
{
if (moneyText != null)
{ {
moneyText.text = money.ToString(); moneyText.text = money.ToString();
} }
if (lives <= 0 && !gameOver)
{
GameOver();
}
else if(gameOver)
{
GameObject.FindGameObjectWithTag("Score").GetComponent<Text>().text = "You survived " + songData.songTime.ToString("0.0") + " seconds.";
Destroy(gameObject);
}
}
void GameOver()
{
gameOver = true;
DontDestroyOnLoad(gameObject);
foreach(Transform child in transform)
{
Destroy(child.gameObject);
}
Time.timeScale = 0;
GetComponent<AudioSource>().Stop();
SceneManager.LoadScene("Over");
}
public void EnemyFinishedPath(GameObject enemy) public void EnemyFinishedPath(GameObject enemy)
{ {

View file

@ -35,7 +35,7 @@ public class HatTower : MonoBehaviour {
{ {
//Calculate the power of the //Calculate the power of the
//power = Sqrt(Cos(pi * t)) //power = Sqrt(Cos(pi * t))
float power = Mathf.Pow(Mathf.Abs(Mathf.Cos(songData.songTime * Mathf.PI * songData.bpm / 30)) * ((cooldown - cooldownRemaining) / cooldown), 2); float power = Mathf.Sqrt(Mathf.Abs(Mathf.Cos(songData.songTime * Mathf.PI * songData.bpm / 30)) * ((cooldown - cooldownRemaining) / cooldown));
//Play the sound //Play the sound
hatSource.volume = power; hatSource.volume = power;
hatSource.Play(); hatSource.Play();

View file

@ -7,9 +7,6 @@ public class LoadSceneOnClick : MonoBehaviour {
public void Play () { public void Play () {
SceneManager.LoadScene("Game"); SceneManager.LoadScene("Game");
Scene menu = SceneManager.GetSceneByName("Menu"); Time.timeScale = 1;
Scene game = SceneManager.GetSceneByName("Game");
SceneManager.SetActiveScene(game);
SceneManager.UnloadSceneAsync(menu);
} }
} }

View file

@ -0,0 +1,23 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class SnareCollision : MonoBehaviour {
public int damage;
public float maxRange;
public float speed;
private float distance = 0;
private void Update()
{
if(distance >= maxRange)
{
Destroy(gameObject);
}
distance += speed * Time.deltaTime;
transform.Translate(Vector3.down * speed * Time.deltaTime);
}
}

View file

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

View file

@ -6,6 +6,9 @@ public class SnareTower : MonoBehaviour {
public Sprite standardSprite; public Sprite standardSprite;
public Sprite alternateSprite; public Sprite alternateSprite;
public GameObject projectileObject;
public float maxRange;
public float maxDamage;
private AudioSource snareSource; private AudioSource snareSource;
private SongData songData; private SongData songData;
@ -38,6 +41,12 @@ public class SnareTower : MonoBehaviour {
//Play the sound //Play the sound
snareSource.volume = power; snareSource.volume = power;
snareSource.Play(); snareSource.Play();
//Instantiate the projectile
GameObject projectile = Instantiate(projectileObject, transform.position, transform.rotation);
SnareCollision sc = projectile.GetComponent<SnareCollision>();
sc.maxRange = power * maxRange;
sc.damage = Mathf.CeilToInt(power * maxDamage);
projectile.transform.localScale = new Vector3(power, power, 1);
//Start the cooldown //Start the cooldown
cooldownRemaining = cooldown; cooldownRemaining = cooldown;
//Change the sprite //Change the sprite

View file

@ -5,11 +5,16 @@ using UnityEngine;
public class TowerPlacer : MonoBehaviour public class TowerPlacer : MonoBehaviour
{ {
public GameObject selected = null; public GameObject selected = null;
GameStatus gameStatus;
TowerSelector towerSelector;
SpriteRenderer cursorSprite; SpriteRenderer cursorSprite;
SpriteRenderer towerGhost; SpriteRenderer towerGhost;
void Start() void Start()
{ {
gameStatus = GameObject.FindGameObjectWithTag("GameController").GetComponent<GameStatus>();
towerSelector = gameObject.GetComponent<TowerSelector>();
SpriteRenderer[] spriteRenderers = gameObject.GetComponentsInChildren<SpriteRenderer>(); SpriteRenderer[] spriteRenderers = gameObject.GetComponentsInChildren<SpriteRenderer>();
foreach (SpriteRenderer spriteRenderer in spriteRenderers) foreach (SpriteRenderer spriteRenderer in spriteRenderers)
{ {
@ -23,27 +28,49 @@ public class TowerPlacer : MonoBehaviour
} }
void Update () { void Update () {
//Check if the player has enough money to place the tower
bool hasEnoughMoney = gameStatus.money >= gameStatus.towerCosts[towerSelector.index];
//Check if there's nothing else under the cursor //Check if there's nothing else under the cursor
Collider2D collider = Physics2D.OverlapPoint(transform.position); Collider2D collider = Physics2D.OverlapPoint(transform.position);
if (collider == null || collider.tag == "Hit") if (collider == null || collider.tag == "Hit")
{
if (hasEnoughMoney)
{ {
cursorSprite.color = Color.white; cursorSprite.color = Color.white;
towerGhost.color = Color.white; }
else
{
cursorSprite.color = Color.yellow;
}
towerGhost.color = new Color(towerGhost.color.r, towerGhost.color.g, towerGhost.color.b, 1);
} }
else else
{ {
cursorSprite.color = Color.red; cursorSprite.color = Color.red;
towerGhost.color = new Color(1, 1, 1, 0); towerGhost.color = new Color(towerGhost.color.r, towerGhost.color.g, towerGhost.color.b, 0);
} }
if (Input.GetMouseButtonDown(0)) if (Input.GetMouseButtonDown(0))
{ {
//Check if something is selected //Check if the player has enough money
if (selected == null) return; if (!hasEnoughMoney) return;
//Ensure there is nothing below //Ensure there is nothing below
if (collider != null && collider.tag != "Hit") return; if (collider != null && collider.tag != "Hit") return;
//Place the item //Place the item
Vector3 position = new Vector3(transform.position.x, transform.position.y, 0); Vector3 position = new Vector3(transform.position.x, transform.position.y, 0);
Instantiate(selected, position, transform.rotation); Instantiate(selected, position, transform.rotation);
//Deduct the money
gameStatus.money -= gameStatus.towerCosts[towerSelector.index];
//Increase the costs
if(gameStatus.towerCosts[towerSelector.index] == 0)
{
//TODO: quick hack
gameStatus.towerCosts = new int[] { 1, 1, 1 };
}
else
{
gameStatus.towerCosts[towerSelector.index] *= 2;
}
} }
} }
} }

View file

@ -5,8 +5,8 @@ using UnityEngine;
public class TowerSelector : MonoBehaviour { public class TowerSelector : MonoBehaviour {
public GameObject[] towerList; public GameObject[] towerList;
public int index;
private int index;
private TowerPlacer towerPlacer; private TowerPlacer towerPlacer;
private SpriteRenderer towerGhost; private SpriteRenderer towerGhost;

View file

@ -45,7 +45,7 @@ TextureImporter:
spriteMeshType: 1 spriteMeshType: 1
alignment: 0 alignment: 0
spritePivot: {x: 0.5, y: 0.5} spritePivot: {x: 0.5, y: 0.5}
spritePixelsToUnits: 64 spritePixelsToUnits: 32
spriteBorder: {x: 0, y: 0, z: 0, w: 0} spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spriteGenerateFallbackPhysicsShape: 0 spriteGenerateFallbackPhysicsShape: 0
alphaUsage: 1 alphaUsage: 1

View file

@ -5,7 +5,16 @@ EditorBuildSettings:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
serializedVersion: 2 serializedVersion: 2
m_Scenes: m_Scenes:
- enabled: 0
path:
guid: 00000000000000000000000000000000
- enabled: 1 - enabled: 1
path: Assets/Scenes/SampleScene.unity path: Assets/Scenes/Menu.unity
guid: 9729010b44bf87041aaee0bc130b9c44
- enabled: 1
path: Assets/Scenes/Game.unity
guid: 2cda990e2423bbf4892e6590ba056729 guid: 2cda990e2423bbf4892e6590ba056729
- enabled: 1
path: Assets/Scenes/Over.unity
guid: b3190d5ca2b9a164488b703447670060
m_configObjects: {} m_configObjects: {}

View file

@ -7,6 +7,7 @@ TagManager:
- Enemy - Enemy
- Tower - Tower
- Hit - Hit
- Score
layers: layers:
- Default - Default
- TransparentFX - TransparentFX