Commit 2fe8c048 authored by Pinguin's avatar Pinguin
Browse files
parents 522ad7e8 053e2ef4
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class BackButton : MonoBehaviour
{
private void OnEnable()
{
Menu.RegisterBackButton(GetComponent<Button>());
}
private void OnDisable()
{
Menu.DeRegisterBackButton(GetComponent<Button>());
}
}
fileFormatVersion: 2
guid: cf9be0fa6526b3c4cbfdd49ebe26b6f9
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Menulamp : MonoBehaviour
{
public Material lit, unlit;
public GameObject light, lightsmall;
public MeshRenderer lamp;
public void SetMode(bool on)
{
var mats = lamp.materials;
mats[1] = on ? lit : unlit;
lamp.materials = mats;
light.SetActive(on);
lightsmall.SetActive(on);
}
}
fileFormatVersion: 2
guid: b296491226e24df4e80961335fbe0366
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -8,18 +8,15 @@ public class TextColorSwap : MonoBehaviour
public Color regular, selected;
TextMeshProUGUI text;
void Start()
{
text = GetComponent<TextMeshProUGUI>();
}
public void Select()
{
text = GetComponent<TextMeshProUGUI>();
text.color = selected;
}
public void DeSelect()
{
text = GetComponent<TextMeshProUGUI>();
text.color = regular;
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment