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.
36 lines
828 B
36 lines
828 B
using System.Collections; |
|
using System.Collections.Generic; |
|
using UnityEngine; |
|
using UnityEngine.UI; |
|
|
|
public class PlanUIInteractableCtrl : MonoBehaviour { |
|
|
|
// Use this for initialization |
|
void Start () { |
|
UIInteractable(); |
|
} |
|
|
|
/// <summary> |
|
/// 控制UI能否响应输入 |
|
/// </summary> |
|
private void UIInteractable() |
|
{ |
|
//控制 InputField 可否接收输入 |
|
if (GetComponent<InputField>()) |
|
{ |
|
if (ModeHelper.Mode == Mode.None) |
|
{ |
|
GetComponent<InputField>().interactable = true; |
|
} |
|
if (ModeHelper.Mode == Mode.MobileCommunication) |
|
{ |
|
GetComponent<InputField>().interactable = false; |
|
} |
|
} |
|
} |
|
|
|
// Update is called once per frame |
|
void Update () { |
|
|
|
} |
|
}
|
|
|