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

Forgot to commit some things. Oops!

This commit is contained in:
Steffo 2018-04-22 14:07:55 +02:00
parent 8b5b770e80
commit 619bffb5b0
34 changed files with 4286 additions and 98 deletions

View file

@ -60,13 +60,18 @@
</ItemGroup>
<ItemGroup>
<Compile Include="Assets\Scripts\AlignToGridContinuous.cs" />
<Compile Include="Assets\Scripts\EnemyMovement.cs" />
<Compile Include="Assets\Scripts\EnemyStatus.cs" />
<Compile Include="Assets\Scripts\GameStatus.cs" />
<Compile Include="Assets\Scripts\HatTower.cs" />
<Compile Include="Assets\Scripts\InstantiateEverySeconds.cs" />
<Compile Include="Assets\Scripts\InstantiateOnClick.cs" />
<Compile Include="Assets\Scripts\KickTower.cs" />
<Compile Include="Assets\Scripts\PositionFromMouse.cs" />
<Compile Include="Assets\Scripts\SnareTower.cs" />
<Compile Include="Assets\Scripts\SongData.cs" />
<Compile Include="Assets\Scripts\TowerPlacer.cs" />
<Compile Include="Assets\Scripts\TowerSelector.cs" />
<None Include="Assets\Sounds\credit.txt" />
<Reference Include="UnityEditor.StandardEvents">
<HintPath>C:/Users/stepi/Code/ld41/Library/ScriptAssemblies/UnityEditor.StandardEvents.dll</HintPath>

84
Assets/Ghost.mat Normal file
View file

@ -0,0 +1,84 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 6
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_Name: Ghost
m_Shader: {fileID: 10753, guid: 0000000000000000f000000000000000, type: 0}
m_ShaderKeywords: ETC1_EXTERNAL_ALPHA
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap: {}
disabledShaderPasses: []
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _AlphaTex:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _BumpMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailAlbedoMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailMask:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailNormalMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _EmissionMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MainTex:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MetallicGlossMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _OcclusionMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _ParallaxMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Floats:
- PixelSnap: 0
- _BumpScale: 1
- _Cutoff: 0.5
- _DetailNormalMapScale: 1
- _DstBlend: 0
- _EnableExternalAlpha: 0
- _GlossMapScale: 1
- _Glossiness: 0.5
- _GlossyReflections: 1
- _Metallic: 0
- _Mode: 0
- _OcclusionStrength: 1
- _Parallax: 0.02
- _SmoothnessTextureChannel: 0
- _SpecularHighlights: 1
- _SrcBlend: 1
- _UVSec: 0
- _ZWrite: 1
m_Colors:
- _Color: {r: 1, g: 1, b: 1, a: 0.28235295}
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
- _Flip: {r: 1, g: 1, b: 1, a: 1}
- _RendererColor: {r: 1, g: 1, b: 1, a: 1}

8
Assets/Ghost.mat.meta Normal file
View file

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 3225a247bbdd3804a98458c966a95829
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 2100000
userData:
assetBundleName:
assetBundleVariant:

View file

@ -34,7 +34,7 @@ Transform:
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1968639828739124}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 1.8, y: 1.09, z: 0}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}

