HKMBFZ/Assets/Scripts/Szz_Scripts/UIPageBtnEventBase.cs

157 lines
2.6 KiB
C#

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class UIPageBtnEventBase:MonoBehaviour
{
//public ModelBtnManager modelBtnManager;
//将界面上的模型按钮映射到实体键盘输入
private void Update()
{
if (Input.GetKeyDown(KeyCode.F1))
{
OnF1Click();
}
if (Input.GetKeyDown(KeyCode.F2))
{
OnF2Click();
}
if (Input.GetKeyDown(KeyCode.F3))
{
OnF3Click();
}
if (Input.GetKeyDown(KeyCode.F4))
{
OnF4Click();
}
if (Input.GetKeyDown(KeyCode.F5))
{
OnF5Click();
}
if (Input.GetKeyDown(KeyCode.F6))
{
OnF6Click();
}
if (Input.GetKeyDown(KeyCode.F7))
{
OnF7Click();
}
if (Input.GetKeyDown(KeyCode.F8))
{
OnF8Click();
}
if (Input.GetKeyDown(KeyCode.F9))
{
OnF9Click();
}
if (Input.GetKeyDown(KeyCode.F10))
{
OnF10Click();
}
if (Input.GetKeyDown(KeyCode.UpArrow))
{
OnUpArrowClick();
}
if (Input.GetKeyDown(KeyCode.DownArrow))
{
OnDownArrowClick();
}
if (Input.GetKeyDown(KeyCode.LeftArrow))
{
OnLeftArrowClick();
}
if (Input.GetKeyDown(KeyCode.RightArrow))
{
OnRightArrowClick();
}
if (Input.GetKeyDown(KeyCode.KeypadEnter))
{
OnEnterBtnClick();
}
if(Input.GetKeyDown(KeyCode.PageUp))
OnPageUpClick();
if(Input.GetKeyDown(KeyCode.PageDown))
{ OnPageDownClick();}
}
public virtual void OnF1Click()
{
}
public virtual void OnF2Click()
{
}
public virtual void OnF3Click()
{
}
public virtual void OnF4Click()
{
}
public virtual void OnF5Click()
{
}
public virtual void OnF6Click()
{
}
public virtual void OnF7Click()
{
}
public virtual void OnF8Click()
{
}
public virtual void OnF9Click()
{
}
public virtual void OnF10Click()
{
}
public virtual void OnUpArrowClick()
{
}
public virtual void OnDownArrowClick() {
}
public virtual void OnLeftArrowClick() {
}
public virtual void OnRightArrowClick() {
}
public virtual void OnEnterBtnClick()
{
}
public virtual void OnPageUpClick()
{
}
public virtual void OnPageDownClick()
{
}
}