diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..186c120 --- /dev/null +++ b/.gitignore @@ -0,0 +1,31 @@ +# =============== # +# Unity generated # +# =============== # +Temp/ +Library/ + +# ===================================== # +# Visual Studio / MonoDevelop generated # +# ===================================== # +ExportedObj/ +obj/ +*.svd +*.userprefs +/*.csproj +*.pidb +*.suo +/*.sln +*.user +*.unityproj +*.booproj + +# ============ # +# OS generated # +# ============ # +.DS_Store +.DS_Store? +._* +.Spotlight-V100 +.Trashes +ehthumbs.db +Thumbs.db \ No newline at end of file diff --git a/Assets/Materials.meta b/Assets/Materials.meta new file mode 100644 index 0000000..6040578 --- /dev/null +++ b/Assets/Materials.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 93f0c0b90aab84aa9a74b8e3defe3d29 +folderAsset: yes +timeCreated: 1461076928 +licenseType: Store +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Materials/Cube.mat b/Assets/Materials/Cube.mat new file mode 100644 index 0000000..b98cbe8 Binary files /dev/null and b/Assets/Materials/Cube.mat differ diff --git a/Assets/Materials/Cube.mat.meta b/Assets/Materials/Cube.mat.meta new file mode 100644 index 0000000..a9561fd --- /dev/null +++ b/Assets/Materials/Cube.mat.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 8f638013a0cfa4a398f00d05518a0b41 +timeCreated: 1460724879 +licenseType: Store +NativeFormatImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Prefabs.meta b/Assets/Prefabs.meta new file mode 100644 index 0000000..ef14de1 --- /dev/null +++ b/Assets/Prefabs.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: fa5c4a77f2f968b49a9f41e20228e034 +folderAsset: yes +timeCreated: 1479956424 +licenseType: Free +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Prefabs/Capsule.prefab b/Assets/Prefabs/Capsule.prefab new file mode 100644 index 0000000..518bf18 Binary files /dev/null and b/Assets/Prefabs/Capsule.prefab differ diff --git a/Assets/Prefabs/Capsule.prefab.meta b/Assets/Prefabs/Capsule.prefab.meta new file mode 100644 index 0000000..531253d --- /dev/null +++ b/Assets/Prefabs/Capsule.prefab.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: f4e57775724951a4cb915a7d1af37e74 +timeCreated: 1478187092 +licenseType: Free +NativeFormatImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Prefabs/Cube.prefab b/Assets/Prefabs/Cube.prefab new file mode 100644 index 0000000..0d60c46 Binary files /dev/null and b/Assets/Prefabs/Cube.prefab differ diff --git a/Assets/Prefabs/Cube.prefab.meta b/Assets/Prefabs/Cube.prefab.meta new file mode 100644 index 0000000..4749716 --- /dev/null +++ b/Assets/Prefabs/Cube.prefab.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 00e22d1ed21d14248801d764a0f6a057 +timeCreated: 1478187146 +licenseType: Free +NativeFormatImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Prefabs/Cylinder.prefab b/Assets/Prefabs/Cylinder.prefab new file mode 100644 index 0000000..6b436a1 Binary files /dev/null and b/Assets/Prefabs/Cylinder.prefab differ diff --git a/Assets/Prefabs/Cylinder.prefab.meta b/Assets/Prefabs/Cylinder.prefab.meta new file mode 100644 index 0000000..6201514 --- /dev/null +++ b/Assets/Prefabs/Cylinder.prefab.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 1a3ac787c5643744ea61ad4e26781184 +timeCreated: 1478187095 +licenseType: Free +NativeFormatImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Prefabs/Sphere.prefab b/Assets/Prefabs/Sphere.prefab new file mode 100644 index 0000000..09d67ea Binary files /dev/null and b/Assets/Prefabs/Sphere.prefab differ diff --git a/Assets/Prefabs/Sphere.prefab.meta b/Assets/Prefabs/Sphere.prefab.meta new file mode 100644 index 0000000..3a2e6ab --- /dev/null +++ b/Assets/Prefabs/Sphere.prefab.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 0e73bfacc06717b4dbdb58cbd2c59d0b +timeCreated: 1478187077 +licenseType: Free +NativeFormatImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scenes.meta b/Assets/Scenes.meta new file mode 100644 index 0000000..840b684 --- /dev/null +++ b/Assets/Scenes.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: c4224d764d2c54c08b55c7e014ad9c61 +folderAsset: yes +timeCreated: 1460724855 +licenseType: Store +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scenes/Main.unity b/Assets/Scenes/Main.unity new file mode 100644 index 0000000..6692544 Binary files /dev/null and b/Assets/Scenes/Main.unity differ diff --git a/Assets/Scenes/Main.unity.meta b/Assets/Scenes/Main.unity.meta new file mode 100644 index 0000000..addfccc --- /dev/null +++ b/Assets/Scenes/Main.unity.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 23203d52fcae84949a0ef84a04c62222 +timeCreated: 1460724850 +licenseType: Store +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts.meta b/Assets/Scripts.meta new file mode 100644 index 0000000..8501437 --- /dev/null +++ b/Assets/Scripts.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 2a6613e3208f248c4b54a3283ef5fe06 +folderAsset: yes +timeCreated: 1460724861 +licenseType: Store +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/ExperienceBar.cs b/Assets/Scripts/ExperienceBar.cs new file mode 100644 index 0000000..dc2d51c --- /dev/null +++ b/Assets/Scripts/ExperienceBar.cs @@ -0,0 +1,117 @@ +using UnityEngine; +using System.Collections; +using UnityEngine.UI; + +public class ExperienceBar : MonoBehaviour { + + public int Exp = 0; + public string level = "1"; + public int nextLevel = 1; + public int Increment = 10; + public GameObject levelText; + public float barWidth; + public float barHeight; + + GameObject expBar; + // Eventually.. public RectTransform gainedExp + //Array used as expRequired[leveldesired] + public int[] expRequired = {0,0,100,250,450,700,1000,1350,1700,2150,2650 }; + public float clicksNeeded = 10; + float barMovement; + float barPosition; + + // Use this for initialization + void Start () { + expBar = this.gameObject; + } + + // Update is called once per frame + void Update () { + checkExpGain(); + //Check if Exp bar is full + + if(this.gameObject.GetComponent().sizeDelta.x == barWidth || expBar.GetComponent().sizeDelta.x > barWidth) + { + this.gameObject.GetComponent().sizeDelta = new Vector3(0, barHeight); + barPosition = 0; + levelText.GetComponent().text = level; + } + } + + public void ExpGain() + { + Exp = Exp + Increment; + //10 clicks per level DIVDED BY clicks required for exp gain + barMovement = 10 / clicksNeeded; + barPosition = barMovement + barPosition; + Debug.Log("barPosition = " + barPosition); + //use time.deltatime to smooth this out to make it look better? + this.gameObject.GetComponent().sizeDelta = new Vector3(barPosition * 10, barHeight); + } + + + public void checkExpGain() + { + switch(Exp) + { + case (100): + level = "2"; + nextLevel = 3; + clicksNeeded = (expRequired[nextLevel] - Exp)/10; + break; + + + case (250): + level = "3"; + nextLevel = 4; + clicksNeeded = (expRequired[nextLevel] - Exp) / 10; + + break; + + case (450): + level = "4"; + nextLevel = 5; + clicksNeeded = (expRequired[nextLevel] - Exp) / 10; + + break; + + case (700): + level = "5"; + nextLevel = 6; + clicksNeeded = (expRequired[nextLevel] - Exp) / 10; + break; + + case (1000): + level = "6"; + nextLevel = 7; + clicksNeeded = (expRequired[nextLevel] - Exp) / 10; + break; + + case (1350): + level = "7"; + nextLevel = 8; + clicksNeeded = (expRequired[nextLevel] - Exp) / 10; + break; + + case (1700): + level = "8"; + nextLevel = 9; + clicksNeeded = (expRequired[nextLevel] - Exp) / 10; + break; + + case (2150): + level = "9"; + nextLevel = 10; + clicksNeeded = (expRequired[nextLevel] - Exp) / 10; + break; + + case (2650): + level = "10"; + // nextLevel = 10; + clicksNeeded = (expRequired[nextLevel] - Exp) / 10; + break; + + + } + } +} diff --git a/Assets/Scripts/ExperienceBar.cs.meta b/Assets/Scripts/ExperienceBar.cs.meta new file mode 100644 index 0000000..62d1a27 --- /dev/null +++ b/Assets/Scripts/ExperienceBar.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 3512fb1b4f77da34aa574b8675dd5f91 +timeCreated: 1503403150 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/SpinningCube.cs b/Assets/Scripts/SpinningCube.cs new file mode 100644 index 0000000..339efb4 --- /dev/null +++ b/Assets/Scripts/SpinningCube.cs @@ -0,0 +1,116 @@ +using UnityEngine; +using System.Collections; + +public class SpinningCube : MonoBehaviour +{ + public float m_Speed = 20f; + public float increments = 10f; + + + private string RotationDirection = "Up"; + private Vector3 m_RotationDirection = Vector3.up; + private Vector3 stopRotation = Vector3.zero; + private Vector3 tempRotation; + + + public void ToggleRotationDirection() + { + + if (m_RotationDirection == Vector3.up) + { + m_RotationDirection = Vector3.down; + RotationDirection = "Down"; + } + else + { + m_RotationDirection = Vector3.up; + RotationDirection = "Up"; + } + Debug.Log("Toggled rotation direction: " + RotationDirection); + } + + public void ToggleRotation() + { + Debug.Log("Stopping Rotation. Last known rotation direction: " + RotationDirection); + stopRotation = Vector3.zero; + + if (m_RotationDirection == stopRotation) + { + m_RotationDirection = tempRotation; + } + else { + tempRotation = m_RotationDirection; + m_RotationDirection = stopRotation; + } + } + + public void RaiseRotationSpeed() + { + m_Speed = m_Speed + increments; + + Debug.Log("Rotation Speed: " + m_Speed); + } + + public void LowerRotationSpeed() + { + m_Speed = m_Speed - increments; + + Debug.Log("Rotation Speed: " + m_Speed); + } + + public void ResetRotationSpeed() + { + m_Speed = 20.0f; + Debug.Log("Rotation Speed Reset"); + } + + public void ChangeColorWhite() + { + GameObject.FindGameObjectsWithTag("Player"); + gameObject.GetComponent().material.color = Color.white; + } + + public void ChangeColorBlue() + { + gameObject.GetComponent().material.color = Color.blue; + } + + public void ChangeColorBlack() + { + gameObject.GetComponent().material.color = Color.black; + } + + public void ChangeColorGreen() + { + gameObject.GetComponent().material.color = Color.green; + } + + public void ChangeColorRed() + { + gameObject.GetComponent().material.color = Color.red; + } + + public void ChangeColorMagenta() + { + gameObject.GetComponent().material.color = Color.magenta; + } + + public void ChangeColorYellow() + { + gameObject.GetComponent().material.color = Color.yellow; + } + + public void ChangeColorCyan() + { + gameObject.GetComponent().material.color = Color.cyan; + } + + void Update() + { + transform.Rotate(m_RotationDirection * Time.deltaTime * m_Speed); + } + + +} + + diff --git a/Assets/Scripts/SpinningCube.cs.meta b/Assets/Scripts/SpinningCube.cs.meta new file mode 100644 index 0000000..c5273e7 --- /dev/null +++ b/Assets/Scripts/SpinningCube.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: f3f0c4784be6c460585c1b77fb5cf8bf +timeCreated: 1461145580 +licenseType: Store +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/ToggleMenus.cs b/Assets/Scripts/ToggleMenus.cs new file mode 100644 index 0000000..7ed839c --- /dev/null +++ b/Assets/Scripts/ToggleMenus.cs @@ -0,0 +1,175 @@ +using UnityEngine; +using System.Collections; + +public class ToggleMenus : MonoBehaviour +{ + + public GameObject RotMenu; + public GameObject ColorMenu; + public GameObject ShapesMenu; + public GameObject LightingMenu; + public GameObject ExpMenu; + + public GameObject Square; + public GameObject Sphere; + public GameObject Cylinder; + public GameObject Capsule; + public GameObject Temp; + public GameObject mySpawn; + + + private string Spawn = "Spawn"; + private string Active = "Cube"; + private bool ActiveMenu = false; + + // Use this for initialization + void Start() + { + Temp = Square; + + } + + public void ToggleRotationMenu() + { + if (RotMenu.gameObject.active) + { + RotMenu.gameObject.SetActive(false); + ActiveMenu = !ActiveMenu; + } + else if (!RotMenu.gameObject.active && ActiveMenu) + { + CloseAll(); + RotMenu.gameObject.SetActive(true); + } + else + { + RotMenu.gameObject.SetActive(true); + ActiveMenu = !ActiveMenu; + } + } + + public void ToggleColorMenu() + { + if (ColorMenu.gameObject.active) + { + ColorMenu.gameObject.SetActive(false); + ActiveMenu = !ActiveMenu; + } + else if (!ColorMenu.gameObject.active && ActiveMenu) + { + CloseAll(); + ColorMenu.gameObject.SetActive(true); + } + else + { + ColorMenu.gameObject.SetActive(true); + ActiveMenu = !ActiveMenu; + } + } + + public void ToggleShapesMenu() + { + if (ShapesMenu.gameObject.active) + { + ShapesMenu.gameObject.SetActive(false); + ActiveMenu = !ActiveMenu; + } + else if (!ShapesMenu.gameObject.active && ActiveMenu) + { + CloseAll(); + ShapesMenu.gameObject.SetActive(true); + } + else + { + ShapesMenu.gameObject.SetActive(true); + ActiveMenu = !ActiveMenu; + } + + } + + public void ToggleLightingMenu() + { + if (LightingMenu.gameObject.active) + { + LightingMenu.gameObject.SetActive(false); + ActiveMenu = !ActiveMenu; + } + else if (!LightingMenu.gameObject.active && ActiveMenu) + { + CloseAll(); + LightingMenu.gameObject.SetActive(true); + } + else + { + LightingMenu.gameObject.SetActive(true); + ActiveMenu = !ActiveMenu; + } + } + + public void ToggleExpMenu() + { + if (ExpMenu.gameObject.active) + { + ExpMenu.gameObject.SetActive(false); + //check if another menu is open to avoid overlapping + ActiveMenu = !ActiveMenu; + } + else if (!ExpMenu.gameObject.active && ActiveMenu) + { + CloseAll(); + ExpMenu.gameObject.SetActive(true); + } + else + { + ExpMenu.gameObject.SetActive(true); + ActiveMenu = !ActiveMenu; + } + } + + public void CloseAll() + { + ShapesMenu.gameObject.SetActive(false); + RotMenu.gameObject.SetActive(false); + ColorMenu.gameObject.SetActive(false); + LightingMenu.gameObject.SetActive(false); + ExpMenu.gameObject.SetActive(false); + + } + + public void ChangeShapeSquare() + { + Instantiate(Square, mySpawn.transform.position, mySpawn.transform.rotation); + Debug.Log("Destroy " + Active); + Destroy(GameObject.Find(Active)); + Active = "Cube(Clone)"; + Debug.Log(Active); + } + + public void ChangeShapeSphere() + { + Instantiate(Sphere, mySpawn.transform.position, mySpawn.transform.rotation); + Debug.Log("Destroy " + Active); + Destroy(GameObject.Find(Active)); + Active = "Sphere(Clone)"; + Debug.Log(Active); + } + + public void ChangeShapeCapsule() + { + Instantiate(Capsule, mySpawn.transform.position, mySpawn.transform.rotation); + Debug.Log("Destroy " + Active); + Destroy(GameObject.Find(Active)); + Active = "Capsule(Clone)"; + Debug.Log(Active); + } + + public void ChangeShapeCylinder() + { + Instantiate(Cylinder, mySpawn.transform.position, mySpawn.transform.rotation); + Debug.Log("Destroy " + Active); + Destroy(GameObject.Find(Active)); + Active = "Cylinder(Clone)"; + Debug.Log(Active); + } + +} \ No newline at end of file diff --git a/Assets/Scripts/ToggleMenus.cs.meta b/Assets/Scripts/ToggleMenus.cs.meta new file mode 100644 index 0000000..9f01c32 --- /dev/null +++ b/Assets/Scripts/ToggleMenus.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 9e370590024e5584cbd068cab625f69b +timeCreated: 1478116406 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Builds/First.apk b/Builds/First.apk new file mode 100644 index 0000000..eaa5436 Binary files /dev/null and b/Builds/First.apk differ diff --git a/ProjectSettings/AudioManager.asset b/ProjectSettings/AudioManager.asset new file mode 100644 index 0000000..ca5f85c Binary files /dev/null and b/ProjectSettings/AudioManager.asset differ diff --git a/ProjectSettings/ClusterInputManager.asset b/ProjectSettings/ClusterInputManager.asset new file mode 100644 index 0000000..23a0620 Binary files /dev/null and b/ProjectSettings/ClusterInputManager.asset differ diff --git a/ProjectSettings/DynamicsManager.asset b/ProjectSettings/DynamicsManager.asset new file mode 100644 index 0000000..6bea8aa Binary files /dev/null and b/ProjectSettings/DynamicsManager.asset differ diff --git a/ProjectSettings/EditorBuildSettings.asset b/ProjectSettings/EditorBuildSettings.asset new file mode 100644 index 0000000..c594f3d Binary files /dev/null and b/ProjectSettings/EditorBuildSettings.asset differ diff --git a/ProjectSettings/EditorSettings.asset b/ProjectSettings/EditorSettings.asset new file mode 100644 index 0000000..86b755e Binary files /dev/null and b/ProjectSettings/EditorSettings.asset differ diff --git a/ProjectSettings/GraphicsSettings.asset b/ProjectSettings/GraphicsSettings.asset new file mode 100644 index 0000000..f18e5c5 Binary files /dev/null and b/ProjectSettings/GraphicsSettings.asset differ diff --git a/ProjectSettings/InputManager.asset b/ProjectSettings/InputManager.asset new file mode 100644 index 0000000..2aef0e4 Binary files /dev/null and b/ProjectSettings/InputManager.asset differ diff --git a/ProjectSettings/NavMeshAreas.asset b/ProjectSettings/NavMeshAreas.asset new file mode 100644 index 0000000..d70765e Binary files /dev/null and b/ProjectSettings/NavMeshAreas.asset differ diff --git a/ProjectSettings/NetworkManager.asset b/ProjectSettings/NetworkManager.asset new file mode 100644 index 0000000..7f5693e Binary files /dev/null and b/ProjectSettings/NetworkManager.asset differ diff --git a/ProjectSettings/Physics2DSettings.asset b/ProjectSettings/Physics2DSettings.asset new file mode 100644 index 0000000..6947a86 Binary files /dev/null and b/ProjectSettings/Physics2DSettings.asset differ diff --git a/ProjectSettings/ProjectSettings.asset b/ProjectSettings/ProjectSettings.asset new file mode 100644 index 0000000..bb3a2a1 Binary files /dev/null and b/ProjectSettings/ProjectSettings.asset differ diff --git a/ProjectSettings/ProjectVersion.txt b/ProjectSettings/ProjectVersion.txt new file mode 100644 index 0000000..ca1aa05 --- /dev/null +++ b/ProjectSettings/ProjectVersion.txt @@ -0,0 +1 @@ +m_EditorVersion: 2017.1.0f3 diff --git a/ProjectSettings/QualitySettings.asset b/ProjectSettings/QualitySettings.asset new file mode 100644 index 0000000..7f8b683 Binary files /dev/null and b/ProjectSettings/QualitySettings.asset differ diff --git a/ProjectSettings/TagManager.asset b/ProjectSettings/TagManager.asset new file mode 100644 index 0000000..1805621 Binary files /dev/null and b/ProjectSettings/TagManager.asset differ diff --git a/ProjectSettings/TimeManager.asset b/ProjectSettings/TimeManager.asset new file mode 100644 index 0000000..42aaac4 Binary files /dev/null and b/ProjectSettings/TimeManager.asset differ diff --git a/ProjectSettings/UnityAdsSettings.asset b/ProjectSettings/UnityAdsSettings.asset new file mode 100644 index 0000000..0db06d2 Binary files /dev/null and b/ProjectSettings/UnityAdsSettings.asset differ diff --git a/ProjectSettings/UnityConnectSettings.asset b/ProjectSettings/UnityConnectSettings.asset new file mode 100644 index 0000000..51030e7 Binary files /dev/null and b/ProjectSettings/UnityConnectSettings.asset differ