129
Assets/Prefabs/Enemy.prefab Normal file
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: 1747561760822266}
m_IsPrefabAsset: 1
--- !u!1 &1747561760822266
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
serializedVersion: 6
m_Component:
- component: {fileID: 4989251043842022}
- component: {fileID: 212102337450718352}
- component: {fileID: 114690864647000458}
- component: {fileID: 114257029466335788}
m_Layer: 0
m_Name: Enemy
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &4989251043842022
Transform:
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1747561760822266}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: -9, y: -1, 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!114 &114257029466335788
MonoBehaviour:
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1747561760822266}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 709ff8451b4165d4d94bfb1b3b535b63, type: 3}
m_Name:
m_EditorClassIdentifier:
livesCost: 1
health: 10
--- !u!114 &114690864647000458
MonoBehaviour:
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1747561760822266}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 2d4d2085b7f2da34283a440009031df1, type: 3}
m_Name:
m_EditorClassIdentifier:
path:
- {x: -7, y: -1, z: 0}
- {x: -7, y: 2, z: 0}
- {x: -5, y: 2, z: 0}
- {x: -5, y: 0, z: 0}
- {x: -2, y: 0, z: 0}
- {x: -2, y: 2, z: 0}
- {x: 0, y: 2, z: 0}
- {x: 0, y: -2, z: 0}
- {x: -5, y: -2, z: 0}
- {x: -5, y: -4, z: 0}
- {x: 2, y: -4, z: 0}
- {x: 2, y: 0, z: 0}
- {x: 4, y: 0, z: 0}
speed: 8
--- !u!212 &212102337450718352
SpriteRenderer:
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1747561760822266}
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: 0
m_SortingLayer: 0
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: 1, y: 1}
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: 6b8295ea9ddce6f49a598b9d52ee00df
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 100100000
userData:
assetBundleName:
assetBundleVariant:

View file

@ -0,0 +1,373 @@
%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: 1931375205411034}
m_IsPrefabAsset: 1
--- !u!1 &1885041436932602
GameObject:
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
serializedVersion: 6
m_Component:
- component: {fileID: 4624677675439614}
- component: {fileID: 212758524482640446}
m_Layer: 0
m_Name: Tower Ghost
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!1 &1931375205411034
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
serializedVersion: 6
m_Component:
- component: {fileID: 4855367425875836}
- component: {fileID: 114788228736104936}
- component: {fileID: 114351781720872926}
- component: {fileID: 82737862789592158}
m_Layer: 0
m_Name: GameController
m_TagString: GameController
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!1 &1951267145744876
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
serializedVersion: 6
m_Component:
- component: {fileID: 4131835586929778}
- component: {fileID: 212292163805447310}
- component: {fileID: 114668229986735790}
- component: {fileID: 114644921366275946}
- component: {fileID: 114172803127918194}
- component: {fileID: 114581508118254142}
m_Layer: 0
m_Name: Cursor
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &4131835586929778
Transform:
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1951267145744876}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: -1}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children:
- {fileID: 4624677675439614}
m_Father: {fileID: 4855367425875836}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!4 &4624677675439614
Transform:
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1885041436932602}
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: 4131835586929778}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!4 &4855367425875836
Transform:
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1931375205411034}
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: 4131835586929778}
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!82 &82737862789592158
AudioSource:
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1931375205411034}
m_Enabled: 1
serializedVersion: 4
OutputAudioMixerGroup: {fileID: 0}
m_audioClip: {fileID: 8300000, guid: c194ff70b588cee438ebb160c48b8686, type: 3}
m_PlayOnAwake: 1
m_Volume: 0.03
m_Pitch: 1
Loop: 0
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 &114172803127918194
MonoBehaviour:
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1951267145744876}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 7c032f99ed9e86f429881bf290ce3c57, type: 3}
m_Name:
m_EditorClassIdentifier:
selected: {fileID: 1353675573854854, guid: 8436f60a30d755346a1829fc1154f0a2, type: 2}
--- !u!114 &114351781720872926
MonoBehaviour:
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1931375205411034}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: def57d6e144c2bf4d9f47d39dffc1392, type: 3}
m_Name:
m_EditorClassIdentifier:
money: 0
lives: 10
moneyTextObject: {fileID: 0}
livesTextObject: {fileID: 0}
--- !u!114 &114581508118254142
MonoBehaviour:
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1951267145744876}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 56e5631403f3f1d4fa97ec77bcdc0d02, type: 3}
m_Name:
m_EditorClassIdentifier:
towerList:
- {fileID: 1353675573854854, guid: 8436f60a30d755346a1829fc1154f0a2, type: 2}
- {fileID: 1116464442260662, guid: 68f4cf9ed4f721340aec1ee79ef4c967, type: 2}
- {fileID: 1790912687524718, guid: f84d521163ebde447879f581a32ca118, type: 2}
--- !u!114 &114644921366275946
MonoBehaviour:
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1951267145744876}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 2a21dfc8c9bdaec4c962368a99c026a1, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!114 &114668229986735790
MonoBehaviour:
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1951267145744876}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 22ddc8a836a68ed45893dbb06b0b3470, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!114 &114788228736104936
MonoBehaviour:
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1931375205411034}
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!212 &212292163805447310
SpriteRenderer:
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1951267145744876}
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: 0
m_SortingLayer: 0
m_SortingOrder: 0
m_Sprite: {fileID: 21300000, guid: 0fa540a80d6283742961f1a940468f2e, type: 3}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_FlipX: 0
m_FlipY: 0
m_DrawMode: 0
m_Size: {x: 1, y: 1}
m_AdaptiveModeThreshold: 0.5
m_SpriteTileMode: 0
m_WasSpriteAssigned: 1
m_MaskInteraction: 0
m_SpriteSortPoint: 0
--- !u!212 &212758524482640446
SpriteRenderer:
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1885041436932602}
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: 2100000, guid: 3225a247bbdd3804a98458c966a95829, type: 2}
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: 0
m_SortingLayer: 0
m_SortingOrder: 0
m_Sprite: {fileID: 21300000, guid: 4f20badc3e7eb924b91b6e10b08c5bc4, type: 3}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_FlipX: 0
m_FlipY: 0
m_DrawMode: 0
m_Size: {x: 1, y: 1}
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: 75e554cdca74b174b8f51d9615688c48
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 100100000
userData:
assetBundleName:
assetBundleVariant:

View file

@ -24,7 +24,7 @@ GameObject:
- component: {fileID: 114539313612277732}
- component: {fileID: 82505325396824290}
m_Layer: 0
m_Name: Charleston Tower
m_Name: Hat Tower
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0

2893
Assets/Prefabs/Map.prefab Normal file

File diff suppressed because it is too large Load diff

View file

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

View file

@ -113,118 +113,250 @@ NavMeshSettings:
debug:
m_Flags: 0
m_NavMeshData: {fileID: 0}
--- !u!1 &505484106
--- !u!1 &244445659
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 505484108}
- component: {fileID: 505484107}
- component: {fileID: 505484109}
- component: {fileID: 505484110}
- component: {fileID: 505484111}
m_Layer: 0
m_Name: Cursor
- component: {fileID: 244445660}
- component: {fileID: 244445662}
- component: {fileID: 244445661}
m_Layer: 5
m_Name: Money Text
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!212 &505484107
SpriteRenderer:
--- !u!224 &244445660
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 505484106}
m_GameObject: {fileID: 244445659}
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: 1713013118}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 1, y: 0}
m_AnchorMax: {x: 1, y: 0}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 160, y: 60}
m_Pivot: {x: 1, y: 0}
--- !u!114 &244445661
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 244445659}
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: 0
m_SortingLayer: 0
m_SortingOrder: 0
m_Sprite: {fileID: 21300000, guid: 0fa540a80d6283742961f1a940468f2e, type: 3}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_FlipX: 0
m_FlipY: 0
m_DrawMode: 0
m_Size: {x: 1, y: 1}
m_AdaptiveModeThreshold: 0.5
m_SpriteTileMode: 0
m_WasSpriteAssigned: 1
m_MaskInteraction: 0
m_SpriteSortPoint: 0
--- !u!4 &505484108
m_EditorHideFlags: 0
m_Script: {fileID: 708705254, guid: f70555f144d8491a825f0804e09c671c, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, 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: 46
m_FontStyle: 0
m_BestFit: 0
m_MinSize: 10
m_MaxSize: 62
m_Alignment: 5
m_AlignByGeometry: 0
m_RichText: 1
m_HorizontalOverflow: 0
m_VerticalOverflow: 0
m_LineSpacing: 1
m_Text: M
--- !u!222 &244445662
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 244445659}
m_CullTransparentMesh: 0
--- !u!1 &280673607
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 280673609}
- component: {fileID: 280673608}
m_Layer: 0
m_Name: Enemy Spawner
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!114 &280673608
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 280673607}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 49c40f26c309ea34883e6f12fd857dc0, type: 3}
m_Name:
m_EditorClassIdentifier:
target: {fileID: 1747561760822266, guid: 6b8295ea9ddce6f49a598b9d52ee00df, type: 2}
period: 1
--- !u!4 &280673609
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 505484106}
m_GameObject: {fileID: 280673607}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: -1}
m_LocalPosition: {x: -9, y: -1, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 1
m_RootOrder: 5
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &505484109
--- !u!1 &506261048
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 506261049}
- component: {fileID: 506261051}
- component: {fileID: 506261050}
m_Layer: 5
m_Name: Lives Text
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &506261049
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 506261048}
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: 1713013118}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 1, y: 1}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 160, y: 60}
m_Pivot: {x: 1, y: 1}
--- !u!114 &506261050
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 505484106}
m_GameObject: {fileID: 506261048}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 22ddc8a836a68ed45893dbb06b0b3470, type: 3}
m_Script: {fileID: 708705254, guid: f70555f144d8491a825f0804e09c671c, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!114 &505484110
MonoBehaviour:
m_Material: {fileID: 0}
m_Color: {r: 1, 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: 46
m_FontStyle: 0
m_BestFit: 0
m_MinSize: 2
m_MaxSize: 62
m_Alignment: 5
m_AlignByGeometry: 0
m_RichText: 1
m_HorizontalOverflow: 0
m_VerticalOverflow: 0
m_LineSpacing: 1
m_Text: L
--- !u!222 &506261051
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 505484106}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 2a21dfc8c9bdaec4c962368a99c026a1, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!114 &505484111
MonoBehaviour:
m_GameObject: {fileID: 506261048}
m_CullTransparentMesh: 0
--- !u!1001 &519203120
Prefab:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 505484106}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 7c032f99ed9e86f429881bf290ce3c57, type: 3}
m_Name:
m_EditorClassIdentifier:
selected: {fileID: 1353675573854854, guid: 8436f60a30d755346a1829fc1154f0a2, type: 2}
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 0}
m_Modifications:
- target: {fileID: 4855367425875836, guid: 75e554cdca74b174b8f51d9615688c48, type: 2}
propertyPath: m_LocalPosition.x
value: -0
objectReference: {fileID: 0}
- target: {fileID: 4855367425875836, guid: 75e554cdca74b174b8f51d9615688c48, type: 2}
propertyPath: m_LocalPosition.y
value: -0
objectReference: {fileID: 0}
- target: {fileID: 4855367425875836, guid: 75e554cdca74b174b8f51d9615688c48, type: 2}
propertyPath: m_LocalPosition.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4855367425875836, guid: 75e554cdca74b174b8f51d9615688c48, type: 2}
propertyPath: m_LocalRotation.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4855367425875836, guid: 75e554cdca74b174b8f51d9615688c48, type: 2}
propertyPath: m_LocalRotation.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4855367425875836, guid: 75e554cdca74b174b8f51d9615688c48, type: 2}
propertyPath: m_LocalRotation.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4855367425875836, guid: 75e554cdca74b174b8f51d9615688c48, type: 2}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: 4855367425875836, guid: 75e554cdca74b174b8f51d9615688c48, type: 2}
propertyPath: m_RootOrder
value: 1
objectReference: {fileID: 0}
- target: {fileID: 114351781720872926, guid: 75e554cdca74b174b8f51d9615688c48,
type: 2}
propertyPath: moneyTextObject
value:
objectReference: {fileID: 244445659}
- target: {fileID: 114351781720872926, guid: 75e554cdca74b174b8f51d9615688c48,
type: 2}
propertyPath: livesTextObject
value:
objectReference: {fileID: 506261048}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 75e554cdca74b174b8f51d9615688c48, type: 2}
m_IsPrefabAsset: 0
--- !u!1 &519420028
GameObject:
m_ObjectHideFlags: 0
@ -273,7 +405,7 @@ Camera:
far clip plane: 1000
field of view: 60
orthographic: 1
orthographic size: 5
orthographic size: 4.5
m_Depth: -1
m_CullingMask:
serializedVersion: 2
@ -296,52 +428,208 @@ Transform:
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 519420028}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: -10}
m_LocalPosition: {x: -0.5, 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 &1708264542
--- !u!1 &972604241
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1708264544}
- component: {fileID: 1708264543}
- component: {fileID: 972604244}
- component: {fileID: 972604243}
- component: {fileID: 972604242}
m_Layer: 0
m_Name: GameController
m_TagString: GameController
m_Name: EventSystem
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!114 &1708264543
--- !u!114 &972604242
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1708264542}
m_GameObject: {fileID: 972604241}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 03535b255b63aaa4b8f4718a4e79b51d, type: 3}
m_Script: {fileID: 1077351063, guid: f70555f144d8491a825f0804e09c671c, type: 3}
m_Name:
m_EditorClassIdentifier:
bpm: 120
delay: 0
songTime: 0
--- !u!4 &1708264544
m_HorizontalAxis: Horizontal
m_VerticalAxis: Vertical
m_SubmitButton: Submit
m_CancelButton: Cancel
m_InputActionsPerSecond: 10
m_RepeatDelay: 0.5
m_ForceModuleActive: 0
--- !u!114 &972604243
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 972604241}
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 &972604244
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1708264542}
m_GameObject: {fileID: 972604241}
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_Children: []
m_Father: {fileID: 0}
m_RootOrder: 3
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1001 &1559664665
Prefab:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 0}
m_Modifications:
- target: {fileID: 4202812021022736, guid: adbccfb25f3d90b438ea1dcd6c6db7c6, type: 2}
propertyPath: m_LocalPosition.x
value: -0.5
objectReference: {fileID: 0}
- target: {fileID: 4202812021022736, guid: adbccfb25f3d90b438ea1dcd6c6db7c6, type: 2}
propertyPath: m_LocalPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4202812021022736, guid: adbccfb25f3d90b438ea1dcd6c6db7c6, type: 2}
propertyPath: m_LocalPosition.z
value: 1
objectReference: {fileID: 0}
- target: {fileID: 4202812021022736, guid: adbccfb25f3d90b438ea1dcd6c6db7c6, type: 2}
propertyPath: m_LocalRotation.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4202812021022736, guid: adbccfb25f3d90b438ea1dcd6c6db7c6, type: 2}
propertyPath: m_LocalRotation.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4202812021022736, guid: adbccfb25f3d90b438ea1dcd6c6db7c6, type: 2}
propertyPath: m_LocalRotation.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4202812021022736, guid: adbccfb25f3d90b438ea1dcd6c6db7c6, type: 2}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: 4202812021022736, guid: adbccfb25f3d90b438ea1dcd6c6db7c6, type: 2}
propertyPath: m_RootOrder
value: 4
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: adbccfb25f3d90b438ea1dcd6c6db7c6, type: 2}
m_IsPrefabAsset: 0
--- !u!1 &1713013114
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1713013118}
- component: {fileID: 1713013117}
- component: {fileID: 1713013116}
- component: {fileID: 1713013115}
m_Layer: 5
m_Name: Canvas
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!114 &1713013115
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1713013114}
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 &1713013116
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1713013114}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 1980459831, guid: f70555f144d8491a825f0804e09c671c, type: 3}
m_Name:
m_EditorClassIdentifier:
m_UiScaleMode: 0
m_ReferencePixelsPerUnit: 100
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: 1
--- !u!223 &1713013117
Canvas:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1713013114}
m_Enabled: 1
serializedVersion: 3
m_RenderMode: 0
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 &1713013118
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1713013114}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 0, y: 0, z: 0}
m_Children:
- {fileID: 506261049}
- {fileID: 244445660}
m_Father: {fileID: 0}
m_RootOrder: 2
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: 0, y: 0}
m_Pivot: {x: 0, y: 0}

