From f2f509f03f8082235a5eeee76bdd3359f12d5a63 Mon Sep 17 00:00:00 2001 From: Jesus Imery Date: Wed, 22 Mar 2017 15:15:07 -0400 Subject: [PATCH] Created judge buttons --- Assets/Prefabs/Uitility.meta | 9 ++++ Assets/Prefabs/Uitility/Judge Skipper.prefab | 53 +++++++++++++++++++ .../Uitility/Judge Skipper.prefab.meta | 8 +++ Assets/Scripts/Utility/JudgeSkipper.cs | 35 ++++++++++++ Assets/Scripts/Utility/JudgeSkipper.cs.meta | 12 +++++ ProjectSettings/InputManager.asset | 48 +++++++++++++++++ ProjectSettings/TagManager.asset | 3 +- 7 files changed, 166 insertions(+), 2 deletions(-) create mode 100644 Assets/Prefabs/Uitility.meta create mode 100644 Assets/Prefabs/Uitility/Judge Skipper.prefab create mode 100644 Assets/Prefabs/Uitility/Judge Skipper.prefab.meta create mode 100644 Assets/Scripts/Utility/JudgeSkipper.cs create mode 100644 Assets/Scripts/Utility/JudgeSkipper.cs.meta diff --git a/Assets/Prefabs/Uitility.meta b/Assets/Prefabs/Uitility.meta new file mode 100644 index 0000000..bd264ad --- /dev/null +++ b/Assets/Prefabs/Uitility.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: c9204cf68bc3d424184863df7cf6dd1c +folderAsset: yes +timeCreated: 1490210069 +licenseType: Free +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Prefabs/Uitility/Judge Skipper.prefab b/Assets/Prefabs/Uitility/Judge Skipper.prefab new file mode 100644 index 0000000..b63baab --- /dev/null +++ b/Assets/Prefabs/Uitility/Judge Skipper.prefab @@ -0,0 +1,53 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1001 &100100000 +Prefab: + m_ObjectHideFlags: 1 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 0} + m_Modifications: [] + m_RemovedComponents: [] + m_ParentPrefab: {fileID: 0} + m_RootGameObject: {fileID: 1144213567020578} + m_IsPrefabParent: 1 +--- !u!1 &1144213567020578 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 4801424888420580} + - component: {fileID: 114219897902964800} + m_Layer: 0 + m_Name: Judge Skipper + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &4801424888420580 +Transform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1144213567020578} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: -21.578337, y: -5.9997215, z: -25.738598} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &114219897902964800 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1144213567020578} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 0adad49f4ca2b8d40a8afbb299e8f147, type: 3} + m_Name: + m_EditorClassIdentifier: diff --git a/Assets/Prefabs/Uitility/Judge Skipper.prefab.meta b/Assets/Prefabs/Uitility/Judge Skipper.prefab.meta new file mode 100644 index 0000000..3b66aec --- /dev/null +++ b/Assets/Prefabs/Uitility/Judge Skipper.prefab.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: fd8a9b1031c392d4180b6c9823994718 +timeCreated: 1490210072 +licenseType: Free +NativeFormatImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/Utility/JudgeSkipper.cs b/Assets/Scripts/Utility/JudgeSkipper.cs new file mode 100644 index 0000000..31f8673 --- /dev/null +++ b/Assets/Scripts/Utility/JudgeSkipper.cs @@ -0,0 +1,35 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; + +public class JudgeSkipper : MonoBehaviour +{ + + private SceneSwitch m_SceneSwitch; + + // Use this for initialization + void Start() + { + m_SceneSwitch = GameObject.FindGameObjectWithTag("Scene Loader").GetComponent(); + } + + // Update is called once per frame + void Update() + { + + if (Input.GetButtonDown("Next Level")) + { + m_SceneSwitch.loadScene(m_SceneSwitch.nextSceneName); + } + + if (Input.GetButtonDown("Previous Level")) + { + m_SceneSwitch.loadScene(m_SceneSwitch.previousSceneName); + } + + if (Input.GetButtonDown("Reset Level")) + { + m_SceneSwitch.loadScene(UnityEngine.SceneManagement.SceneManager.GetActiveScene().name); + } + } +} diff --git a/Assets/Scripts/Utility/JudgeSkipper.cs.meta b/Assets/Scripts/Utility/JudgeSkipper.cs.meta new file mode 100644 index 0000000..c082822 --- /dev/null +++ b/Assets/Scripts/Utility/JudgeSkipper.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 0adad49f4ca2b8d40a8afbb299e8f147 +timeCreated: 1490209032 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/ProjectSettings/InputManager.asset b/ProjectSettings/InputManager.asset index ced78c5..8cc873e 100644 --- a/ProjectSettings/InputManager.asset +++ b/ProjectSettings/InputManager.asset @@ -709,3 +709,51 @@ InputManager: type: 0 axis: 0 joyNum: 0 + - serializedVersion: 3 + m_Name: Next Level + descriptiveName: + descriptiveNegativeName: + negativeButton: + positiveButton: + + altNegativeButton: + altPositiveButton: + gravity: 1000 + dead: 0.001 + sensitivity: 1000 + snap: 0 + invert: 0 + type: 0 + axis: 0 + joyNum: 0 + - serializedVersion: 3 + m_Name: Previous Level + descriptiveName: + descriptiveNegativeName: + negativeButton: + positiveButton: '-' + altNegativeButton: + altPositiveButton: + gravity: 1000 + dead: 0.001 + sensitivity: 1000 + snap: 0 + invert: 0 + type: 0 + axis: 0 + joyNum: 0 + - serializedVersion: 3 + m_Name: Reset Level + descriptiveName: + descriptiveNegativeName: + negativeButton: + positiveButton: 0 + altNegativeButton: + altPositiveButton: + gravity: 1000 + dead: 0.001 + sensitivity: 1000 + snap: 0 + invert: 0 + type: 0 + axis: 0 + joyNum: 0 diff --git a/ProjectSettings/TagManager.asset b/ProjectSettings/TagManager.asset index b34ca62..2c1e6fd 100644 --- a/ProjectSettings/TagManager.asset +++ b/ProjectSettings/TagManager.asset @@ -34,6 +34,7 @@ TagManager: - CamWrap - CloneNet - FxTemporaire + - Scene Loader layers: - Default - TransparentFX @@ -67,8 +68,6 @@ TagManager: - - - - - - - m_SortingLayers: - name: UI uniqueID: 2155854549