Add Terminal Singleton
This commit is contained in:
parent
6f58503c35
commit
bb73229cc1
@ -31,7 +31,9 @@ namespace NeonTea.Quakeball.Interface {
|
|||||||
public static string INFO_COLOR = "#FE8";
|
public static string INFO_COLOR = "#FE8";
|
||||||
public static string ERROR_COLOR = "#F33";
|
public static string ERROR_COLOR = "#F33";
|
||||||
|
|
||||||
void Start() {
|
public static Terminal Singleton => GameObject.FindGameObjectWithTag("Terminal").GetComponent<Terminal>();
|
||||||
|
|
||||||
|
private void Start() {
|
||||||
ToggleTerminalAction = new InputAction("Toggle Terminal", binding: "<Keyboard>/backquote");
|
ToggleTerminalAction = new InputAction("Toggle Terminal", binding: "<Keyboard>/backquote");
|
||||||
ToggleTerminalAction.Enable();
|
ToggleTerminalAction.Enable();
|
||||||
ToggleTerminalAction.performed += ToggleTerminal;
|
ToggleTerminalAction.performed += ToggleTerminal;
|
||||||
@ -71,7 +73,7 @@ namespace NeonTea.Quakeball.Interface {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void Update() {
|
private void Update() {
|
||||||
Vector3 pos = TerminalPanel.anchoredPosition;
|
Vector3 pos = TerminalPanel.anchoredPosition;
|
||||||
pos.y = Mathf.Lerp(pos.y, DesiredTerminalPos, Time.deltaTime * 10);
|
pos.y = Mathf.Lerp(pos.y, DesiredTerminalPos, Time.deltaTime * 10);
|
||||||
TerminalPanel.anchoredPosition = pos;
|
TerminalPanel.anchoredPosition = pos;
|
||||||
|
Loading…
Reference in New Issue
Block a user