View file

@ -0,0 +1,29 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class EnemyMovement : MonoBehaviour {
public Vector3[] path;
public float speed = 1;
private int nextStop = 0;
private GameStatus gameStatus;
void Start () {
gameStatus = GameObject.FindGameObjectWithTag("GameController").GetComponent<GameStatus>();
}
void Update () {
Vector3 newPosition = Vector3.MoveTowards(transform.position, path[nextStop], speed * Time.deltaTime);
if (Vector3.Distance(transform.position, newPosition) == 0)
{
nextStop++;
if (nextStop >= path.Length)
{
gameStatus.EnemyFinishedPath(gameObject);
}
}
transform.position = newPosition;
}
}

View file

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

View file

@ -0,0 +1,10 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class EnemyStatus : MonoBehaviour {
public int livesCost = 1;
public int health = 10;
}

View file

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

View file

@ -0,0 +1,34 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class GameStatus : MonoBehaviour {
public int money = 0;
public int lives = 10;
public GameObject moneyTextObject;
private Text moneyText;
public GameObject livesTextObject;
private Text livesText;
void Start()
{
moneyText = moneyTextObject.GetComponent<Text>();
livesText = livesTextObject.GetComponent<Text>();
}
void Update()
{
moneyText.text = money.ToString();
livesText.text = lives.ToString();
}
public void EnemyFinishedPath(GameObject enemy)
{
Debug.Log("Enemy reached target.");
lives -= enemy.GetComponent<EnemyStatus>().livesCost;
Destroy(enemy);
}
}

