From cf4e9fd0921ac56764dc19a9666aed74e7651e75 Mon Sep 17 00:00:00 2001 From: Stefano Pigozzi Date: Mon, 7 Oct 2019 00:45:52 +0200 Subject: [PATCH] Add TempUpgradesToggler --- Assets/Components/TempUpgradesToggler.cs | 15 +++++++++++++++ Assets/Components/TempUpgradesToggler.cs.meta | 11 +++++++++++ Assets/Prefabs/GameController.prefab | 14 ++++++++++++++ 3 files changed, 40 insertions(+) create mode 100644 Assets/Components/TempUpgradesToggler.cs create mode 100644 Assets/Components/TempUpgradesToggler.cs.meta diff --git a/Assets/Components/TempUpgradesToggler.cs b/Assets/Components/TempUpgradesToggler.cs new file mode 100644 index 0000000..de526de --- /dev/null +++ b/Assets/Components/TempUpgradesToggler.cs @@ -0,0 +1,15 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; + +public class TempUpgradesToggler : MonoBehaviour +{ + public GameObject upgrades; + + void Update() + { + if(Input.GetKeyDown(KeyCode.P)) { + upgrades.SetActive(!upgrades.activeSelf); + } + } +} diff --git a/Assets/Components/TempUpgradesToggler.cs.meta b/Assets/Components/TempUpgradesToggler.cs.meta new file mode 100644 index 0000000..139838b --- /dev/null +++ b/Assets/Components/TempUpgradesToggler.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 417c5b9357424244781a5ac6c548630c +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Prefabs/GameController.prefab b/Assets/Prefabs/GameController.prefab index d81e1cb..361c6fe 100644 --- a/Assets/Prefabs/GameController.prefab +++ b/Assets/Prefabs/GameController.prefab @@ -265,6 +265,7 @@ GameObject: - component: {fileID: 9012813807232547518} - component: {fileID: 4937878819460165300} - component: {fileID: 1086337020} + - component: {fileID: 6405160859608101276} m_Layer: 0 m_Name: GameController m_TagString: GameController @@ -526,6 +527,19 @@ MonoBehaviour: layers: - {fileID: 4850948939192426854} - {fileID: 1636788351} +--- !u!114 &6405160859608101276 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4669070901862137127} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 417c5b9357424244781a5ac6c548630c, type: 3} + m_Name: + m_EditorClassIdentifier: + upgrades: {fileID: 0} --- !u!1 &7887871963136015922 GameObject: m_ObjectHideFlags: 0