mirror of
https://github.com/Leahnaya/TheKingsRace.git
synced 2026-09-09 02:45:17 -05:00
king lobby stubbed & fixed clipping issue
This commit is contained in:
29
Assets/Scripts/UI/Lobby/LobbySwap.cs
Normal file
29
Assets/Scripts/UI/Lobby/LobbySwap.cs
Normal file
@@ -0,0 +1,29 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
public class LobbySwap : MonoBehaviour
|
||||
{
|
||||
GameObject playerLobby;
|
||||
GameObject kingLobby;
|
||||
|
||||
// Start is called before the first frame update
|
||||
void Start()
|
||||
{
|
||||
playerLobby = GameObject.Find("PlayerLobby");
|
||||
kingLobby = GameObject.Find("KingLobby");
|
||||
|
||||
kingLobby.SetActive(false);
|
||||
}
|
||||
|
||||
public void SwapLobby(){
|
||||
if(playerLobby.active){
|
||||
kingLobby.SetActive(true);
|
||||
playerLobby.SetActive(false);
|
||||
}
|
||||
else{
|
||||
playerLobby.SetActive(true);
|
||||
kingLobby.SetActive(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
11
Assets/Scripts/UI/Lobby/LobbySwap.cs.meta
Normal file
11
Assets/Scripts/UI/Lobby/LobbySwap.cs.meta
Normal file
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e0ba335dd24406440bdb8aefabd610b1
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -14,11 +14,11 @@ public class Tooltip : MonoBehaviour
|
||||
}
|
||||
|
||||
public void ShowTooltip(string curTooltip){
|
||||
gameObject.SetActive(true);
|
||||
this.gameObject.SetActive(true);
|
||||
tooltipText.text = curTooltip;
|
||||
}
|
||||
|
||||
public void HideTooltip(){
|
||||
gameObject.SetActive(false);
|
||||
this.gameObject.SetActive(false);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user