View file

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

View file

@ -6,6 +6,7 @@ public class HatTower : MonoBehaviour {
private AudioSource hatSource;
private SongData songData;
private SpriteRenderer spriteRenderer;
private float cooldown;
private float cooldownRemaining = 0;
@ -13,8 +14,12 @@ public class HatTower : MonoBehaviour {
{
hatSource = gameObject.GetComponent<AudioSource>();
songData = GameObject.FindGameObjectWithTag("GameController").GetComponent<SongData>();
spriteRenderer = gameObject.GetComponent<SpriteRenderer>();
//The period is 30 / bpm
cooldown = 11 / songData.bpm;
//Find next beat
float nextBeatIn = 30 / songData.bpm - (songData.songTime - (Mathf.Floor(songData.songTime / 30 * songData.bpm) * 30 / songData.bpm));
InvokeRepeating("OnBeat", nextBeatIn, 30 / songData.bpm);
}
void Update () {
@ -36,4 +41,15 @@ public class HatTower : MonoBehaviour {
}
}
}
void OnBeat()
{
spriteRenderer.color = Color.black;
Invoke("ResetColor", Time.fixedDeltaTime * 2);
}
void ResetColor()
{
spriteRenderer.color = Color.white;
}
}

View file

@ -0,0 +1,20 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class InstantiateEverySeconds : MonoBehaviour {
public GameObject target;
public float period;
private float cooldown = 0;
void Update () {
cooldown -= Time.deltaTime;
if (cooldown <= 0)
{
Instantiate(target);
cooldown = period;
}
}
}

