TO SQUASH: Started map covering.
@@ -35,7 +35,7 @@ Transform:
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!212 &7402419950365427160
|
||||
SpriteRenderer:
|
||||
serializedVersion: 2
|
||||
serializedVersion: 3
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
@@ -78,8 +78,8 @@ SpriteRenderer:
|
||||
m_AutoUVMaxAngle: 89
|
||||
m_LightmapParameters: {fileID: 0}
|
||||
m_GlobalIlluminationMeshLod: 0
|
||||
m_SortingLayerID: 0
|
||||
m_SortingLayer: 0
|
||||
m_SortingLayerID: -480107125
|
||||
m_SortingLayer: 2
|
||||
m_SortingOrder: 0
|
||||
m_MaskInteraction: 0
|
||||
m_Sprite: {fileID: 7210558746331385846, guid: 7982a3f8e588f159dbb4a39dda4520a4, type: 3}
|
||||
@@ -92,6 +92,7 @@ SpriteRenderer:
|
||||
m_SpriteTileMode: 0
|
||||
m_WasSpriteAssigned: 1
|
||||
m_SpriteSortPoint: 0
|
||||
m_BlendShapeWeights: []
|
||||
--- !u!95 &4492134503030492876
|
||||
Animator:
|
||||
serializedVersion: 7
|
||||
|
||||
@@ -39,7 +39,7 @@ Transform:
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!212 &6200400392179026484
|
||||
SpriteRenderer:
|
||||
serializedVersion: 2
|
||||
serializedVersion: 3
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
@@ -82,8 +82,8 @@ SpriteRenderer:
|
||||
m_AutoUVMaxAngle: 89
|
||||
m_LightmapParameters: {fileID: 0}
|
||||
m_GlobalIlluminationMeshLod: 0
|
||||
m_SortingLayerID: 0
|
||||
m_SortingLayer: 0
|
||||
m_SortingLayerID: -480107125
|
||||
m_SortingLayer: 2
|
||||
m_SortingOrder: 5
|
||||
m_MaskInteraction: 0
|
||||
m_Sprite: {fileID: -5935670719357520905, guid: 400282fe7c512b55c85309bebf0a2179, type: 3}
|
||||
@@ -96,6 +96,7 @@ SpriteRenderer:
|
||||
m_SpriteTileMode: 0
|
||||
m_WasSpriteAssigned: 1
|
||||
m_SpriteSortPoint: 0
|
||||
m_BlendShapeWeights: []
|
||||
--- !u!95 &6177789857826534568
|
||||
Animator:
|
||||
serializedVersion: 7
|
||||
|
||||
@@ -38,7 +38,7 @@ Transform:
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!212 &2738067309255263379
|
||||
SpriteRenderer:
|
||||
serializedVersion: 2
|
||||
serializedVersion: 3
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
@@ -81,8 +81,8 @@ SpriteRenderer:
|
||||
m_AutoUVMaxAngle: 89
|
||||
m_LightmapParameters: {fileID: 0}
|
||||
m_GlobalIlluminationMeshLod: 0
|
||||
m_SortingLayerID: 0
|
||||
m_SortingLayer: 0
|
||||
m_SortingLayerID: -480107125
|
||||
m_SortingLayer: 2
|
||||
m_SortingOrder: 6
|
||||
m_MaskInteraction: 0
|
||||
m_Sprite: {fileID: 1035297100374923440, guid: a045018290eea7b028a136360043fa38, type: 3}
|
||||
@@ -95,6 +95,7 @@ SpriteRenderer:
|
||||
m_SpriteTileMode: 0
|
||||
m_WasSpriteAssigned: 1
|
||||
m_SpriteSortPoint: 0
|
||||
m_BlendShapeWeights: []
|
||||
--- !u!95 &5733677523347309599
|
||||
Animator:
|
||||
serializedVersion: 7
|
||||
|
||||
@@ -39,7 +39,7 @@ Transform:
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!212 &3836230823638517500
|
||||
SpriteRenderer:
|
||||
serializedVersion: 2
|
||||
serializedVersion: 3
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
@@ -82,8 +82,8 @@ SpriteRenderer:
|
||||
m_AutoUVMaxAngle: 89
|
||||
m_LightmapParameters: {fileID: 0}
|
||||
m_GlobalIlluminationMeshLod: 0
|
||||
m_SortingLayerID: 0
|
||||
m_SortingLayer: 0
|
||||
m_SortingLayerID: -480107125
|
||||
m_SortingLayer: 2
|
||||
m_SortingOrder: 5
|
||||
m_MaskInteraction: 0
|
||||
m_Sprite: {fileID: -1290827595376743533, guid: fe3b3fe0f5de1673080fe6d767e496cb, type: 3}
|
||||
@@ -96,6 +96,7 @@ SpriteRenderer:
|
||||
m_SpriteTileMode: 0
|
||||
m_WasSpriteAssigned: 1
|
||||
m_SpriteSortPoint: 0
|
||||
m_BlendShapeWeights: []
|
||||
--- !u!95 &4656683459850339862
|
||||
Animator:
|
||||
serializedVersion: 7
|
||||
|
||||
@@ -39,7 +39,7 @@ Transform:
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!212 &7647038298471257326
|
||||
SpriteRenderer:
|
||||
serializedVersion: 2
|
||||
serializedVersion: 3
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
@@ -82,8 +82,8 @@ SpriteRenderer:
|
||||
m_AutoUVMaxAngle: 89
|
||||
m_LightmapParameters: {fileID: 0}
|
||||
m_GlobalIlluminationMeshLod: 0
|
||||
m_SortingLayerID: 0
|
||||
m_SortingLayer: 0
|
||||
m_SortingLayerID: -480107125
|
||||
m_SortingLayer: 2
|
||||
m_SortingOrder: 5
|
||||
m_MaskInteraction: 0
|
||||
m_Sprite: {fileID: -5535265446822525397, guid: c63692b5893679b34ab40dce0b759a93, type: 3}
|
||||
@@ -96,6 +96,7 @@ SpriteRenderer:
|
||||
m_SpriteTileMode: 0
|
||||
m_WasSpriteAssigned: 1
|
||||
m_SpriteSortPoint: 0
|
||||
m_BlendShapeWeights: []
|
||||
--- !u!61 &528314658997140170
|
||||
BoxCollider2D:
|
||||
m_ObjectHideFlags: 0
|
||||
|
||||
@@ -39,7 +39,7 @@ Transform:
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!212 &5075101834145290994
|
||||
SpriteRenderer:
|
||||
serializedVersion: 2
|
||||
serializedVersion: 3
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
@@ -82,8 +82,8 @@ SpriteRenderer:
|
||||
m_AutoUVMaxAngle: 89
|
||||
m_LightmapParameters: {fileID: 0}
|
||||
m_GlobalIlluminationMeshLod: 0
|
||||
m_SortingLayerID: 0
|
||||
m_SortingLayer: 0
|
||||
m_SortingLayerID: -480107125
|
||||
m_SortingLayer: 2
|
||||
m_SortingOrder: 5
|
||||
m_MaskInteraction: 0
|
||||
m_Sprite: {fileID: 8067002814062450835, guid: 468cc65e49fd9b3868f352b3e09a05a9, type: 3}
|
||||
@@ -96,6 +96,7 @@ SpriteRenderer:
|
||||
m_SpriteTileMode: 0
|
||||
m_WasSpriteAssigned: 1
|
||||
m_SpriteSortPoint: 0
|
||||
m_BlendShapeWeights: []
|
||||
--- !u!114 &7846459845625119411
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
|
||||
@@ -38,7 +38,7 @@ Transform:
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!212 &8878076153969191535
|
||||
SpriteRenderer:
|
||||
serializedVersion: 2
|
||||
serializedVersion: 3
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
@@ -81,8 +81,8 @@ SpriteRenderer:
|
||||
m_AutoUVMaxAngle: 89
|
||||
m_LightmapParameters: {fileID: 0}
|
||||
m_GlobalIlluminationMeshLod: 0
|
||||
m_SortingLayerID: 0
|
||||
m_SortingLayer: 0
|
||||
m_SortingLayerID: -480107125
|
||||
m_SortingLayer: 2
|
||||
m_SortingOrder: 5
|
||||
m_MaskInteraction: 0
|
||||
m_Sprite: {fileID: 532642863005658806, guid: 7d0a3c1274510d13a804de3f4be7e51f, type: 3}
|
||||
@@ -95,6 +95,7 @@ SpriteRenderer:
|
||||
m_SpriteTileMode: 0
|
||||
m_WasSpriteAssigned: 1
|
||||
m_SpriteSortPoint: 0
|
||||
m_BlendShapeWeights: []
|
||||
--- !u!50 &5760720418200768735
|
||||
Rigidbody2D:
|
||||
serializedVersion: 5
|
||||
|
||||
@@ -81,8 +81,8 @@ SpriteRenderer:
|
||||
m_AutoUVMaxAngle: 89
|
||||
m_LightmapParameters: {fileID: 0}
|
||||
m_GlobalIlluminationMeshLod: 0
|
||||
m_SortingLayerID: 0
|
||||
m_SortingLayer: 0
|
||||
m_SortingLayerID: -480107125
|
||||
m_SortingLayer: 2
|
||||
m_SortingOrder: 5
|
||||
m_MaskInteraction: 0
|
||||
m_Sprite: {fileID: -5434643231075287626, guid: 6f76aeb130e49af12ae51852dd184aec, type: 3}
|
||||
@@ -278,7 +278,6 @@ MonoBehaviour:
|
||||
m_Script: {fileID: 11500000, guid: c66cc5abc472175528412b7935b3ccbd, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier: Assembly-CSharp::HorizontalLaser
|
||||
firingSpeed: 0.03
|
||||
horizontalLaserPrefab: {fileID: 1100909168816574387}
|
||||
canFireLeft: 1
|
||||
canFireRight: 1
|
||||
|
||||
@@ -80,8 +80,8 @@ SpriteRenderer:
|
||||
m_AutoUVMaxAngle: 89
|
||||
m_LightmapParameters: {fileID: 0}
|
||||
m_GlobalIlluminationMeshLod: 0
|
||||
m_SortingLayerID: 0
|
||||
m_SortingLayer: 0
|
||||
m_SortingLayerID: -480107125
|
||||
m_SortingLayer: 2
|
||||
m_SortingOrder: 4
|
||||
m_MaskInteraction: 0
|
||||
m_Sprite: {fileID: 8500096622099558511, guid: 396f182f764934fab9b37a7507fd6a71, type: 3}
|
||||
|
||||
@@ -39,7 +39,7 @@ Transform:
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!212 &6412297431913082470
|
||||
SpriteRenderer:
|
||||
serializedVersion: 2
|
||||
serializedVersion: 3
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
@@ -82,8 +82,8 @@ SpriteRenderer:
|
||||
m_AutoUVMaxAngle: 89
|
||||
m_LightmapParameters: {fileID: 0}
|
||||
m_GlobalIlluminationMeshLod: 0
|
||||
m_SortingLayerID: 0
|
||||
m_SortingLayer: 0
|
||||
m_SortingLayerID: -480107125
|
||||
m_SortingLayer: 2
|
||||
m_SortingOrder: 5
|
||||
m_MaskInteraction: 0
|
||||
m_Sprite: {fileID: 4743041161850474212, guid: b1eb9d7fe38bb77f9a0320079e439ce5, type: 3}
|
||||
@@ -96,6 +96,7 @@ SpriteRenderer:
|
||||
m_SpriteTileMode: 0
|
||||
m_WasSpriteAssigned: 1
|
||||
m_SpriteSortPoint: 0
|
||||
m_BlendShapeWeights: []
|
||||
--- !u!95 &4821638412415428746
|
||||
Animator:
|
||||
serializedVersion: 7
|
||||
|
||||
@@ -39,7 +39,7 @@ Transform:
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!212 &5750886708377519424
|
||||
SpriteRenderer:
|
||||
serializedVersion: 2
|
||||
serializedVersion: 3
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
@@ -82,8 +82,8 @@ SpriteRenderer:
|
||||
m_AutoUVMaxAngle: 89
|
||||
m_LightmapParameters: {fileID: 0}
|
||||
m_GlobalIlluminationMeshLod: 0
|
||||
m_SortingLayerID: 0
|
||||
m_SortingLayer: 0
|
||||
m_SortingLayerID: -480107125
|
||||
m_SortingLayer: 2
|
||||
m_SortingOrder: 5
|
||||
m_MaskInteraction: 0
|
||||
m_Sprite: {fileID: -8620827093349208362, guid: 7da1f2a82263918bf8253afbffacdd05, type: 3}
|
||||
@@ -96,6 +96,7 @@ SpriteRenderer:
|
||||
m_SpriteTileMode: 0
|
||||
m_WasSpriteAssigned: 1
|
||||
m_SpriteSortPoint: 0
|
||||
m_BlendShapeWeights: []
|
||||
--- !u!95 &5055907675468884638
|
||||
Animator:
|
||||
serializedVersion: 7
|
||||
@@ -306,3 +307,4 @@ MonoBehaviour:
|
||||
timerSound: {fileID: 8300000, guid: 31e9a8c2815e5208ba6627ff0eabc589, type: 3}
|
||||
splitSound: {fileID: 8300000, guid: 17e1b1467e54c2ecc8bd6f9cfe2fed09, type: 3}
|
||||
stoppedSound: {fileID: 8300000, guid: ef5de50e8c1ecff42a791d32242a72e5, type: 3}
|
||||
spawner: {fileID: 0}
|
||||
|
||||
@@ -34,7 +34,7 @@ Transform:
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!212 &4462448539252950388
|
||||
SpriteRenderer:
|
||||
serializedVersion: 2
|
||||
serializedVersion: 3
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
@@ -77,8 +77,8 @@ SpriteRenderer:
|
||||
m_AutoUVMaxAngle: 89
|
||||
m_LightmapParameters: {fileID: 0}
|
||||
m_GlobalIlluminationMeshLod: 0
|
||||
m_SortingLayerID: 0
|
||||
m_SortingLayer: 0
|
||||
m_SortingLayerID: -1656443495
|
||||
m_SortingLayer: 3
|
||||
m_SortingOrder: 12
|
||||
m_MaskInteraction: 0
|
||||
m_Sprite: {fileID: -6831752335218248995, guid: 00477de801f69a973a6c49bd68ee8431, type: 3}
|
||||
@@ -91,3 +91,4 @@ SpriteRenderer:
|
||||
m_SpriteTileMode: 0
|
||||
m_WasSpriteAssigned: 1
|
||||
m_SpriteSortPoint: 0
|
||||
m_BlendShapeWeights: []
|
||||
|
||||
@@ -82,8 +82,8 @@ SpriteRenderer:
|
||||
m_AutoUVMaxAngle: 89
|
||||
m_LightmapParameters: {fileID: 0}
|
||||
m_GlobalIlluminationMeshLod: 0
|
||||
m_SortingLayerID: 0
|
||||
m_SortingLayer: 0
|
||||
m_SortingLayerID: -480107125
|
||||
m_SortingLayer: 2
|
||||
m_SortingOrder: 6
|
||||
m_MaskInteraction: 0
|
||||
m_Sprite: {fileID: 9122294262205109509, guid: b634b1f944e581cbeb43efe97e96ec62, type: 3}
|
||||
|
||||
@@ -36,7 +36,7 @@ Transform:
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!212 &4237707218945530563
|
||||
SpriteRenderer:
|
||||
serializedVersion: 2
|
||||
serializedVersion: 3
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
@@ -79,8 +79,8 @@ SpriteRenderer:
|
||||
m_AutoUVMaxAngle: 89
|
||||
m_LightmapParameters: {fileID: 0}
|
||||
m_GlobalIlluminationMeshLod: 0
|
||||
m_SortingLayerID: 0
|
||||
m_SortingLayer: 0
|
||||
m_SortingLayerID: -480107125
|
||||
m_SortingLayer: 2
|
||||
m_SortingOrder: 5
|
||||
m_MaskInteraction: 0
|
||||
m_Sprite: {fileID: 7583256288284111019, guid: 0ec1b5cb35fbfe24d8b9a6c96f692ac9, type: 3}
|
||||
@@ -93,6 +93,7 @@ SpriteRenderer:
|
||||
m_SpriteTileMode: 0
|
||||
m_WasSpriteAssigned: 1
|
||||
m_SpriteSortPoint: 0
|
||||
m_BlendShapeWeights: []
|
||||
--- !u!95 &831513431117042771
|
||||
Animator:
|
||||
serializedVersion: 7
|
||||
|
||||
@@ -0,0 +1,265 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!1 &2746972694419659216
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 4325665525534383174}
|
||||
m_Layer: 0
|
||||
m_Name: Stencil Wall
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &4325665525534383174
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2746972694419659216}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children:
|
||||
- {fileID: 2351384779591085104}
|
||||
- {fileID: 8932107994225051825}
|
||||
m_Father: {fileID: 0}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!1 &6181524583229630187
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 8932107994225051825}
|
||||
- component: {fileID: 7466202904497864093}
|
||||
- component: {fileID: 3888158552871495189}
|
||||
m_Layer: 8
|
||||
m_Name: Wall
|
||||
m_TagString: Wall
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &8932107994225051825
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 6181524583229630187}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 4325665525534383174}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!212 &7466202904497864093
|
||||
SpriteRenderer:
|
||||
serializedVersion: 3
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 6181524583229630187}
|
||||
m_Enabled: 1
|
||||
m_CastShadows: 0
|
||||
m_ReceiveShadows: 0
|
||||
m_DynamicOccludee: 1
|
||||
m_StaticShadowCaster: 0
|
||||
m_MotionVectors: 1
|
||||
m_LightProbeUsage: 1
|
||||
m_ReflectionProbeUsage: 1
|
||||
m_RayTracingMode: 0
|
||||
m_RayTraceProcedural: 0
|
||||
m_RayTracingAccelStructBuildFlagsOverride: 0
|
||||
m_RayTracingAccelStructBuildFlags: 1
|
||||
m_SmallMeshCulling: 1
|
||||
m_ForceMeshLod: -1
|
||||
m_MeshLodSelectionBias: 0
|
||||
m_RenderingLayerMask: 1
|
||||
m_RendererPriority: 0
|
||||
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_ReceiveGI: 1
|
||||
m_PreserveUVs: 0
|
||||
m_IgnoreNormalsForChartDetection: 0
|
||||
m_ImportantGI: 0
|
||||
m_StitchLightmapSeams: 1
|
||||
m_SelectedEditorRenderState: 0
|
||||
m_MinimumChartSize: 4
|
||||
m_AutoUVMaxDistance: 0.5
|
||||
m_AutoUVMaxAngle: 89
|
||||
m_LightmapParameters: {fileID: 0}
|
||||
m_GlobalIlluminationMeshLod: 0
|
||||
m_SortingLayerID: 0
|
||||
m_SortingLayer: 0
|
||||
m_SortingOrder: 11
|
||||
m_MaskInteraction: 0
|
||||
m_Sprite: {fileID: 7482667652216324306, guid: 311925a002f4447b3a28927169b83ea6, type: 3}
|
||||
m_Color: {r: 1, g: 1, b: 0, 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_SpriteSortPoint: 0
|
||||
m_BlendShapeWeights: []
|
||||
--- !u!61 &3888158552871495189
|
||||
BoxCollider2D:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 6181524583229630187}
|
||||
m_Enabled: 1
|
||||
serializedVersion: 3
|
||||
m_Density: 1
|
||||
m_Material: {fileID: 0}
|
||||
m_IncludeLayers:
|
||||
serializedVersion: 2
|
||||
m_Bits: 0
|
||||
m_ExcludeLayers:
|
||||
serializedVersion: 2
|
||||
m_Bits: 0
|
||||
m_LayerOverridePriority: 0
|
||||
m_ForceSendLayers:
|
||||
serializedVersion: 2
|
||||
m_Bits: 4294967295
|
||||
m_ForceReceiveLayers:
|
||||
serializedVersion: 2
|
||||
m_Bits: 4294967295
|
||||
m_ContactCaptureLayers:
|
||||
serializedVersion: 2
|
||||
m_Bits: 4294967295
|
||||
m_CallbackLayers:
|
||||
serializedVersion: 2
|
||||
m_Bits: 4294967295
|
||||
m_IsTrigger: 0
|
||||
m_UsedByEffector: 0
|
||||
m_CompositeOperation: 0
|
||||
m_CompositeOrder: 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: 1, y: 1}
|
||||
adaptiveTilingThreshold: 0.5
|
||||
drawMode: 0
|
||||
adaptiveTiling: 0
|
||||
m_AutoTiling: 0
|
||||
m_Size: {x: 1, y: 1}
|
||||
m_EdgeRadius: 0
|
||||
--- !u!1 &8314301014439192092
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 2351384779591085104}
|
||||
- component: {fileID: 6120156208989783202}
|
||||
m_Layer: 6
|
||||
m_Name: Sprite Mask
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &2351384779591085104
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 8314301014439192092}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 4325665525534383174}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!331 &6120156208989783202
|
||||
SpriteMask:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 8314301014439192092}
|
||||
m_Enabled: 1
|
||||
m_CastShadows: 1
|
||||
m_ReceiveShadows: 1
|
||||
m_DynamicOccludee: 1
|
||||
m_StaticShadowCaster: 0
|
||||
m_MotionVectors: 1
|
||||
m_LightProbeUsage: 1
|
||||
m_ReflectionProbeUsage: 1
|
||||
m_RayTracingMode: 0
|
||||
m_RayTraceProcedural: 0
|
||||
m_RayTracingAccelStructBuildFlagsOverride: 0
|
||||
m_RayTracingAccelStructBuildFlags: 1
|
||||
m_SmallMeshCulling: 1
|
||||
m_ForceMeshLod: -1
|
||||
m_MeshLodSelectionBias: 0
|
||||
m_RenderingLayerMask: 1
|
||||
m_RendererPriority: 0
|
||||
m_Materials:
|
||||
- {fileID: 10758, 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_ReceiveGI: 1
|
||||
m_PreserveUVs: 0
|
||||
m_IgnoreNormalsForChartDetection: 0
|
||||
m_ImportantGI: 0
|
||||
m_StitchLightmapSeams: 1
|
||||
m_SelectedEditorRenderState: 3
|
||||
m_MinimumChartSize: 4
|
||||
m_AutoUVMaxDistance: 0.5
|
||||
m_AutoUVMaxAngle: 89
|
||||
m_LightmapParameters: {fileID: 0}
|
||||
m_GlobalIlluminationMeshLod: 0
|
||||
m_SortingLayerID: 0
|
||||
m_SortingLayer: 0
|
||||
m_SortingOrder: 0
|
||||
m_MaskInteraction: 0
|
||||
m_Sprite: {fileID: 7482667652216324306, guid: 48e93eef0688c4a259cb0eddcd8661f7, type: 3}
|
||||
m_MaskAlphaCutoff: 1
|
||||
m_FrontSortingLayerID: 1734364689
|
||||
m_BackSortingLayerID: 1734364689
|
||||
m_FrontSortingLayer: 1
|
||||
m_BackSortingLayer: 1
|
||||
m_FrontSortingOrder: 5
|
||||
m_BackSortingOrder: 0
|
||||
m_IsCustomRangeActive: 1
|
||||
m_SpriteSortPoint: 0
|
||||
m_MaskSource: 0
|
||||
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 3fbc857440f3c649b9d49d40955db450
|
||||
PrefabImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -38,7 +38,7 @@ Transform:
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!212 &1849045566778591861
|
||||
SpriteRenderer:
|
||||
serializedVersion: 2
|
||||
serializedVersion: 3
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
@@ -81,8 +81,8 @@ SpriteRenderer:
|
||||
m_AutoUVMaxAngle: 89
|
||||
m_LightmapParameters: {fileID: 0}
|
||||
m_GlobalIlluminationMeshLod: 0
|
||||
m_SortingLayerID: 0
|
||||
m_SortingLayer: 0
|
||||
m_SortingLayerID: -480107125
|
||||
m_SortingLayer: 2
|
||||
m_SortingOrder: 5
|
||||
m_MaskInteraction: 0
|
||||
m_Sprite: {fileID: 4808244930049875026, guid: 05db7adce83fc6c79950c15e05c65b7e, type: 3}
|
||||
@@ -95,6 +95,7 @@ SpriteRenderer:
|
||||
m_SpriteTileMode: 0
|
||||
m_WasSpriteAssigned: 1
|
||||
m_SpriteSortPoint: 0
|
||||
m_BlendShapeWeights: []
|
||||
--- !u!61 &1987224571519861697
|
||||
BoxCollider2D:
|
||||
m_ObjectHideFlags: 0
|
||||
|
||||
@@ -81,8 +81,8 @@ SpriteRenderer:
|
||||
m_AutoUVMaxAngle: 89
|
||||
m_LightmapParameters: {fileID: 0}
|
||||
m_GlobalIlluminationMeshLod: 0
|
||||
m_SortingLayerID: 0
|
||||
m_SortingLayer: 0
|
||||
m_SortingLayerID: -480107125
|
||||
m_SortingLayer: 2
|
||||
m_SortingOrder: 5
|
||||
m_MaskInteraction: 0
|
||||
m_Sprite: {fileID: 2127326278317954984, guid: 82a99368ab505b3d0a328ecf9cff8a61, type: 3}
|
||||
@@ -278,7 +278,6 @@ MonoBehaviour:
|
||||
m_Script: {fileID: 11500000, guid: e6ef48767c03d5b62b0e336a5691a187, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier: Assembly-CSharp::VerticalLaser
|
||||
firingSpeed: 0.03
|
||||
verticalLaserPrefab: {fileID: 4863424797291892849}
|
||||
canFireTop: 1
|
||||
canFireBottom: 1
|
||||
|
||||
@@ -80,8 +80,8 @@ SpriteRenderer:
|
||||
m_AutoUVMaxAngle: 89
|
||||
m_LightmapParameters: {fileID: 0}
|
||||
m_GlobalIlluminationMeshLod: 0
|
||||
m_SortingLayerID: 0
|
||||
m_SortingLayer: 0
|
||||
m_SortingLayerID: -480107125
|
||||
m_SortingLayer: 2
|
||||
m_SortingOrder: 5
|
||||
m_MaskInteraction: 0
|
||||
m_Sprite: {fileID: 4117774916817282162, guid: 46b32f517887e6d059266daadf89f6a6, type: 3}
|
||||
|
||||
@@ -82,8 +82,8 @@ SpriteRenderer:
|
||||
m_AutoUVMaxAngle: 89
|
||||
m_LightmapParameters: {fileID: 0}
|
||||
m_GlobalIlluminationMeshLod: 0
|
||||
m_SortingLayerID: 0
|
||||
m_SortingLayer: 0
|
||||
m_SortingLayerID: -480107125
|
||||
m_SortingLayer: 2
|
||||
m_SortingOrder: 5
|
||||
m_MaskInteraction: 0
|
||||
m_Sprite: {fileID: -8820758769124141801, guid: 81779b38072e90fd291a8df8f6bfc9aa, type: 3}
|
||||
|
||||
@@ -82,8 +82,8 @@ SpriteRenderer:
|
||||
m_AutoUVMaxAngle: 89
|
||||
m_LightmapParameters: {fileID: 0}
|
||||
m_GlobalIlluminationMeshLod: 0
|
||||
m_SortingLayerID: 0
|
||||
m_SortingLayer: 0
|
||||
m_SortingLayerID: -480107125
|
||||
m_SortingLayer: 2
|
||||
m_SortingOrder: 5
|
||||
m_MaskInteraction: 0
|
||||
m_Sprite: {fileID: -1669221820070231874, guid: d9fce9662b9be268ea164e49cd6d686a, type: 3}
|
||||
|
||||
@@ -82,8 +82,8 @@ SpriteRenderer:
|
||||
m_AutoUVMaxAngle: 89
|
||||
m_LightmapParameters: {fileID: 0}
|
||||
m_GlobalIlluminationMeshLod: 0
|
||||
m_SortingLayerID: 0
|
||||
m_SortingLayer: 0
|
||||
m_SortingLayerID: -480107125
|
||||
m_SortingLayer: 2
|
||||
m_SortingOrder: 5
|
||||
m_MaskInteraction: 0
|
||||
m_Sprite: {fileID: 2642053492378982893, guid: 6543f0d5679d7226a990fc82c2a4037a, type: 3}
|
||||
|
||||
@@ -82,8 +82,8 @@ SpriteRenderer:
|
||||
m_AutoUVMaxAngle: 89
|
||||
m_LightmapParameters: {fileID: 0}
|
||||
m_GlobalIlluminationMeshLod: 0
|
||||
m_SortingLayerID: 0
|
||||
m_SortingLayer: 0
|
||||
m_SortingLayerID: -480107125
|
||||
m_SortingLayer: 2
|
||||
m_SortingOrder: 5
|
||||
m_MaskInteraction: 0
|
||||
m_Sprite: {fileID: 7617609902319303776, guid: c0e9ed001e2d6d8389a06fa5b8cef19a, type: 3}
|
||||
|
||||
|
Before Width: | Height: | Size: 3.7 KiB After Width: | Height: | Size: 3.7 KiB |
|
Before Width: | Height: | Size: 5.3 KiB After Width: | Height: | Size: 5.3 KiB |
|
Before Width: | Height: | Size: 4.5 KiB After Width: | Height: | Size: 4.5 KiB |
|
Before Width: | Height: | Size: 3.6 KiB After Width: | Height: | Size: 3.6 KiB |
|
Before Width: | Height: | Size: 4.5 KiB After Width: | Height: | Size: 4.5 KiB |
|
Before Width: | Height: | Size: 6.7 KiB After Width: | Height: | Size: 6.7 KiB |
|
Before Width: | Height: | Size: 4.5 KiB After Width: | Height: | Size: 4.5 KiB |
|
Before Width: | Height: | Size: 2.2 KiB After Width: | Height: | Size: 2.2 KiB |
@@ -0,0 +1,42 @@
|
||||
using UnityEngine;
|
||||
|
||||
public class Foreground : MonoBehaviour
|
||||
{
|
||||
private SpriteRenderer spriteRenderer;
|
||||
|
||||
// Start is called once before the first execution of Update after the MonoBehaviour is created
|
||||
void Start()
|
||||
{
|
||||
spriteRenderer = GetComponent<SpriteRenderer>();
|
||||
ResetBoard();
|
||||
}
|
||||
|
||||
public void ResetBoard()
|
||||
{
|
||||
// Reset the game board to its initial state
|
||||
int currentLevel = PlayerPrefs.GetInt("CurrentLevel");
|
||||
currentLevel = currentLevel == 0 ? 1 : currentLevel; // Ensure currentLevel is at least 1
|
||||
currentLevel = (((currentLevel - 1) / 5) % 10 + 10) % 10 + 1;
|
||||
|
||||
Debug.Log($"Current Level: {currentLevel}");
|
||||
|
||||
string resourcePath = $"Patterns/back_{currentLevel}";
|
||||
|
||||
Texture2D texture = Resources.Load<Texture2D>(resourcePath);
|
||||
if (texture == null)
|
||||
{
|
||||
Debug.LogWarning($"Could not load Sprite or Texture2D at Resources/{resourcePath}");
|
||||
return;
|
||||
}
|
||||
|
||||
// Fallback if the asset is imported as Texture instead of Sprite.
|
||||
Sprite runtimeSprite = Sprite.Create(
|
||||
texture,
|
||||
new Rect(0, 0, texture.width, texture.height),
|
||||
new Vector2(0.5f, 0.5f),
|
||||
100f
|
||||
);
|
||||
|
||||
spriteRenderer.sprite = runtimeSprite;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 83f9939f8fdda54efa78f609f9bceff5
|
||||
@@ -12,12 +12,6 @@ public class GameBoard : MonoBehaviour
|
||||
ResetBoard();
|
||||
}
|
||||
|
||||
// Update is called once per frame
|
||||
void Update()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public void ResetBoard()
|
||||
{
|
||||
// Reset the game board to its initial state
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 5262a150f7acbf5f8869006f848a443d
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,64 @@
|
||||
using UnityEngine;
|
||||
|
||||
public class BarBase : MonoBehaviour
|
||||
{
|
||||
public float firingSpeed = 0.03f;
|
||||
|
||||
public bool canFireLeft = true;
|
||||
|
||||
public bool canFireRight = true;
|
||||
|
||||
public bool canFireTop = true;
|
||||
|
||||
public bool canFireBottom = true;
|
||||
|
||||
protected float firingTimer = 0.0f;
|
||||
|
||||
protected Bounds bounds;
|
||||
|
||||
protected bool canFire = true;
|
||||
|
||||
protected void Initialize()
|
||||
{
|
||||
SpriteRenderer spriteRenderer = GetComponent<SpriteRenderer>();
|
||||
bounds = spriteRenderer.bounds;
|
||||
|
||||
var walls = GameObject.FindGameObjectsWithTag("Wall");
|
||||
|
||||
if (walls.Length > 0)
|
||||
{
|
||||
// Cap the firing ability if the bar is already intersecting with a wall.
|
||||
foreach (var wall in walls)
|
||||
{
|
||||
var wallBounds = wall.GetComponent<SpriteRenderer>().bounds;
|
||||
if (wallBounds.Intersects(bounds))
|
||||
{
|
||||
canFire = false;
|
||||
|
||||
// Register the intersection with the WorldFiller.
|
||||
var worldFiller = GameObject.FindAnyObjectByType<WorldFiller>();
|
||||
|
||||
if (worldFiller != null)
|
||||
{
|
||||
var intersectionBounds = GetIntersectionBounds(wallBounds, bounds);
|
||||
worldFiller.SetWallPosition(intersectionBounds.center);
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected Bounds GetIntersectionBounds(Bounds wallBounds, Bounds barBounds)
|
||||
{
|
||||
Bounds intersectionBounds = new Bounds();
|
||||
|
||||
intersectionBounds.SetMinMax(
|
||||
Vector3.Max(wallBounds.min, barBounds.min),
|
||||
Vector3.Min(wallBounds.max, barBounds.max)
|
||||
);
|
||||
|
||||
return intersectionBounds;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: cc658019d9b712031b48788b92920756
|
||||
@@ -1,41 +1,13 @@
|
||||
using UnityEngine;
|
||||
|
||||
public class HorizontalBar : MonoBehaviour
|
||||
public class HorizontalBar : BarBase
|
||||
{
|
||||
public float firingSpeed = 0.03f;
|
||||
|
||||
public GameObject horizontalBarrierPrefab;
|
||||
|
||||
public bool canFireLeft = true;
|
||||
|
||||
public bool canFireRight = true;
|
||||
|
||||
private float firingTimer = 0.0f;
|
||||
|
||||
private Bounds bounds;
|
||||
|
||||
private bool canFire = true;
|
||||
|
||||
// Start is called once before the first execution of Update after the MonoBehaviour is created
|
||||
void Start()
|
||||
{
|
||||
SpriteRenderer spriteRenderer = GetComponent<SpriteRenderer>();
|
||||
bounds = spriteRenderer.bounds;
|
||||
|
||||
var walls = GameObject.FindGameObjectsWithTag("Wall");
|
||||
|
||||
if (walls.Length > 0)
|
||||
{
|
||||
// Cap the firing ability if the bar is already intersecting with a wall.
|
||||
foreach (var wall in walls)
|
||||
{
|
||||
if (wall.GetComponent<Collider2D>().bounds.Intersects(bounds))
|
||||
{
|
||||
canFire = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
Initialize();
|
||||
}
|
||||
|
||||
// Update is called once per frame
|
||||
@@ -1,37 +1,13 @@
|
||||
using UnityEngine;
|
||||
|
||||
public class HorizontalLaser : MonoBehaviour
|
||||
public class HorizontalLaser : BarBase
|
||||
{
|
||||
public GameObject horizontalLaserPrefab;
|
||||
|
||||
public bool canFireLeft = true;
|
||||
|
||||
public bool canFireRight = true;
|
||||
|
||||
private Bounds bounds;
|
||||
|
||||
private bool canFire = true;
|
||||
|
||||
// Start is called once before the first execution of Update after the MonoBehaviour is created
|
||||
void Start()
|
||||
{
|
||||
SpriteRenderer spriteRenderer = GetComponent<SpriteRenderer>();
|
||||
bounds = spriteRenderer.bounds;
|
||||
|
||||
var walls = GameObject.FindGameObjectsWithTag("Wall");
|
||||
|
||||
if (walls.Length > 0)
|
||||
{
|
||||
// Cap the firing ability if the bar is already intersecting with a wall.
|
||||
foreach (var wall in walls)
|
||||
{
|
||||
if (wall.GetComponent<Collider2D>().bounds.Intersects(bounds))
|
||||
{
|
||||
canFire = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
Initialize();
|
||||
}
|
||||
|
||||
// Update is called once per frame
|
||||
@@ -72,6 +72,8 @@ public class Player : MonoBehaviour
|
||||
|
||||
public BallSpawner ballSpawner;
|
||||
|
||||
public int percentCovered = 0;
|
||||
|
||||
private bool flipped = false;
|
||||
|
||||
private bool gameOver = false;
|
||||
@@ -150,16 +152,19 @@ public class Player : MonoBehaviour
|
||||
}
|
||||
|
||||
// Update is called once per frame
|
||||
void FixedUpdate()
|
||||
void Update()
|
||||
{
|
||||
// Foce reset the rotation.
|
||||
transform.rotation = Quaternion.identity;
|
||||
transform.eulerAngles = new Vector3(0, 0, flipped ? 90 : 0);
|
||||
|
||||
// Update the damage timer.
|
||||
if (damageTimer > 0.0f)
|
||||
{
|
||||
damageTimer -= Time.fixedDeltaTime;
|
||||
damageTimer -= Time.deltaTime;
|
||||
}
|
||||
|
||||
// Player movement is based on the mouse position, clamped to the game board bounds.
|
||||
if (!exploding)
|
||||
{
|
||||
Vector2 mouseScreen = Mouse.current.position.ReadValue();
|
||||
@@ -176,12 +181,13 @@ public class Player : MonoBehaviour
|
||||
transform.position = new Vector3(clampedX, clampedY, transform.position.z);
|
||||
}
|
||||
|
||||
// Handle keyboard input for flipping, game over, and toggling laser/magnet modes.
|
||||
if (Keyboard.current != null)
|
||||
{
|
||||
if (Keyboard.current.spaceKey.wasPressedThisFrame)
|
||||
{
|
||||
flipped = !flipped;
|
||||
transform.eulerAngles = new Vector3(0, 0, flipped ? 90 : 0);
|
||||
// transform.eulerAngles = new Vector3(0, 0, flipped ? 90 : 0);
|
||||
audioSource.PlayOneShot(flip);
|
||||
}
|
||||
|
||||
@@ -216,6 +222,7 @@ public class Player : MonoBehaviour
|
||||
}
|
||||
}
|
||||
|
||||
// Mouse input handling for firing lasers, magnets, or normal barriers.
|
||||
if (Mouse.current.leftButton.wasPressedThisFrame && canFire && !exploding)
|
||||
{
|
||||
if (laserActive)
|
||||
@@ -232,6 +239,7 @@ public class Player : MonoBehaviour
|
||||
}
|
||||
}
|
||||
|
||||
// Check for game over or revival conditions.
|
||||
if (gameOver)
|
||||
{
|
||||
StartCoroutine(EndGame());
|
||||
@@ -244,6 +252,7 @@ public class Player : MonoBehaviour
|
||||
StartCoroutine(Revive());
|
||||
}
|
||||
|
||||
// Handle magnet timer countdown and deactivation.
|
||||
if (magnetTimer > 0.0f)
|
||||
{
|
||||
magnetTimer -= Time.deltaTime;
|
||||
@@ -487,7 +496,7 @@ public class Player : MonoBehaviour
|
||||
StartCoroutine(SetGameOver());
|
||||
}
|
||||
|
||||
canFire = true; // Allow firing again after bar hit
|
||||
canFire = true; // Allow firing again after bar hit.
|
||||
}
|
||||
|
||||
void OnCollisionEnter2D(Collision2D collision)
|
||||
@@ -1,41 +1,13 @@
|
||||
using UnityEngine;
|
||||
|
||||
public class VerticalBar : MonoBehaviour
|
||||
public class VerticalBar : BarBase
|
||||
{
|
||||
public float firingSpeed = 0.03f;
|
||||
|
||||
public GameObject verticalBarrierPrefab;
|
||||
|
||||
public bool canFireTop = true;
|
||||
|
||||
public bool canFireBottom = true;
|
||||
|
||||
private float firingTimer = 0.0f;
|
||||
|
||||
private Bounds bounds;
|
||||
|
||||
private bool canFire = true;
|
||||
|
||||
// Start is called once before the first execution of Update after the MonoBehaviour is created
|
||||
void Start()
|
||||
{
|
||||
SpriteRenderer spriteRenderer = GetComponent<SpriteRenderer>();
|
||||
bounds = spriteRenderer.bounds;
|
||||
|
||||
var walls = GameObject.FindGameObjectsWithTag("Wall");
|
||||
|
||||
if (walls.Length > 0)
|
||||
{
|
||||
// Cap the firing ability if the bar is already intersecting with a wall.
|
||||
foreach (var wall in walls)
|
||||
{
|
||||
if (wall.GetComponent<Collider2D>().bounds.Intersects(bounds))
|
||||
{
|
||||
canFire = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
Initialize();
|
||||
}
|
||||
|
||||
// Update is called once per frame
|
||||
@@ -1,37 +1,13 @@
|
||||
using UnityEngine;
|
||||
|
||||
public class VerticalLaser : MonoBehaviour
|
||||
public class VerticalLaser : BarBase
|
||||
{
|
||||
public GameObject verticalLaserPrefab;
|
||||
|
||||
public bool canFireTop = true;
|
||||
|
||||
public bool canFireBottom = true;
|
||||
|
||||
private Bounds bounds;
|
||||
|
||||
private bool canFire = true;
|
||||
|
||||
// Start is called once before the first execution of Update after the MonoBehaviour is created
|
||||
void Start()
|
||||
{
|
||||
SpriteRenderer spriteRenderer = GetComponent<SpriteRenderer>();
|
||||
bounds = spriteRenderer.bounds;
|
||||
|
||||
var walls = GameObject.FindGameObjectsWithTag("Wall");
|
||||
|
||||
if (walls.Length > 0)
|
||||
{
|
||||
// Cap the firing ability if the bar is already intersecting with a wall.
|
||||
foreach (var wall in walls)
|
||||
{
|
||||
if (wall.GetComponent<Collider2D>().bounds.Intersects(bounds))
|
||||
{
|
||||
canFire = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
Initialize();
|
||||
}
|
||||
|
||||
// Update is called once per frame
|
||||
@@ -200,4 +200,9 @@ public class BallSpawner : MonoBehaviour
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public Queue<GameObject> GetBalls()
|
||||
{
|
||||
return balls;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -14,7 +14,7 @@ public class SharkSpawner : MonoBehaviour
|
||||
|
||||
private bool isActive = true;
|
||||
|
||||
private static float spawnProbability = 0.5f;
|
||||
private static float spawnProbability = 0.1f;
|
||||
|
||||
// Start is called once before the first execution of Update after the MonoBehaviour is created
|
||||
void Start()
|
||||
|
||||
@@ -0,0 +1,75 @@
|
||||
using UnityEngine;
|
||||
|
||||
public class WorldFiller : MonoBehaviour
|
||||
{
|
||||
public Player player;
|
||||
|
||||
public SpriteRenderer gameBoardSpriteRenderer;
|
||||
|
||||
public GameObject wallPrefab;
|
||||
|
||||
private Bounds gameBoardBounds;
|
||||
|
||||
private Vector2?[] wallPositions;
|
||||
|
||||
private int wallCount = 0;
|
||||
|
||||
// Start is called once before the first execution of Update after the MonoBehaviour is created
|
||||
void Start()
|
||||
{
|
||||
gameBoardBounds = gameBoardSpriteRenderer.bounds;
|
||||
ClearWalls();
|
||||
}
|
||||
|
||||
public void ClearWalls()
|
||||
{
|
||||
wallPositions = new Vector2?[2];
|
||||
wallPositions[0] = null;
|
||||
wallPositions[1] = null;
|
||||
wallCount = 0;
|
||||
}
|
||||
|
||||
public void SetWallPosition(Vector2 position)
|
||||
{
|
||||
if (wallCount >= wallPositions.Length)
|
||||
{
|
||||
Debug.LogError("Index out of bounds for wall positions.");
|
||||
return;
|
||||
}
|
||||
|
||||
wallPositions[wallCount] = position;
|
||||
wallCount++;
|
||||
|
||||
SpawnWall();
|
||||
}
|
||||
|
||||
public void SpawnWall()
|
||||
{
|
||||
// If both wall positions are set, spawn a wall.
|
||||
if (wallPositions[0] != null && wallPositions[1] != null)
|
||||
{
|
||||
Debug.Log($"Spawning wall with wall line: ({wallPositions[0]}, {wallPositions[1]})");
|
||||
|
||||
// Get all the balls in the scene.
|
||||
var ballSpawner = FindAnyObjectByType<BallSpawner>();
|
||||
var balls = ballSpawner.GetBalls();
|
||||
|
||||
// There are three possible scenarios for the wall positions:
|
||||
// 1. Only one side of the wall line is empty (either left or right).
|
||||
// 2. All sides of the wall line are occupied.
|
||||
// 3. All sides of the wall line are empty.
|
||||
|
||||
|
||||
// Destroy all bar segments after we are done.
|
||||
GameObject[] barSegments = GameObject.FindGameObjectsWithTag("Bar");
|
||||
|
||||
foreach (GameObject barSegment in barSegments)
|
||||
{
|
||||
Destroy(barSegment);
|
||||
}
|
||||
|
||||
// Clear the pending wall line.
|
||||
ClearWalls();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 85b8e4c52283a887494c3424f55c5bd2
|
||||
@@ -34,37 +34,3 @@ MonoBehaviour:
|
||||
- Key: LoadInBackGroundClipSizeThresholdBytes
|
||||
Value: 204800
|
||||
CurrentParamsIndex: 0
|
||||
--- !u!114 &2
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 53
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 0}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier: UnityEditor.ProjectAuditorModule:Unity.ProjectAuditor.Editor:ProjectAuditorSettings
|
||||
Rules:
|
||||
rules: []
|
||||
DiagnosticParams:
|
||||
paramsStack:
|
||||
- PlatformGroup:
|
||||
m_String: Unknown
|
||||
m_SerializedParams:
|
||||
- Key: StreamingAssetsFolderSizeLimit
|
||||
Value: 50
|
||||
- Key: SpriteAtlasEmptySpaceLimit
|
||||
Value: 50
|
||||
- Key: TextureStreamingMipmapsSizeLimit
|
||||
Value: 4000
|
||||
- Key: StreamingClipThresholdBytes
|
||||
Value: 218294
|
||||
- Key: LongDecompressedClipThresholdBytes
|
||||
Value: 204800
|
||||
- Key: LongCompressedMobileClipThresholdBytes
|
||||
Value: 204800
|
||||
- Key: LoadInBackGroundClipSizeThresholdBytes
|
||||
Value: 204800
|
||||
CurrentParamsIndex: 0
|
||||
|
||||
@@ -21,7 +21,7 @@ TagManager:
|
||||
-
|
||||
- Water
|
||||
- UI
|
||||
-
|
||||
- Foreground
|
||||
-
|
||||
- Editor Only
|
||||
-
|
||||
@@ -51,6 +51,15 @@ TagManager:
|
||||
- name: Default
|
||||
uniqueID: 0
|
||||
locked: 0
|
||||
- name: Foreground
|
||||
uniqueID: 1734364689
|
||||
locked: 0
|
||||
- name: Items
|
||||
uniqueID: 3814860171
|
||||
locked: 0
|
||||
- name: Screens
|
||||
uniqueID: 2638523801
|
||||
locked: 0
|
||||
m_RenderingLayers:
|
||||
- Default
|
||||
m_MigratedRenderPipelines: []
|
||||
|
||||