diff --git a/Assets/Art/AllButtons.png b/Assets/Art/AllButtons.png new file mode 100644 index 0000000..45c15ee Binary files /dev/null and b/Assets/Art/AllButtons.png differ diff --git a/Assets/Art/AllButtons.png.meta b/Assets/Art/AllButtons.png.meta new file mode 100644 index 0000000..fb24143 --- /dev/null +++ b/Assets/Art/AllButtons.png.meta @@ -0,0 +1,223 @@ +fileFormatVersion: 2 +guid: 8fcdefe117c22b0418ec8c587a2b7601 +TextureImporter: + internalIDToNameTable: + - first: + 213: -2667601937048796137 + second: AllButtons_0 + - first: + 213: 8214095464950831658 + second: AllButtons_1 + - first: + 213: 3330059195138927908 + second: AllButtons_2 + externalObjects: {} + serializedVersion: 10 + 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: 2 + 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 + 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 + - serializedVersion: 3 + buildTarget: Standalone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Windows Store Apps + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: iPhone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Android + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: WebGL + 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: + - serializedVersion: 2 + name: AllButtons_0 + rect: + serializedVersion: 2 + x: 0 + y: 0 + width: 217 + height: 160 + alignment: 0 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: 0 + bones: [] + spriteID: e8633c391ce90bd46800de6ee937ec42 + internalID: -2667601937048796137 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: AllButtons_1 + rect: + serializedVersion: 2 + x: 217 + y: 0 + width: 217 + height: 160 + alignment: 0 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: 0 + bones: [] + spriteID: a161879b1b960b74897ae1a7f000a254 + internalID: 8214095464950831658 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: AllButtons_2 + rect: + serializedVersion: 2 + x: 434 + y: 0 + width: 217 + height: 160 + alignment: 0 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: 0 + bones: [] + spriteID: dc9b0e32ae1bc9f478fdbf8b685f7982 + internalID: 3330059195138927908 + vertices: [] + indices: + edges: [] + weights: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: 5e97eb03825dee720800000000000000 + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Art/AllButtons2.png b/Assets/Art/AllButtons2.png new file mode 100644 index 0000000..82f3779 Binary files /dev/null and b/Assets/Art/AllButtons2.png differ diff --git a/Assets/Art/AllButtons2.png.meta b/Assets/Art/AllButtons2.png.meta new file mode 100644 index 0000000..ece5bb4 --- /dev/null +++ b/Assets/Art/AllButtons2.png.meta @@ -0,0 +1,223 @@ +fileFormatVersion: 2 +guid: 0bfd909715d8ed343a18a1e0d0eaef05 +TextureImporter: + internalIDToNameTable: + - first: + 213: -6376664015803450011 + second: AllButtons2_0 + - first: + 213: -1642888619156654608 + second: AllButtons2_1 + - first: + 213: 465436041436826799 + second: AllButtons2_2 + externalObjects: {} + serializedVersion: 10 + 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: 2 + 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 + 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 + - serializedVersion: 3 + buildTarget: Standalone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Windows Store Apps + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: iPhone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Android + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: WebGL + 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: + - serializedVersion: 2 + name: AllButtons2_0 + rect: + serializedVersion: 2 + x: 0 + y: 0 + width: 217 + height: 160 + alignment: 0 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: 0 + bones: [] + spriteID: f4c305391d85fc74898c9a1999e3296e + internalID: -6376664015803450011 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: AllButtons2_1 + rect: + serializedVersion: 2 + x: 217 + y: 0 + width: 217 + height: 160 + alignment: 0 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: 0 + bones: [] + spriteID: df0c401230271434c95a0dd4486be33d + internalID: -1642888619156654608 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: AllButtons2_2 + rect: + serializedVersion: 2 + x: 434 + y: 0 + width: 217 + height: 160 + alignment: 0 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: 0 + bones: [] + spriteID: f6500477f0c47b24f8f43382092d417a + internalID: 465436041436826799 + vertices: [] + indices: + edges: [] + weights: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: 5e97eb03825dee720800000000000000 + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Art/Fullscreen.png b/Assets/Art/Fullscreen.png new file mode 100644 index 0000000..aad598d Binary files /dev/null and b/Assets/Art/Fullscreen.png differ diff --git a/Assets/Art/Fullscreen.png.meta b/Assets/Art/Fullscreen.png.meta new file mode 100644 index 0000000..c9fb8ca --- /dev/null +++ b/Assets/Art/Fullscreen.png.meta @@ -0,0 +1,91 @@ +fileFormatVersion: 2 +guid: 0c3cfec06efe6874781e64fce6d7e3f7 +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 10 + 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 + 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: diff --git a/Assets/Art/FullscreenNoTexture.png b/Assets/Art/FullscreenNoTexture.png new file mode 100644 index 0000000..7642510 Binary files /dev/null and b/Assets/Art/FullscreenNoTexture.png differ diff --git a/Assets/Art/FullscreenNoTexture.png.meta b/Assets/Art/FullscreenNoTexture.png.meta new file mode 100644 index 0000000..051fc5b --- /dev/null +++ b/Assets/Art/FullscreenNoTexture.png.meta @@ -0,0 +1,91 @@ +fileFormatVersion: 2 +guid: 0403aa286f80a324abeeb112bcd60031 +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 10 + 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 + 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: diff --git a/Assets/Code/Tutorial.cs b/Assets/Code/Tutorial.cs index 2ca891a..34e6f36 100644 --- a/Assets/Code/Tutorial.cs +++ b/Assets/Code/Tutorial.cs @@ -19,12 +19,12 @@ public class Tutorial : MonoBehaviour { public GameBoard board; void Drop() => board.board = board.DropNow(board.board); - WaitUntil UntilDrop() => new WaitUntil(()=>board.delayState.Equals(GameBoard.DelayState.None)); + WaitUntil UntilDrop() => new WaitUntil(() => board.delayState.Equals(GameBoard.DelayState.None)); // Start is called before the first frame update void Start() { board.Setup(); - board.StartGame(); + board.StartGame(); board.AIEnabled = true; // Disable player input on the board tutorialText = GetComponent(); @@ -35,7 +35,7 @@ public class Tutorial : MonoBehaviour { IEnumerator TutorialRoutine() { board.board = BoardStateExtension.Initialize(); - board.nextPair = (new TileInfo(TileKind.Block,TileColor.Yellow), new TileInfo(TileKind.Block, TileColor.Yellow)); + board.nextPair = (new TileInfo(TileKind.Block, TileColor.Yellow), new TileInfo(TileKind.Block, TileColor.Yellow)); board.currentPair = (new TileInfo(TileKind.Block, TileColor.Yellow), new TileInfo(TileKind.Block, TileColor.Yellow)); SetText("TUTORIAL_INTRO", "Welcome to Touhou: Luminous Strike!"); @@ -72,7 +72,7 @@ public class Tutorial : MonoBehaviour { SetText("TUTORIAL_COLORS", "But of course, lanterns come in a variety of colors"); activePatchyNumber = 1; - for(int i = 0; i < GameBoard.COLUMN; ++i) { + for (int i = 0; i < GameBoard.COLUMN; ++i) { bs[i].AddRange(new[] { new TileInfo(TileKind.Block, TileColor.Red), new TileInfo(TileKind.Block, TileColor.Blue), @@ -144,7 +144,7 @@ public class Tutorial : MonoBehaviour { yield return new WaitForSeconds(2f); SetText("TUTORIAL_EXTRA", "Lanterns always come in pairs, but you can swap with the next pair by pressing [Z]"); activePatchyNumber = 3; - for(int i = 0; i < 5; ++i) { + for (int i = 0; i < 5; ++i) { board.SwapTiles(); yield return new WaitForSeconds(1f); } @@ -160,7 +160,7 @@ public class Tutorial : MonoBehaviour { activePatchyNumber = 3; SetText("TUTORIAL_EXTRA3", "Finally, be cautious, as if your board fills up, it will collapse and you will lose."); - for(int i = 0; i < 12; ++i) { + for (int i = 0; i < 12; ++i) { yield return new WaitForSeconds(0.15f); for (int j = 0; j < GameBoard.COLUMN; ++j) { yield return new WaitForSeconds(0.05f); @@ -168,7 +168,7 @@ public class Tutorial : MonoBehaviour { } } - board.Clear(); + board.Clear(); yield return new WaitForSeconds(5f); activePatchyNumber = 1; diff --git a/Assets/FullscreenToggler.cs b/Assets/FullscreenToggler.cs new file mode 100644 index 0000000..c450adc --- /dev/null +++ b/Assets/FullscreenToggler.cs @@ -0,0 +1,25 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; + +using UnityEngine.UI; + +public class FullscreenToggler : MonoBehaviour { + public Sprite Fullscreen, Window; + + // Start is called before the first frame update + void Start() { + GetComponent