View file

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

View file

@ -6,6 +6,7 @@ public class KickTower : MonoBehaviour {
private AudioSource kickSource;
private SongData songData;
private SpriteRenderer spriteRenderer;
private float cooldown;
private float cooldownRemaining = 0;
@ -13,8 +14,12 @@ public class KickTower : MonoBehaviour {
{
kickSource = gameObject.GetComponent<AudioSource>();
songData = GameObject.FindGameObjectWithTag("GameController").GetComponent<SongData>();
spriteRenderer = gameObject.GetComponent<SpriteRenderer>();
//The period is 120 / bpm
cooldown = 44 / songData.bpm;
//Find next beat
float nextBeatIn = 120 / songData.bpm - (songData.songTime - (Mathf.Floor(songData.songTime / 120 * songData.bpm) * 120 / songData.bpm));
InvokeRepeating("OnBeat", nextBeatIn, 120 / songData.bpm);
}
void Update () {
@ -36,4 +41,16 @@ public class KickTower : MonoBehaviour {
}
}
}
void OnBeat()
{
spriteRenderer.color = Color.black;
Invoke("ResetColor", Time.fixedDeltaTime * 2);
}
void ResetColor()
{
spriteRenderer.color = Color.white;
}
}

View file

@ -6,6 +6,7 @@ public class SnareTower : MonoBehaviour {
private AudioSource snareSource;
private SongData songData;
private SpriteRenderer spriteRenderer;
private float cooldown;
private float cooldownRemaining = 0;
@ -13,8 +14,12 @@ public class SnareTower : MonoBehaviour {
{
snareSource = gameObject.GetComponent<AudioSource>();
songData = GameObject.FindGameObjectWithTag("GameController").GetComponent<SongData>();
spriteRenderer = gameObject.GetComponent<SpriteRenderer>();
//The period is 120 / bpm
cooldown = 44 / songData.bpm;
//Find next beat
float nextBeatIn = 120 / songData.bpm - (songData.songTime - (Mathf.Floor((songData.songTime + 60 / songData.bpm) / 120 * songData.bpm) * 120 / songData.bpm));
InvokeRepeating("OnBeat", nextBeatIn, 120 / songData.bpm);
}
void Update () {
@ -36,4 +41,15 @@ public class SnareTower : MonoBehaviour {
}
}
}
void OnBeat()
{
spriteRenderer.color = Color.black;
Invoke("ResetColor", Time.fixedDeltaTime * 2);
}
void ResetColor()
{
spriteRenderer.color = Color.white;
}
}

