├── .github └── FUNDING.yml ├── Assets ├── Materials.meta ├── Materials │ ├── cube.mat │ ├── cube.mat.meta │ ├── explosion Fx.mat │ ├── explosion Fx.mat.meta │ ├── floor.mat │ ├── floor.mat.meta │ ├── walls.mat │ └── walls.mat.meta ├── Models.meta ├── Models │ ├── Cube.prefab │ ├── Cube.prefab.meta │ ├── cubeModel.fbx │ ├── cubeModel.fbx.meta │ ├── highpoly_Walls.fbx │ ├── highpoly_Walls.fbx.meta │ ├── lowpoly_walls.fbx │ └── lowpoly_walls.fbx.meta ├── Physics.meta ├── Physics │ ├── bouncy.physicMaterial │ ├── bouncy.physicMaterial.meta │ ├── slide.physicMaterial │ └── slide.physicMaterial.meta ├── Prefabs.meta ├── Prefabs │ ├── Cube.prefab │ ├── Cube.prefab.meta │ ├── Explosion FX.prefab │ ├── Explosion FX.prefab.meta │ ├── walls.prefab │ └── walls.prefab.meta ├── Scripts.meta ├── Scripts │ ├── Cube.cs │ ├── Cube.cs.meta │ ├── CubeCollision.cs │ ├── CubeCollision.cs.meta │ ├── CubeSpawner.cs │ ├── CubeSpawner.cs.meta │ ├── FX.cs │ ├── FX.cs.meta │ ├── Player.cs │ ├── Player.cs.meta │ ├── RedZone.cs │ ├── RedZone.cs.meta │ ├── TouchSlider.cs │ └── TouchSlider.cs.meta ├── Sprites.meta ├── Sprites │ ├── Square.png │ ├── Square.png.meta │ ├── hand.png │ ├── hand.png.meta │ ├── transparent.png │ └── transparent.png.meta ├── TextMesh Pro.meta ├── scene.unity └── scene.unity.meta ├── LICENCE └── README.md /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | custom: ['https://paypal.me/hamzaherbou'] 2 | -------------------------------------------------------------------------------- /Assets/Materials.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f9c47d784d278c7498343f853813e52e 3 | folderAsset: yes 4 | timeCreated: 1607782516 5 | licenseType: Pro 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Materials/cube.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/herbou/Unity_CubesGame/b271d9a656b565efa67a0254bc4fe96a3a17640e/Assets/Materials/cube.mat -------------------------------------------------------------------------------- /Assets/Materials/cube.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8a78fec1ff355674dbe87df215305092 3 | timeCreated: 1607718883 4 | licenseType: Pro 5 | NativeFormatImporter: 6 | mainObjectFileID: 2100000 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Materials/explosion Fx.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/herbou/Unity_CubesGame/b271d9a656b565efa67a0254bc4fe96a3a17640e/Assets/Materials/explosion Fx.mat -------------------------------------------------------------------------------- /Assets/Materials/explosion Fx.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 00f2de19de8d14342a2751365a886e70 3 | timeCreated: 1607697255 4 | licenseType: Pro 5 | NativeFormatImporter: 6 | mainObjectFileID: 2100000 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Materials/floor.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/herbou/Unity_CubesGame/b271d9a656b565efa67a0254bc4fe96a3a17640e/Assets/Materials/floor.mat -------------------------------------------------------------------------------- /Assets/Materials/floor.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 2f9191c16e5254a4abbb468c2f6e5c43 3 | timeCreated: 1607516559 4 | licenseType: Pro 5 | NativeFormatImporter: 6 | mainObjectFileID: 2100000 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Materials/walls.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/herbou/Unity_CubesGame/b271d9a656b565efa67a0254bc4fe96a3a17640e/Assets/Materials/walls.mat -------------------------------------------------------------------------------- /Assets/Materials/walls.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7bce34868f12f724b9c98c98779f4f2f 3 | timeCreated: 1607516559 4 | licenseType: Pro 5 | NativeFormatImporter: 6 | mainObjectFileID: 2100000 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Models.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: bd59ffec2cb3d7a4da263dd344efb3eb 3 | folderAsset: yes 4 | timeCreated: 1607711895 5 | licenseType: Pro 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Models/Cube.prefab: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/herbou/Unity_CubesGame/b271d9a656b565efa67a0254bc4fe96a3a17640e/Assets/Models/Cube.prefab -------------------------------------------------------------------------------- /Assets/Models/Cube.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b7905d33808ae9d4bbe974d860060b72 3 | timeCreated: 1607719822 4 | licenseType: Pro 5 | NativeFormatImporter: 6 | mainObjectFileID: 100100000 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Models/cubeModel.fbx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/herbou/Unity_CubesGame/b271d9a656b565efa67a0254bc4fe96a3a17640e/Assets/Models/cubeModel.fbx -------------------------------------------------------------------------------- /Assets/Models/cubeModel.fbx.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 63b1ad50418fecb4f8a7f416a0898da7 3 | timeCreated: 1607712116 4 | licenseType: Pro 5 | ModelImporter: 6 | serializedVersion: 19 7 | fileIDToRecycleName: 8 | 100000: Camera 9 | 100002: Cube 10 | 100004: //RootNode 11 | 100006: Light 12 | 400000: Camera 13 | 400002: Cube 14 | 400004: //RootNode 15 | 400006: Light 16 | 2300000: Cube 17 | 3300000: Cube 18 | 4300000: Cube 19 | materials: 20 | importMaterials: 0 21 | materialName: 0 22 | materialSearch: 1 23 | animations: 24 | legacyGenerateAnimations: 4 25 | bakeSimulation: 0 26 | resampleCurves: 1 27 | optimizeGameObjects: 0 28 | motionNodeName: 29 | rigImportErrors: 30 | rigImportWarnings: 31 | animationImportErrors: 32 | animationImportWarnings: 33 | animationRetargetingWarnings: 34 | animationDoRetargetingWarnings: 0 35 | animationCompression: 1 36 | animationRotationError: 0.5 37 | animationPositionError: 0.5 38 | animationScaleError: 0.5 39 | animationWrapMode: 0 40 | extraExposedTransformPaths: [] 41 | clipAnimations: [] 42 | isReadable: 1 43 | meshes: 44 | lODScreenPercentages: [] 45 | globalScale: 1 46 | meshCompression: 0 47 | addColliders: 0 48 | importBlendShapes: 1 49 | swapUVChannels: 0 50 | generateSecondaryUV: 0 51 | useFileUnits: 1 52 | optimizeMeshForGPU: 1 53 | keepQuads: 0 54 | weldVertices: 1 55 | secondaryUVAngleDistortion: 8 56 | secondaryUVAreaDistortion: 15.000001 57 | secondaryUVHardAngle: 88 58 | secondaryUVPackMargin: 4 59 | useFileScale: 1 60 | tangentSpace: 61 | normalSmoothAngle: 60 62 | normalImportMode: 0 63 | tangentImportMode: 3 64 | importAnimation: 1 65 | copyAvatar: 0 66 | humanDescription: 67 | serializedVersion: 2 68 | human: [] 69 | skeleton: [] 70 | armTwist: 0.5 71 | foreArmTwist: 0.5 72 | upperLegTwist: 0.5 73 | legTwist: 0.5 74 | armStretch: 0.05 75 | legStretch: 0.05 76 | feetSpacing: 0 77 | rootMotionBoneName: 78 | rootMotionBoneRotation: {x: 0, y: 0, z: 0, w: 1} 79 | hasTranslationDoF: 0 80 | hasExtraRoot: 0 81 | skeletonHasParents: 1 82 | lastHumanDescriptionAvatarSource: {instanceID: 0} 83 | animationType: 0 84 | humanoidOversampling: 1 85 | additionalBone: 0 86 | userData: 87 | assetBundleName: 88 | assetBundleVariant: 89 | -------------------------------------------------------------------------------- /Assets/Models/highpoly_Walls.fbx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/herbou/Unity_CubesGame/b271d9a656b565efa67a0254bc4fe96a3a17640e/Assets/Models/highpoly_Walls.fbx -------------------------------------------------------------------------------- /Assets/Models/highpoly_Walls.fbx.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f72a676d8541bbf42b9665dface8ed6a 3 | timeCreated: 1619702643 4 | licenseType: Pro 5 | ModelImporter: 6 | serializedVersion: 19 7 | fileIDToRecycleName: 8 | 100000: //RootNode 9 | 400000: //RootNode 10 | 2300000: //RootNode 11 | 3300000: //RootNode 12 | 4300000: Plane 13 | materials: 14 | importMaterials: 1 15 | materialName: 0 16 | materialSearch: 1 17 | animations: 18 | legacyGenerateAnimations: 4 19 | bakeSimulation: 0 20 | resampleCurves: 1 21 | optimizeGameObjects: 0 22 | motionNodeName: 23 | rigImportErrors: 24 | rigImportWarnings: 25 | animationImportErrors: 26 | animationImportWarnings: 27 | animationRetargetingWarnings: 28 | animationDoRetargetingWarnings: 0 29 | animationCompression: 1 30 | animationRotationError: 0.5 31 | animationPositionError: 0.5 32 | animationScaleError: 0.5 33 | animationWrapMode: 0 34 | extraExposedTransformPaths: [] 35 | clipAnimations: [] 36 | isReadable: 1 37 | meshes: 38 | lODScreenPercentages: [] 39 | globalScale: 1 40 | meshCompression: 0 41 | addColliders: 0 42 | importBlendShapes: 1 43 | swapUVChannels: 0 44 | generateSecondaryUV: 0 45 | useFileUnits: 1 46 | optimizeMeshForGPU: 1 47 | keepQuads: 0 48 | weldVertices: 1 49 | secondaryUVAngleDistortion: 8 50 | secondaryUVAreaDistortion: 15.000001 51 | secondaryUVHardAngle: 88 52 | secondaryUVPackMargin: 4 53 | useFileScale: 1 54 | tangentSpace: 55 | normalSmoothAngle: 60 56 | normalImportMode: 0 57 | tangentImportMode: 3 58 | importAnimation: 1 59 | copyAvatar: 0 60 | humanDescription: 61 | serializedVersion: 2 62 | human: [] 63 | skeleton: [] 64 | armTwist: 0.5 65 | foreArmTwist: 0.5 66 | upperLegTwist: 0.5 67 | legTwist: 0.5 68 | armStretch: 0.05 69 | legStretch: 0.05 70 | feetSpacing: 0 71 | rootMotionBoneName: 72 | rootMotionBoneRotation: {x: 0, y: 0, z: 0, w: 1} 73 | hasTranslationDoF: 0 74 | hasExtraRoot: 0 75 | skeletonHasParents: 1 76 | lastHumanDescriptionAvatarSource: {instanceID: 0} 77 | animationType: 0 78 | humanoidOversampling: 1 79 | additionalBone: 0 80 | userData: 81 | assetBundleName: 82 | assetBundleVariant: 83 | -------------------------------------------------------------------------------- /Assets/Models/lowpoly_walls.fbx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/herbou/Unity_CubesGame/b271d9a656b565efa67a0254bc4fe96a3a17640e/Assets/Models/lowpoly_walls.fbx -------------------------------------------------------------------------------- /Assets/Models/lowpoly_walls.fbx.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1a0fffaf4efa9df4397b164a1b19bf7b 3 | timeCreated: 1619626137 4 | licenseType: Pro 5 | ModelImporter: 6 | serializedVersion: 19 7 | fileIDToRecycleName: 8 | 100000: //RootNode 9 | 400000: //RootNode 10 | 2300000: //RootNode 11 | 3300000: //RootNode 12 | 4300000: Plane 13 | materials: 14 | importMaterials: 1 15 | materialName: 0 16 | materialSearch: 1 17 | animations: 18 | legacyGenerateAnimations: 4 19 | bakeSimulation: 0 20 | resampleCurves: 1 21 | optimizeGameObjects: 0 22 | motionNodeName: 23 | rigImportErrors: 24 | rigImportWarnings: 25 | animationImportErrors: 26 | animationImportWarnings: 27 | animationRetargetingWarnings: 28 | animationDoRetargetingWarnings: 0 29 | animationCompression: 1 30 | animationRotationError: 0.5 31 | animationPositionError: 0.5 32 | animationScaleError: 0.5 33 | animationWrapMode: 0 34 | extraExposedTransformPaths: [] 35 | clipAnimations: [] 36 | isReadable: 1 37 | meshes: 38 | lODScreenPercentages: [] 39 | globalScale: 1 40 | meshCompression: 0 41 | addColliders: 0 42 | importBlendShapes: 1 43 | swapUVChannels: 0 44 | generateSecondaryUV: 0 45 | useFileUnits: 1 46 | optimizeMeshForGPU: 1 47 | keepQuads: 0 48 | weldVertices: 1 49 | secondaryUVAngleDistortion: 8 50 | secondaryUVAreaDistortion: 15.000001 51 | secondaryUVHardAngle: 88 52 | secondaryUVPackMargin: 4 53 | useFileScale: 1 54 | tangentSpace: 55 | normalSmoothAngle: 60 56 | normalImportMode: 0 57 | tangentImportMode: 3 58 | importAnimation: 1 59 | copyAvatar: 0 60 | humanDescription: 61 | serializedVersion: 2 62 | human: [] 63 | skeleton: [] 64 | armTwist: 0.5 65 | foreArmTwist: 0.5 66 | upperLegTwist: 0.5 67 | legTwist: 0.5 68 | armStretch: 0.05 69 | legStretch: 0.05 70 | feetSpacing: 0 71 | rootMotionBoneName: 72 | rootMotionBoneRotation: {x: 0, y: 0, z: 0, w: 1} 73 | hasTranslationDoF: 0 74 | hasExtraRoot: 0 75 | skeletonHasParents: 1 76 | lastHumanDescriptionAvatarSource: {instanceID: 0} 77 | animationType: 0 78 | humanoidOversampling: 1 79 | additionalBone: 0 80 | userData: 81 | assetBundleName: 82 | assetBundleVariant: 83 | -------------------------------------------------------------------------------- /Assets/Physics.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 747eea1f8ee5045409718580744ede8f 3 | folderAsset: yes 4 | timeCreated: 1621256307 5 | licenseType: Pro 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Physics/bouncy.physicMaterial: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/herbou/Unity_CubesGame/b271d9a656b565efa67a0254bc4fe96a3a17640e/Assets/Physics/bouncy.physicMaterial -------------------------------------------------------------------------------- /Assets/Physics/bouncy.physicMaterial.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 614c64cc841aa2f448730ce792c86f2b 3 | timeCreated: 1621256316 4 | licenseType: Pro 5 | NativeFormatImporter: 6 | mainObjectFileID: 13400000 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Physics/slide.physicMaterial: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/herbou/Unity_CubesGame/b271d9a656b565efa67a0254bc4fe96a3a17640e/Assets/Physics/slide.physicMaterial -------------------------------------------------------------------------------- /Assets/Physics/slide.physicMaterial.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 11f9f1316b96c324abfdf7ca5ca7d3e3 3 | timeCreated: 1621256333 4 | licenseType: Pro 5 | NativeFormatImporter: 6 | mainObjectFileID: 13400000 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Prefabs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 49d214e822ce2544fb6ce7dc2fd0885b 3 | folderAsset: yes 4 | timeCreated: 1607539580 5 | licenseType: Pro 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Prefabs/Cube.prefab: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/herbou/Unity_CubesGame/b271d9a656b565efa67a0254bc4fe96a3a17640e/Assets/Prefabs/Cube.prefab -------------------------------------------------------------------------------- /Assets/Prefabs/Cube.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b6878721b76622342997c9f269eb271c 3 | timeCreated: 1607719822 4 | licenseType: Pro 5 | NativeFormatImporter: 6 | mainObjectFileID: 100100000 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Prefabs/Explosion FX.prefab: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/herbou/Unity_CubesGame/b271d9a656b565efa67a0254bc4fe96a3a17640e/Assets/Prefabs/Explosion FX.prefab -------------------------------------------------------------------------------- /Assets/Prefabs/Explosion FX.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c6d705d1af67da24dbdf8cf8461c8fd7 3 | timeCreated: 1619629243 4 | licenseType: Pro 5 | NativeFormatImporter: 6 | mainObjectFileID: 100100000 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Prefabs/walls.prefab: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/herbou/Unity_CubesGame/b271d9a656b565efa67a0254bc4fe96a3a17640e/Assets/Prefabs/walls.prefab -------------------------------------------------------------------------------- /Assets/Prefabs/walls.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e11665ab12e6c6041858c18a684c6510 3 | timeCreated: 1619629207 4 | licenseType: Pro 5 | NativeFormatImporter: 6 | mainObjectFileID: 100100000 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Scripts.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d336f7d8f93f36e4ab372ef0c89359ae 3 | folderAsset: yes 4 | timeCreated: 1621182230 5 | licenseType: Pro 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Scripts/Cube.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine ; 2 | using TMPro ; 3 | 4 | public class Cube : MonoBehaviour { 5 | static int staticID = 0 ; 6 | [SerializeField] private TMP_Text[] numbersText ; 7 | 8 | [HideInInspector] public int CubeID ; 9 | [HideInInspector] public Color CubeColor ; 10 | [HideInInspector] public int CubeNumber ; 11 | [HideInInspector] public Rigidbody CubeRigidbody ; 12 | [HideInInspector] public bool IsMainCube ; 13 | 14 | private MeshRenderer cubeMeshRenderer ; 15 | 16 | private void Awake () { 17 | CubeID = staticID++ ; 18 | cubeMeshRenderer = GetComponent () ; 19 | CubeRigidbody = GetComponent () ; 20 | } 21 | 22 | public void SetColor (Color color) { 23 | CubeColor = color ; 24 | cubeMeshRenderer.material.color = color ; 25 | } 26 | 27 | public void SetNumber (int number) { 28 | CubeNumber = number ; 29 | for (int i = 0; i < 6; i++) { 30 | numbersText [ i ].text = number.ToString () ; 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /Assets/Scripts/Cube.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6c156f1d5b2526c4d80b26572ad18a74 3 | timeCreated: 1621247656 4 | licenseType: Pro 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/Scripts/CubeCollision.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine ; 2 | 3 | public class CubeCollision : MonoBehaviour { 4 | Cube cube ; 5 | 6 | private void Awake () { 7 | cube = GetComponent () ; 8 | } 9 | 10 | private void OnCollisionEnter (Collision collision) { 11 | Cube otherCube = collision.gameObject.GetComponent () ; 12 | 13 | // check if contacted with other cube 14 | if (otherCube != null && cube.CubeID > otherCube.CubeID) { 15 | // check if both cubes have same number 16 | if (cube.CubeNumber == otherCube.CubeNumber) { 17 | Vector3 contactPoint = collision.contacts [ 0 ].point ; 18 | 19 | // check if cubes number less than max number in CubeSpawner: 20 | if (otherCube.CubeNumber < CubeSpawner.Instance.maxCubeNumber) { 21 | // spawn a new cube as a result 22 | Cube newCube = CubeSpawner.Instance.Spawn (cube.CubeNumber * 2, contactPoint + Vector3.up * 1.6f) ; 23 | //push the new cube up and forward: 24 | float pushForce = 2.5f ; 25 | newCube.CubeRigidbody.AddForce (new Vector3 (0, .3f, 1f) * pushForce, ForceMode.Impulse) ; 26 | 27 | // add some torque: 28 | float randomValue = Random.Range (-20f, 20f) ; 29 | Vector3 randomDirection = Vector3.one * randomValue ; 30 | newCube.CubeRigidbody.AddTorque (randomDirection) ; 31 | } 32 | 33 | // the explosion should affect surrounded cubes too: 34 | Collider[] surroundedCubes = Physics.OverlapSphere (contactPoint, 2f) ; 35 | float explosionForce = 400f ; 36 | float explosionRadius = 1.5f ; 37 | 38 | foreach (Collider coll in surroundedCubes) { 39 | if (coll.attachedRigidbody != null) 40 | coll.attachedRigidbody.AddExplosionForce (explosionForce, contactPoint, explosionRadius) ; 41 | } 42 | 43 | FX.Instance.PlayCubeExplosionFX (contactPoint, cube.CubeColor) ; 44 | 45 | // Destroy the two cubes: 46 | CubeSpawner.Instance.DestroyCube (cube) ; 47 | CubeSpawner.Instance.DestroyCube (otherCube) ; 48 | } 49 | } 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /Assets/Scripts/CubeCollision.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e78bb23683646b24b917007399181075 3 | timeCreated: 1621252664 4 | licenseType: Pro 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/Scripts/CubeSpawner.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine ; 2 | using System.Collections.Generic ; 3 | 4 | public class CubeSpawner : MonoBehaviour { 5 | // Singleton class 6 | public static CubeSpawner Instance ; 7 | 8 | Queue cubesQueue = new Queue () ; 9 | [SerializeField] private int cubesQueueCapacity = 20 ; 10 | [SerializeField] private bool autoQueueGrow = true ; 11 | 12 | [SerializeField] private GameObject cubePrefab ; 13 | [SerializeField] private Color[] cubeColors ; 14 | 15 | [HideInInspector] public int maxCubeNumber ; 16 | // in our case it's 4096 (2^12) 17 | 18 | private int maxPower = 12 ; 19 | 20 | private Vector3 defaultSpawnPosition ; 21 | 22 | private void Awake () { 23 | Instance = this ; 24 | 25 | defaultSpawnPosition = transform.position ; 26 | maxCubeNumber = (int)Mathf.Pow (2, maxPower) ; 27 | 28 | InitializeCubesQueue () ; 29 | } 30 | 31 | private void InitializeCubesQueue () { 32 | for (int i = 0; i < cubesQueueCapacity; i++) 33 | AddCubeToQueue () ; 34 | } 35 | 36 | private void AddCubeToQueue () { 37 | Cube cube = Instantiate (cubePrefab, defaultSpawnPosition, Quaternion.identity, transform) 38 | .GetComponent () ; 39 | 40 | cube.gameObject.SetActive (false) ; 41 | cube.IsMainCube = false ; 42 | cubesQueue.Enqueue (cube) ; 43 | } 44 | 45 | public Cube Spawn (int number, Vector3 position) { 46 | if (cubesQueue.Count == 0) { 47 | if (autoQueueGrow) { 48 | cubesQueueCapacity++ ; 49 | AddCubeToQueue () ; 50 | 51 | } else { 52 | Debug.LogError ("[Cubes Queue] : no more cubes available in the pool") ; 53 | return null ; 54 | } 55 | } 56 | 57 | Cube cube = cubesQueue.Dequeue () ; 58 | cube.transform.position = position ; 59 | cube.SetNumber (number) ; 60 | cube.SetColor (GetColor (number)) ; 61 | cube.gameObject.SetActive (true) ; 62 | 63 | return cube ; 64 | } 65 | 66 | public Cube SpawnRandom () { 67 | return Spawn (GenerateRandomNumber (), defaultSpawnPosition) ; 68 | } 69 | 70 | public void DestroyCube (Cube cube) { 71 | cube.CubeRigidbody.velocity = Vector3.zero ; 72 | cube.CubeRigidbody.angularVelocity = Vector3.zero ; 73 | cube.transform.rotation = Quaternion.identity ; 74 | cube.IsMainCube = false ; 75 | cube.gameObject.SetActive (false) ; 76 | cubesQueue.Enqueue (cube) ; 77 | } 78 | 79 | public int GenerateRandomNumber () { 80 | return (int)Mathf.Pow (2, Random.Range (1, 6)) ; 81 | } 82 | 83 | private Color GetColor (int number) { 84 | return cubeColors [ (int)(Mathf.Log (number) / Mathf.Log (2)) - 1 ] ; 85 | } 86 | } 87 | -------------------------------------------------------------------------------- /Assets/Scripts/CubeSpawner.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1089c6c87680b5f45b0fc8819c03537e 3 | timeCreated: 1621251201 4 | licenseType: Pro 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/Scripts/FX.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine ; 2 | 3 | public class FX : MonoBehaviour { 4 | [SerializeField] private ParticleSystem cubeExplosionFX ; 5 | 6 | ParticleSystem.MainModule cubeExplosionFXMainModule ; 7 | 8 | //singleton class 9 | public static FX Instance ; 10 | 11 | private void Awake () { 12 | Instance = this ; 13 | } 14 | 15 | private void Start () { 16 | cubeExplosionFXMainModule = cubeExplosionFX.main ; 17 | } 18 | 19 | public void PlayCubeExplosionFX (Vector3 position, Color color) { 20 | cubeExplosionFXMainModule.startColor = new ParticleSystem.MinMaxGradient (color) ; 21 | cubeExplosionFX.transform.position = position ; 22 | cubeExplosionFX.Play () ; 23 | } 24 | 25 | } 26 | -------------------------------------------------------------------------------- /Assets/Scripts/FX.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4fbf783c3cce6914d8ed7de9c96198a7 3 | timeCreated: 1621255917 4 | licenseType: Pro 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/Scripts/Player.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine ; 2 | 3 | public class Player : MonoBehaviour { 4 | [SerializeField] private float moveSpeed ; 5 | [SerializeField] private float pushForce ; 6 | [SerializeField] private float cubeMaxPosX ; 7 | [Space] 8 | [SerializeField] private TouchSlider touchSlider ; 9 | 10 | private Cube mainCube ; 11 | 12 | private bool isPointerDown ; 13 | private bool canMove ; 14 | private Vector3 cubePos ; 15 | 16 | private void Start () { 17 | SpawnCube () ; 18 | canMove = true ; 19 | 20 | // Listen to slider events: 21 | touchSlider.OnPointerDownEvent += OnPointerDown ; 22 | touchSlider.OnPointerDragEvent += OnPointerDrag ; 23 | touchSlider.OnPointerUpEvent += OnPointerUp ; 24 | } 25 | 26 | private void Update () { 27 | if (isPointerDown) 28 | mainCube.transform.position = Vector3.Lerp ( 29 | mainCube.transform.position, 30 | cubePos, 31 | moveSpeed * Time.deltaTime 32 | ) ; 33 | } 34 | 35 | private void OnPointerDown () { 36 | isPointerDown = true ; 37 | } 38 | 39 | private void OnPointerDrag (float xMovement) { 40 | if (isPointerDown) { 41 | cubePos = mainCube.transform.position ; 42 | cubePos.x = xMovement * cubeMaxPosX ; 43 | } 44 | } 45 | 46 | private void OnPointerUp () { 47 | if (isPointerDown && canMove) { 48 | isPointerDown = false ; 49 | canMove = false ; 50 | 51 | // Push the cube: 52 | mainCube.CubeRigidbody.AddForce (Vector3.forward * pushForce, ForceMode.Impulse) ; 53 | 54 | Invoke ("SpawnNewCube", 0.3f) ; 55 | } 56 | } 57 | 58 | private void SpawnNewCube () { 59 | mainCube.IsMainCube = false ; 60 | canMove = true ; 61 | SpawnCube () ; 62 | } 63 | 64 | private void SpawnCube () { 65 | mainCube = CubeSpawner.Instance.SpawnRandom () ; 66 | mainCube.IsMainCube = true ; 67 | 68 | // reset cubePos variable 69 | cubePos = mainCube.transform.position ; 70 | } 71 | 72 | private void OnDestroy () { 73 | //remove listeners: 74 | touchSlider.OnPointerDownEvent -= OnPointerDown ; 75 | touchSlider.OnPointerDragEvent -= OnPointerDrag ; 76 | touchSlider.OnPointerUpEvent -= OnPointerUp ; 77 | } 78 | } 79 | -------------------------------------------------------------------------------- /Assets/Scripts/Player.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 04de730d0f84a3841a240e6daf97530f 3 | timeCreated: 1621248771 4 | licenseType: Pro 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/Scripts/RedZone.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine ; 2 | 3 | public class RedZone : MonoBehaviour { 4 | private void OnTriggerStay (Collider other) { 5 | Cube cube = other.GetComponent () ; 6 | if (cube != null) { 7 | if (!cube.IsMainCube && cube.CubeRigidbody.velocity.magnitude < .1f) { 8 | Debug.Log ("Gameover") ; 9 | } 10 | } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /Assets/Scripts/RedZone.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 956a325379a16cb438d728effa4d93f1 3 | timeCreated: 1621256483 4 | licenseType: Pro 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/Scripts/TouchSlider.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine ; 2 | using UnityEngine.Events ; 3 | using UnityEngine.EventSystems ; 4 | using UnityEngine.UI ; 5 | 6 | public class TouchSlider : MonoBehaviour, IPointerDownHandler, IPointerUpHandler { 7 | public UnityAction OnPointerDownEvent ; 8 | public UnityAction OnPointerDragEvent ; 9 | public UnityAction OnPointerUpEvent ; 10 | 11 | private Slider uiSlider ; 12 | 13 | private void Awake () { 14 | uiSlider = GetComponent () ; 15 | uiSlider.onValueChanged.AddListener (OnSliderValueChanged) ; 16 | } 17 | 18 | public void OnPointerDown (PointerEventData eventData) { 19 | if (OnPointerDownEvent != null) 20 | OnPointerDownEvent.Invoke () ; 21 | 22 | if (OnPointerDragEvent != null) 23 | OnPointerDragEvent.Invoke (uiSlider.value) ; 24 | } 25 | 26 | private void OnSliderValueChanged (float value) { 27 | if (OnPointerDragEvent != null) 28 | OnPointerDragEvent.Invoke (value) ; 29 | } 30 | 31 | public void OnPointerUp (PointerEventData eventData) { 32 | if (OnPointerUpEvent != null) 33 | OnPointerUpEvent.Invoke () ; 34 | 35 | // reset slider value: 36 | uiSlider.value = 0f ; 37 | } 38 | 39 | private void OnDestroy () { 40 | //remove listeners: to avoid memory leaks 41 | uiSlider.onValueChanged.RemoveListener (OnSliderValueChanged) ; 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /Assets/Scripts/TouchSlider.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 5e142fe5ad26f1c4793380d18be4fd67 3 | timeCreated: 1621248011 4 | licenseType: Pro 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/Sprites.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 74311244fb71af14e8ea15a1c9d4cf5d 3 | folderAsset: yes 4 | timeCreated: 1607517994 5 | licenseType: Pro 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Sprites/Square.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/herbou/Unity_CubesGame/b271d9a656b565efa67a0254bc4fe96a3a17640e/Assets/Sprites/Square.png -------------------------------------------------------------------------------- /Assets/Sprites/Square.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7db6c7cb50041144a88e08ac62bb7d02 3 | timeCreated: 1619627177 4 | licenseType: Pro 5 | TextureImporter: 6 | fileIDToRecycleName: {} 7 | serializedVersion: 4 8 | mipmaps: 9 | mipMapMode: 0 10 | enableMipMap: 1 11 | sRGBTexture: 1 12 | linearTexture: 0 13 | fadeOut: 0 14 | borderMipMap: 0 15 | mipMapFadeDistanceStart: 1 16 | mipMapFadeDistanceEnd: 3 17 | bumpmap: 18 | convertToNormalMap: 0 19 | externalNormalMap: 0 20 | heightScale: 0.25 21 | normalMapFilter: 0 22 | isReadable: 0 23 | grayScaleToAlpha: 0 24 | generateCubemap: 6 25 | cubemapConvolution: 0 26 | seamlessCubemap: 0 27 | textureFormat: 1 28 | maxTextureSize: 2048 29 | textureSettings: 30 | filterMode: 0 31 | aniso: 1 32 | mipBias: 0 33 | wrapMode: 0 34 | nPOTScale: 0 35 | lightmap: 0 36 | compressionQuality: 50 37 | spriteMode: 1 38 | spriteExtrude: 1 39 | spriteMeshType: 0 40 | alignment: 0 41 | spritePivot: {x: 0.5, y: 0.5} 42 | spriteBorder: {x: 1, y: 1, z: 1, w: 1} 43 | spritePixelsToUnits: 4 44 | alphaUsage: 1 45 | alphaIsTransparency: 0 46 | spriteTessellationDetail: -1 47 | textureType: 8 48 | textureShape: 1 49 | maxTextureSizeSet: 0 50 | compressionQualitySet: 0 51 | textureFormatSet: 0 52 | platformSettings: 53 | - buildTarget: DefaultTexturePlatform 54 | maxTextureSize: 2048 55 | textureFormat: 4 56 | textureCompression: 1 57 | compressionQuality: 50 58 | crunchedCompression: 0 59 | allowsAlphaSplitting: 0 60 | overridden: 0 61 | - buildTarget: Standalone 62 | maxTextureSize: 2048 63 | textureFormat: 4 64 | textureCompression: 1 65 | compressionQuality: 50 66 | crunchedCompression: 0 67 | allowsAlphaSplitting: 0 68 | overridden: 0 69 | - buildTarget: Android 70 | maxTextureSize: 2048 71 | textureFormat: 4 72 | textureCompression: 1 73 | compressionQuality: 50 74 | crunchedCompression: 0 75 | allowsAlphaSplitting: 0 76 | overridden: 0 77 | spriteSheet: 78 | serializedVersion: 2 79 | sprites: [] 80 | outline: 81 | - - {x: -2, y: -2} 82 | - {x: -2, y: 2} 83 | - {x: 2, y: 2} 84 | - {x: 2, y: -2} 85 | spritePackingTag: 86 | userData: 87 | assetBundleName: 88 | assetBundleVariant: 89 | -------------------------------------------------------------------------------- /Assets/Sprites/hand.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/herbou/Unity_CubesGame/b271d9a656b565efa67a0254bc4fe96a3a17640e/Assets/Sprites/hand.png -------------------------------------------------------------------------------- /Assets/Sprites/hand.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 55e5221099dbe6a4f88cc71e67bcdd4f 3 | timeCreated: 1619635143 4 | licenseType: Pro 5 | TextureImporter: 6 | fileIDToRecycleName: {} 7 | serializedVersion: 4 8 | mipmaps: 9 | mipMapMode: 0 10 | enableMipMap: 0 11 | sRGBTexture: 1 12 | linearTexture: 0 13 | fadeOut: 0 14 | borderMipMap: 0 15 | mipMapFadeDistanceStart: 1 16 | mipMapFadeDistanceEnd: 3 17 | bumpmap: 18 | convertToNormalMap: 0 19 | externalNormalMap: 0 20 | heightScale: 0.25 21 | normalMapFilter: 0 22 | isReadable: 0 23 | grayScaleToAlpha: 0 24 | generateCubemap: 6 25 | cubemapConvolution: 0 26 | seamlessCubemap: 0 27 | textureFormat: 1 28 | maxTextureSize: 2048 29 | textureSettings: 30 | filterMode: -1 31 | aniso: -1 32 | mipBias: -1 33 | wrapMode: 1 34 | nPOTScale: 0 35 | lightmap: 0 36 | compressionQuality: 50 37 | spriteMode: 1 38 | spriteExtrude: 1 39 | spriteMeshType: 1 40 | alignment: 0 41 | spritePivot: {x: 0.5, y: 0.5} 42 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 43 | spritePixelsToUnits: 100 44 | alphaUsage: 1 45 | alphaIsTransparency: 1 46 | spriteTessellationDetail: -1 47 | textureType: 8 48 | textureShape: 1 49 | maxTextureSizeSet: 0 50 | compressionQualitySet: 0 51 | textureFormatSet: 0 52 | platformSettings: 53 | - buildTarget: DefaultTexturePlatform 54 | maxTextureSize: 2048 55 | textureFormat: -1 56 | textureCompression: 1 57 | compressionQuality: 50 58 | crunchedCompression: 0 59 | allowsAlphaSplitting: 0 60 | overridden: 0 61 | - buildTarget: Standalone 62 | maxTextureSize: 2048 63 | textureFormat: -1 64 | textureCompression: 1 65 | compressionQuality: 50 66 | crunchedCompression: 0 67 | allowsAlphaSplitting: 0 68 | overridden: 0 69 | - buildTarget: Android 70 | maxTextureSize: 2048 71 | textureFormat: -1 72 | textureCompression: 1 73 | compressionQuality: 50 74 | crunchedCompression: 0 75 | allowsAlphaSplitting: 0 76 | overridden: 0 77 | spriteSheet: 78 | serializedVersion: 2 79 | sprites: [] 80 | outline: [] 81 | spritePackingTag: 82 | userData: 83 | assetBundleName: 84 | assetBundleVariant: 85 | -------------------------------------------------------------------------------- /Assets/Sprites/transparent.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/herbou/Unity_CubesGame/b271d9a656b565efa67a0254bc4fe96a3a17640e/Assets/Sprites/transparent.png -------------------------------------------------------------------------------- /Assets/Sprites/transparent.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 898997bc28b4c984e9a4d024366076b0 3 | timeCreated: 1607528277 4 | licenseType: Pro 5 | TextureImporter: 6 | fileIDToRecycleName: {} 7 | serializedVersion: 4 8 | mipmaps: 9 | mipMapMode: 0 10 | enableMipMap: 0 11 | sRGBTexture: 1 12 | linearTexture: 0 13 | fadeOut: 0 14 | borderMipMap: 0 15 | mipMapFadeDistanceStart: 1 16 | mipMapFadeDistanceEnd: 3 17 | bumpmap: 18 | convertToNormalMap: 0 19 | externalNormalMap: 0 20 | heightScale: 0.25 21 | normalMapFilter: 0 22 | isReadable: 0 23 | grayScaleToAlpha: 0 24 | generateCubemap: 6 25 | cubemapConvolution: 0 26 | seamlessCubemap: 0 27 | textureFormat: 1 28 | maxTextureSize: 2048 29 | textureSettings: 30 | filterMode: -1 31 | aniso: -1 32 | mipBias: -1 33 | wrapMode: 1 34 | nPOTScale: 0 35 | lightmap: 0 36 | compressionQuality: 50 37 | spriteMode: 1 38 | spriteExtrude: 1 39 | spriteMeshType: 1 40 | alignment: 9 41 | spritePivot: {x: 0.5, y: 0} 42 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 43 | spritePixelsToUnits: 100 44 | alphaUsage: 1 45 | alphaIsTransparency: 1 46 | spriteTessellationDetail: -1 47 | textureType: 8 48 | textureShape: 1 49 | maxTextureSizeSet: 0 50 | compressionQualitySet: 0 51 | textureFormatSet: 0 52 | platformSettings: 53 | - buildTarget: DefaultTexturePlatform 54 | maxTextureSize: 2048 55 | textureFormat: -1 56 | textureCompression: 1 57 | compressionQuality: 50 58 | crunchedCompression: 0 59 | allowsAlphaSplitting: 0 60 | overridden: 0 61 | - buildTarget: Standalone 62 | maxTextureSize: 2048 63 | textureFormat: -1 64 | textureCompression: 1 65 | compressionQuality: 50 66 | crunchedCompression: 0 67 | allowsAlphaSplitting: 0 68 | overridden: 0 69 | - buildTarget: Android 70 | maxTextureSize: 2048 71 | textureFormat: -1 72 | textureCompression: 1 73 | compressionQuality: 50 74 | crunchedCompression: 0 75 | allowsAlphaSplitting: 0 76 | overridden: 0 77 | spriteSheet: 78 | serializedVersion: 2 79 | sprites: [] 80 | outline: [] 81 | spritePackingTag: 82 | userData: 83 | assetBundleName: 84 | assetBundleVariant: 85 | -------------------------------------------------------------------------------- /Assets/TextMesh Pro.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c50aa71e72f4f73428709f7ba1ac7005 3 | folderAsset: yes 4 | timeCreated: 1607712284 5 | licenseType: Pro 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/scene.unity: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/herbou/Unity_CubesGame/b271d9a656b565efa67a0254bc4fe96a3a17640e/Assets/scene.unity -------------------------------------------------------------------------------- /Assets/scene.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f74d6cf6b1857d34eaf0a162eb496d11 3 | timeCreated: 1607516517 4 | licenseType: Pro 5 | DefaultImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /LICENCE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2021 Hamza Herbou 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Unity Tutorial - Mega Cube clone 2 | 3 | ### Video tutorial : [https://youtu.be/BYuiy8x2sTE](https://youtu.be/BYuiy8x2sTE) 4 | 5 | ![Video thumbnail](https://img.youtube.com/vi/BYuiy8x2sTE/0.jpg) 6 | 7 | 8 | 9 |

10 |
11 | ## ❤️ Donate 12 | Paypal 13 | --------------------------------------------------------------------------------