You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
531 B
25 lines
531 B
3 years ago
|
using System.Collections;
|
||
|
using System.Collections.Generic;
|
||
|
using UnityEngine;
|
||
|
using UnityEngine.UI;
|
||
|
|
||
|
public class CommandInput : MonoBehaviour
|
||
|
{
|
||
|
void Update()
|
||
|
{
|
||
|
if (Input.GetKeyDown(KeyCode.F12))
|
||
|
{
|
||
|
input.gameObject.SetActive(!input.gameObject.activeSelf);
|
||
|
input.ActivateInputField();
|
||
|
}
|
||
|
}
|
||
|
|
||
|
public InputField input;
|
||
|
public void InputEnd()
|
||
|
{
|
||
|
EventManager.Instance.Invoke("IngameCommand", input.text);
|
||
|
|
||
|
input.gameObject.SetActive(false);
|
||
|
}
|
||
|
}
|