View file

@ -7,9 +7,12 @@ public class SongData : MonoBehaviour {
public float bpm;
public float delay;
public float songTime;
private AudioSource song;
void Start () {
songTime = delay;
song = GetComponent<AudioSource>();
song.Play();
}
void Update () {

View file

@ -6,10 +6,20 @@ public class TowerPlacer : MonoBehaviour
{
public GameObject selected = null;
SpriteRenderer cursorSprite;
SpriteRenderer towerGhost;
void Start()
{
cursorSprite = gameObject.GetComponent<SpriteRenderer>();
SpriteRenderer[] spriteRenderers = gameObject.GetComponentsInChildren<SpriteRenderer>();
foreach (SpriteRenderer spriteRenderer in spriteRenderers)
{
if (spriteRenderer.gameObject == gameObject)
{
cursorSprite = spriteRenderer;
continue;
}
towerGhost = spriteRenderer;
}
}
void Update () {
@ -18,10 +28,12 @@ public class TowerPlacer : MonoBehaviour
if (collider == null)
{
cursorSprite.color = Color.white;
towerGhost.color = Color.white;
}
else
{
cursorSprite.color = Color.red;
towerGhost.color = new Color(1, 1, 1, 0);
}
if (Input.GetMouseButtonDown(0))
{

View file

@ -0,0 +1,51 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class TowerSelector : MonoBehaviour {
public GameObject[] towerList;
private int index;
private TowerPlacer towerPlacer;
private SpriteRenderer towerGhost;
void Start () {
index = 0;
towerPlacer = gameObject.GetComponent<TowerPlacer>();
SpriteRenderer[] spriteRenderers = gameObject.GetComponentsInChildren<SpriteRenderer>();
foreach(SpriteRenderer spriteRenderer in spriteRenderers)
{
if(spriteRenderer.gameObject == gameObject)
{
continue;
}
towerGhost = spriteRenderer;
}
}
void Update () {
if (Input.GetAxis("Mouse ScrollWheel") > 0)
{
//Go to the next tower
index++;
if (index >= towerList.Length)
{
index = 0;
}
towerPlacer.selected = towerList[index];
towerGhost.sprite = towerList[index].GetComponent<SpriteRenderer>().sprite;
}
else if (Input.GetAxis("Mouse ScrollWheel") < 0)
{
//Go to the previous tower
index--;
if (index < 0)
{
index = towerList.Length - 1;
}
towerPlacer.selected = towerList[index];
towerGhost.sprite = towerList[index].GetComponent<SpriteRenderer>().sprite;
}
}
}

View file

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

Binary file not shown.

View file

@ -0,0 +1,22 @@
fileFormatVersion: 2
guid: c194ff70b588cee438ebb160c48b8686
AudioImporter:
externalObjects: {}
serializedVersion: 6
defaultSettings:
loadType: 0
sampleRateSetting: 0
sampleRateOverride: 44100
compressionFormat: 1
quality: 1
conversionMode: 0
platformSettingOverrides: {}
forceToMono: 0
normalize: 1
preloadAudioData: 1
loadInBackground: 0
ambisonic: 0
3D: 1
userData:
assetBundleName:
assetBundleVariant:

View file

@ -0,0 +1,97 @@
fileFormatVersion: 2
guid: 1dbfc922f0810c846babac2fd00e8405
TextureImporter:
fileIDToRecycleName: {}
externalObjects: {}
serializedVersion: 6
mipmaps:
mipMapMode: 0
enableMipMap: 0
sRGBTexture: 1
linearTexture: 0
fadeOut: 0
borderMipMap: 0
mipMapsPreserveCoverage: 0
alphaTestReferenceValue: 0.5
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
isReadable: 0
streamingMipmaps: 0
streamingMipmapsPriority: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: 2
aniso: -1
mipBias: -100
wrapU: 1
wrapV: 1
wrapW: 1
nPOTScale: 0
lightmap: 0
compressionQuality: 50
spriteMode: 1
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spritePixelsToUnits: 120
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spriteGenerateFallbackPhysicsShape: 1
alphaUsage: 1
alphaIsTransparency: 1
spriteTessellationDetail: -1
textureType: 8
textureShape: 1
singleChannelComponent: 0
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
platformSettings:
- serializedVersion: 2
buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
- serializedVersion: 2
buildTarget: Standalone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
bones: []
spriteID: 530b2f7cb2387e74198b3bfd8c5375cd
vertices: []
indices:
edges: []
weights: []
spritePackingTag:
userData:
assetBundleName:
assetBundleVariant:

View file

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

View file

@ -31,6 +31,8 @@ GraphicsSettings:
m_AlwaysIncludedShaders:
- {fileID: 10753, guid: 0000000000000000f000000000000000, type: 0}
- {fileID: 10770, guid: 0000000000000000f000000000000000, type: 0}
- {fileID: 17000, guid: 0000000000000000f000000000000000, type: 0}
- {fileID: 16000, guid: 0000000000000000f000000000000000, type: 0}
m_PreloadedShaders: []
m_SpritesDefaultMaterial: {fileID: 10754, guid: 0000000000000000f000000000000000,
type: 0}

View file

@ -38,11 +38,11 @@ InputManager:
axis: 0
joyNum: 0
- serializedVersion: 3
m_Name: Charleston
m_Name: Fire1
descriptiveName:
descriptiveNegativeName:
negativeButton:
positiveButton: z
positiveButton:
altNegativeButton:
altPositiveButton:
gravity: 1000