diff --git a/Assets/Scenes/Test Scene.unity b/Assets/Scenes/Test Scene.unity index fa921a6..83dc66c 100644 --- a/Assets/Scenes/Test Scene.unity +++ b/Assets/Scenes/Test Scene.unity @@ -1172,7 +1172,7 @@ RectTransform: m_Children: - {fileID: 1357495606} m_Father: {fileID: 0} - m_RootOrder: 13 + m_RootOrder: 14 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 0} m_AnchorMax: {x: 0, y: 0} @@ -1635,6 +1635,87 @@ Transform: m_Father: {fileID: 1054126017} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &822731490 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 822731492} + - component: {fileID: 822731491} + m_Layer: 0 + m_Name: AttackStop + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 0 +--- !u!212 &822731491 +SpriteRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 822731490} + m_Enabled: 1 + m_CastShadows: 0 + m_ReceiveShadows: 0 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 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_SortingLayerID: -1267717829 + m_SortingLayer: 3 + m_SortingOrder: 0 + m_Sprite: {fileID: 21300000, guid: 7b367fbccf167c04f905498d581bbe16, type: 3} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_FlipX: 0 + m_FlipY: 0 + m_DrawMode: 0 + m_Size: {x: 5.12, y: 2.56} + m_AdaptiveModeThreshold: 0.5 + m_SpriteTileMode: 0 + m_WasSpriteAssigned: 1 + m_MaskInteraction: 0 + m_SpriteSortPoint: 0 +--- !u!4 &822731492 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 822731490} + 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: 12 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1 &901586390 GameObject: m_ObjectHideFlags: 0 @@ -2274,7 +2355,7 @@ Transform: m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 0} - m_RootOrder: 16 + m_RootOrder: 17 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1 &1144941703 GameObject: @@ -2598,7 +2679,7 @@ Transform: m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 0} - m_RootOrder: 18 + m_RootOrder: 19 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1 &1313470325 GameObject: @@ -2773,7 +2854,7 @@ RectTransform: m_Children: - {fileID: 143825029} m_Father: {fileID: 0} - m_RootOrder: 15 + m_RootOrder: 16 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 0} m_AnchorMax: {x: 0, y: 0} @@ -3242,7 +3323,7 @@ RectTransform: m_Children: - {fileID: 151717030} m_Father: {fileID: 0} - m_RootOrder: 12 + m_RootOrder: 13 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 0} m_AnchorMax: {x: 0, y: 0} @@ -3375,6 +3456,7 @@ MonoBehaviour: EnemyShield: {fileID: 66290714} Victory: {fileID: 1300204711} GameOver: {fileID: 1580165922} + AttackStopSign: {fileID: 822731490} ShieldHit: {fileID: 1928466015} WeakPointHit: {fileID: 1789541041} EnemyDamageText: {fileID: 151717031} @@ -3739,7 +3821,7 @@ Transform: m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 0} - m_RootOrder: 19 + m_RootOrder: 20 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1 &1646474455 GameObject: @@ -3885,7 +3967,7 @@ RectTransform: m_Children: - {fileID: 1144941704} m_Father: {fileID: 0} - m_RootOrder: 14 + m_RootOrder: 15 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 0} m_AnchorMax: {x: 0, y: 0} @@ -4002,7 +4084,7 @@ Transform: m_LocalScale: {x: 0.5, y: 0.5, z: 1} m_Children: [] m_Father: {fileID: 0} - m_RootOrder: 21 + m_RootOrder: 22 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1 &1797600398 GameObject: @@ -4326,7 +4408,7 @@ Transform: m_LocalScale: {x: 0.5, y: 0.5, z: 1} m_Children: [] m_Father: {fileID: 0} - m_RootOrder: 20 + m_RootOrder: 21 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1 &1935397210 GameObject: @@ -4687,7 +4769,7 @@ Transform: - {fileID: 1989602357} - {fileID: 2133992576} m_Father: {fileID: 0} - m_RootOrder: 17 + m_RootOrder: 18 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1 &2057441938 GameObject: diff --git a/Assets/Scripts/GMScript.cs b/Assets/Scripts/GMScript.cs index 438f542..31945fc 100644 --- a/Assets/Scripts/GMScript.cs +++ b/Assets/Scripts/GMScript.cs @@ -15,6 +15,7 @@ public class GMScript : MonoBehaviour public GameObject Victory; public GameObject GameOver; + public GameObject AttackStopSign; public GameObject ShieldHit; public GameObject WeakPointHit; @@ -143,6 +144,11 @@ public class GMScript : MonoBehaviour StartCoroutine(AttackParty(robotColour)); + } else if (hit.collider.gameObject.tag == "Attack" + && PartyMemberOrder[0] == null) { + + StartCoroutine(AttackStop()); + } } @@ -272,6 +278,17 @@ public class GMScript : MonoBehaviour } + IEnumerator AttackStop() + { + + AttackStopSign.SetActive(true); + + yield return new WaitForSeconds(1); + + AttackStopSign.SetActive(false); + + } + IEnumerator AttackParty(Colours robotColour) { diff --git a/Assets/Textures/AttackStopDraft.png b/Assets/Textures/AttackStopDraft.png new file mode 100644 index 0000000..6fdae9d Binary files /dev/null and b/Assets/Textures/AttackStopDraft.png differ diff --git a/Assets/Textures/AttackStopDraft.png.meta b/Assets/Textures/AttackStopDraft.png.meta new file mode 100644 index 0000000..4abb905 --- /dev/null +++ b/Assets/Textures/AttackStopDraft.png.meta @@ -0,0 +1,92 @@ +fileFormatVersion: 2 +guid: 7b367fbccf167c04f905498d581bbe16 +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 11 + 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: -1 + 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: 100 + 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 + applyGammaDecoding: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: 5e97eb03825dee720800000000000000 + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: