using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; public class HelpTip : MonoBehaviour { public GameObject objImgHelp; public Text txtHelp; public Image imgHelp; private void Start() { // Invoke("SetControl", 0.2f); SetControl(); // StartCoroutine(ImageLoader.LoadImage(CommonData.UIImageFullPath + "Help.png", imgHelp)); } void SetControl() { BaseController.CanControl = false; } public void Close() { } // Update is called once per frame //void Update() //{ // if (Input.GetKeyDown(KeyCode.F2)) // { // objImgHelp.SetActive(!objImgHelp.activeSelf); // // txtHelp.text = objImgHelp.activeSelf ? "请按 F2 或 ESC 关闭此页 | Press F2 or ESC to hide help" : "请按F2打开帮助 | Press F2 for help"; // BaseController.CanControl = !objImgHelp.activeSelf; // } // if (Input.GetKeyDown(KeyCode.Escape)) // { // if (objImgHelp.activeSelf) // { // objImgHelp.SetActive(false); // // txtHelp.text = "请按F2打开帮助 | Press F2 for help"; // BaseController.CanControl = !objImgHelp.activeSelf; // } // } //} }