From 7664e645d1e9c2d1087af03167923523635b9c84 Mon Sep 17 00:00:00 2001 From: "antoine.mcnabb" Date: Sun, 31 Jan 2016 10:26:14 -0500 Subject: [PATCH] GUI de gameplay --- Assets/prefabs/GUIManager.prefab | 52 ++++++++++++++++++++ Assets/prefabs/GUIManager.prefab.meta | 8 +++ Assets/scripts/GUIGameplay.cs | 70 +++++++++++++++++++++++++++ Assets/scripts/GUIGameplay.cs.meta | 12 +++++ 4 files changed, 142 insertions(+) create mode 100644 Assets/prefabs/GUIManager.prefab create mode 100644 Assets/prefabs/GUIManager.prefab.meta create mode 100644 Assets/scripts/GUIGameplay.cs create mode 100644 Assets/scripts/GUIGameplay.cs.meta diff --git a/Assets/prefabs/GUIManager.prefab b/Assets/prefabs/GUIManager.prefab new file mode 100644 index 0000000..fdac786 --- /dev/null +++ b/Assets/prefabs/GUIManager.prefab @@ -0,0 +1,52 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1 &155010 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 4 + m_Component: + - 4: {fileID: 401702} + - 114: {fileID: 11451600} + m_Layer: 0 + m_Name: GUIManager + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &401702 +Transform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 155010} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 227.282471, y: 81.0362015, z: -10} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 0 +--- !u!114 &11451600 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 155010} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: f64ee281a9baddc40a746420c5bb884f, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !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: 155010} + m_IsPrefabParent: 1 diff --git a/Assets/prefabs/GUIManager.prefab.meta b/Assets/prefabs/GUIManager.prefab.meta new file mode 100644 index 0000000..90aff80 --- /dev/null +++ b/Assets/prefabs/GUIManager.prefab.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 10be2fb46e4285942b2957ae293fd714 +timeCreated: 1454247986 +licenseType: Free +NativeFormatImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/scripts/GUIGameplay.cs b/Assets/scripts/GUIGameplay.cs new file mode 100644 index 0000000..b3f0c97 --- /dev/null +++ b/Assets/scripts/GUIGameplay.cs @@ -0,0 +1,70 @@ +using UnityEngine; +using System.Collections; + +public class GUIGameplay : MonoBehaviour { + + // Use this for initialization + void Start () { + + } + + // Update is called once per frame + void Update () { + + } + void OnGUI() + { + + // Make the first button. If it is pressed, Application.Loadlevel (1) will be executed + for(int i = 0; i("runic_" + (char)('a' + character)); + // Debug.Log(p.score); + if (j+1 > p.index) + { + + temp = GUI.color ; + GUI.color = new Color(1f, 1f, 1f, 0.50f); + GUI.DrawTexture(new Rect(20 + Screen.width / 3 * i + j * 30 + 20, 40, 30, 30), rune); + GUI.color = temp; + + } + else + { + GUI.DrawTexture(new Rect(20 + Screen.width / 3 * i + j * 30 + 20, 40, 30, 30), rune); + } + + + } + } + + } +} diff --git a/Assets/scripts/GUIGameplay.cs.meta b/Assets/scripts/GUIGameplay.cs.meta new file mode 100644 index 0000000..90930c7 --- /dev/null +++ b/Assets/scripts/GUIGameplay.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: f64ee281a9baddc40a746420c5bb884f +timeCreated: 1454244894 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: