75 lines
1.9 KiB
C#
75 lines
1.9 KiB
C#
using System.Collections;
|
||
using System.Collections.Generic;
|
||
using UnityEngine;
|
||
|
||
public class SheJiControl : UIPageBtnEventBase
|
||
{
|
||
public GameObject 单炮修正;
|
||
public GameObject 变更诸元;
|
||
public GameObject currectPage;
|
||
//public SheJiXiuZhengPage sheJiXiuZheng;
|
||
//public ZhuYuanFangShiPage zhuYuanFangShi;
|
||
//public ZuoBiaoFangShiPage zuoBiaoFangShiPage;
|
||
//public GameObject backPage;
|
||
//public string backName;
|
||
public MonoBehaviour mono;
|
||
|
||
private void OnEnable()
|
||
{
|
||
currectPage = null;
|
||
//只要弹出射击控制界面则一定出现调炮画面
|
||
AnimationModel.instance.Show181Tween();
|
||
mono.enabled = false;
|
||
//sheJiXiuZheng = FindObjectOfType<SheJiXiuZhengPage>();
|
||
//sheJiXiuZheng.enabled = false;
|
||
}
|
||
|
||
private void OnDisable()
|
||
{
|
||
//sheJiXiuZheng.enabled = true;
|
||
mono.enabled = true;
|
||
}
|
||
|
||
public override void OnF1Click()
|
||
{
|
||
base.OnF1Click();
|
||
if (currectPage != null) //如果当前界面已经有子界面打开
|
||
{
|
||
//则F1调炮,并关闭子界面
|
||
AnimationModel.instance.Show181Tween();
|
||
currectPage.SetActive(false);
|
||
currectPage = null;
|
||
return;
|
||
}
|
||
变更诸元.SetActive(true);
|
||
单炮修正.SetActive(false);
|
||
currectPage = 变更诸元;
|
||
}
|
||
|
||
public override void OnF3Click()
|
||
{
|
||
base.OnF3Click();
|
||
单炮修正.SetActive(true);
|
||
变更诸元.SetActive(false);
|
||
currectPage = 单炮修正;
|
||
}
|
||
|
||
public override void OnF4Click()
|
||
{
|
||
base.OnF4Click();
|
||
if (currectPage != null)
|
||
{
|
||
currectPage.SetActive(false);
|
||
currectPage = null;
|
||
return;
|
||
}
|
||
//backPage.SetActive(true);
|
||
//sheJiXiuZheng.currectName = backName;
|
||
//gameObject.SetActive(false);
|
||
Destroy(gameObject);
|
||
Debug.Log("返回");
|
||
|
||
|
||
}
|
||
}
|