diff --git a/ShowPT/Assets/Graphical Resources/Images.meta b/ShowPT/Assets/Graphical Resources/Images.meta new file mode 100644 index 00000000..aa280aa4 --- /dev/null +++ b/ShowPT/Assets/Graphical Resources/Images.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: 1d4d4dfb0baaced4fb79607c1d607af7 +folderAsset: yes +timeCreated: 1526338390 +licenseType: Free +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/ShowPT/Assets/Graphical Resources/Images/loadingCircle.png b/ShowPT/Assets/Graphical Resources/Images/loadingCircle.png new file mode 100644 index 00000000..cac82865 Binary files /dev/null and b/ShowPT/Assets/Graphical Resources/Images/loadingCircle.png differ diff --git a/ShowPT/Assets/Graphical Resources/Images/loadingCircle.png.meta b/ShowPT/Assets/Graphical Resources/Images/loadingCircle.png.meta new file mode 100644 index 00000000..fdb5cd8a --- /dev/null +++ b/ShowPT/Assets/Graphical Resources/Images/loadingCircle.png.meta @@ -0,0 +1,87 @@ +fileFormatVersion: 2 +guid: b37d32031c2184248a434915752ee127 +timeCreated: 1526338395 +licenseType: Free +TextureImporter: + fileIDToRecycleName: {} + externalObjects: {} + serializedVersion: 4 + 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 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: -1 + aniso: -1 + mipBias: -1 + 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} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 8 + textureShape: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + - buildTarget: Standalone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/ShowPT/Assets/Scenes/Menu Test.unity b/ShowPT/Assets/Scenes/Menu Test.unity index 2a3ad444..0308f8bc 100644 --- a/ShowPT/Assets/Scenes/Menu Test.unity +++ b/ShowPT/Assets/Scenes/Menu Test.unity @@ -2580,6 +2580,7 @@ GameObject: m_Component: - component: {fileID: 807021168} - component: {fileID: 807021167} + - component: {fileID: 807021169} m_Layer: 5 m_Name: loadBarSlider m_TagString: loadBarSlider @@ -2623,7 +2624,7 @@ MonoBehaviour: m_DisabledTrigger: Disabled m_Interactable: 1 m_TargetGraphic: {fileID: 0} - m_FillRect: {fileID: 1859966966} + m_FillRect: {fileID: 0} m_HandleRect: {fileID: 0} m_Direction: 0 m_MinValue: 0 @@ -2646,15 +2647,26 @@ RectTransform: m_LocalScale: {x: 1, y: 1, z: 1} m_Children: - {fileID: 1561522356} - - {fileID: 2009734345} m_Father: {fileID: 324646969} m_RootOrder: 1 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0.5, y: 0.5} m_AnchorMax: {x: 0.5, y: 0.5} - m_AnchoredPosition: {x: 0, y: -38.005615} - m_SizeDelta: {x: 160, y: 48.28} + m_AnchoredPosition: {x: -6, y: -54} + m_SizeDelta: {x: 148.3, y: 165.4} m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &807021169 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 807021166} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 3a877c57884eadb4897427aa654dc131, type: 3} + m_Name: + m_EditorClassIdentifier: + speed: 200 --- !u!1 &881519352 GameObject: m_ObjectHideFlags: 0 @@ -4487,8 +4499,8 @@ MonoBehaviour: m_Calls: [] m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - m_Sprite: {fileID: 10907, guid: 0000000000000000f000000000000000, type: 0} - m_Type: 1 + m_Sprite: {fileID: 21300000, guid: b37d32031c2184248a434915752ee127, type: 3} + m_Type: 0 m_PreserveAspect: 0 m_FillCenter: 1 m_FillMethod: 4 @@ -5569,74 +5581,6 @@ Prefab: m_RemovedComponents: [] m_ParentPrefab: {fileID: 100100000, guid: 73a811b71265ef7458f52f7b08de4e89, type: 2} m_IsPrefabParent: 0 ---- !u!1 &1859966965 -GameObject: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - serializedVersion: 5 - m_Component: - - component: {fileID: 1859966966} - - component: {fileID: 1859966968} - - component: {fileID: 1859966967} - m_Layer: 5 - m_Name: Fill - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!224 &1859966966 -RectTransform: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 1859966965} - 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: 2009734345} - m_RootOrder: 0 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 0} - m_AnchorMax: {x: 0, y: 1} - m_AnchoredPosition: {x: 0, y: 0} - m_SizeDelta: {x: 10, y: 0} - m_Pivot: {x: 0.5, y: 0.5} ---- !u!114 &1859966967 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 1859966965} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Material: {fileID: 0} - m_Color: {r: 0.24705884, g: 0.6627451, b: 0.9607844, a: 1} - m_RaycastTarget: 1 - m_OnCullStateChanged: - m_PersistentCalls: - m_Calls: [] - m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, - Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - m_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0} - m_Type: 1 - m_PreserveAspect: 0 - m_FillCenter: 1 - m_FillMethod: 4 - m_FillAmount: 1 - m_FillClockwise: 1 - m_FillOrigin: 0 ---- !u!222 &1859966968 -CanvasRenderer: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 1859966965} --- !u!1 &1868135951 GameObject: m_ObjectHideFlags: 0 @@ -6124,40 +6068,6 @@ CanvasRenderer: m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 0} m_GameObject: {fileID: 1980223486} ---- !u!1 &2009734344 -GameObject: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - serializedVersion: 5 - m_Component: - - component: {fileID: 2009734345} - m_Layer: 5 - m_Name: Fill Area - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!224 &2009734345 -RectTransform: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 2009734344} - 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: - - {fileID: 1859966966} - m_Father: {fileID: 807021168} - m_RootOrder: 1 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 0.25} - m_AnchorMax: {x: 1, y: 0.75} - m_AnchoredPosition: {x: -0, y: 0} - m_SizeDelta: {x: -10.01, y: 0} - m_Pivot: {x: 0.5, y: 0.5} --- !u!1 &2022870255 GameObject: m_ObjectHideFlags: 0 diff --git a/ShowPT/Assets/Scripts/AutoRotationUI.cs b/ShowPT/Assets/Scripts/AutoRotationUI.cs new file mode 100644 index 00000000..31a26195 --- /dev/null +++ b/ShowPT/Assets/Scripts/AutoRotationUI.cs @@ -0,0 +1,15 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; + +public class AutoRotationUI : MonoBehaviour +{ + + public float speed = 20f; + + // Update is called once per frame + void Update () { + + gameObject.transform.Rotate(Vector3.back, speed*Time.deltaTime); + } +} diff --git a/ShowPT/Assets/Scripts/AutoRotationUI.cs.meta b/ShowPT/Assets/Scripts/AutoRotationUI.cs.meta new file mode 100644 index 00000000..f2a14743 --- /dev/null +++ b/ShowPT/Assets/Scripts/AutoRotationUI.cs.meta @@ -0,0 +1,13 @@ +fileFormatVersion: 2 +guid: 3a877c57884eadb4897427aa654dc131 +timeCreated: 1526338456 +licenseType: Free +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/ShowPT/Assets/Scripts/Main.cs b/ShowPT/Assets/Scripts/Main.cs index 70d7be21..76fd0875 100644 --- a/ShowPT/Assets/Scripts/Main.cs +++ b/ShowPT/Assets/Scripts/Main.cs @@ -7,6 +7,7 @@ public class Main : MonoBehaviour { public static Main instance = null; public Slider loadBar; + AsyncOperation async; private void Awake() { @@ -18,30 +19,35 @@ private void Awake() } // Use this for initialization - private void Start() {} - - private void Update() {} - - public void playGame(string name) + private void Start() { - StartCoroutine(loadLevel(name)); + StartCoroutine(loadLevel(1)); } - public void loadSceneByName(string name) + private void Update() { - SceneManager.LoadSceneAsync(name); + if (async != null && async.isDone) + { + Debug.Log("done loading"); + } } - IEnumerator loadLevel(string name) + public void playGame(string name) { - AsyncOperation operation = SceneManager.LoadSceneAsync(name); - while (!operation.isDone) + if (async != null) { - loadBar.value = operation.progress; - yield return null; + async.allowSceneActivation = true; } } + IEnumerator loadLevel(int numScene) + { + async = SceneManager.LoadSceneAsync(numScene); + loadBar.value = async.progress; + async.allowSceneActivation = false; + yield return async; + } + public void quitGame() { Application.Quit(); diff --git a/ShowPT/ProjectSettings/EditorBuildSettings.asset b/ShowPT/ProjectSettings/EditorBuildSettings.asset index c0921d59..ed0d8e9d 100644 --- a/ShowPT/ProjectSettings/EditorBuildSettings.asset +++ b/ShowPT/ProjectSettings/EditorBuildSettings.asset @@ -5,7 +5,7 @@ EditorBuildSettings: m_ObjectHideFlags: 0 serializedVersion: 2 m_Scenes: - - enabled: 0 + - enabled: 1 path: Assets/Scenes/Menu Test.unity guid: 70e5d543f85ce384eb4eafc4024dd735 - enabled: 1