HAARFTE/Assets/DemoGame/GameScript/Hotfix/Procedure/Logic/基本资料填写Procedure.cs

198 lines
8.7 KiB
C#

using System;
using Cysharp.Threading.Tasks;
using Unity.Loader;
using UnityEngine;
using UnityEngine.EventSystems;
using UnityEngine.SceneManagement;
using Object = UnityEngine.Object;
namespace ZC
{
[Procedure(ProcedureType.基本资料填写Procedure)]
class Procedure : ProcedureBase
{
GameObject go;
SceneGameObjectBinding binding;
public override void OnEnter()
{
base.OnEnter();
ResourcesLocalComponent.Instance.LoadScene(AssetConst.Assets_DemoGame_GameRes_Scene_LiaoTianScene_unity);
CommonHelper.GetSceneBindingAsync((bind) =>
{
this.binding = bind;
binding = GameObject.FindObjectOfType<SceneGameObjectBinding>();
go = binding.GetValue("老人");
go.OpenHighlight();
go.AddEventTrigger(EventTriggerType.PointerClick, ClickHiglight);
}).Forget();
}
private void ClickHiglight(BaseEventData arg0)
{
go.CloseHighlight();
go.RemoveEventTrigger();
var basicInformationUI = (BasicInformationUI)Global.UIManager.ShowUI(UIType.BasicInformationUI);
basicInformationUI.SetData(BasicInformationUI_TianXie, BasicInformationUI_Callback);
}
void TiWen(string tiWenContent, string huiDaContent)
{
var dialogueUI = (DialogueUI)Global.UIManager.ShowUI(UIType.DialogueUI);
dialogueUI.SetData(tiWenContent, () =>
{
Global.UIManager.HideUI(UIType.DialogueUI);
HuiDa(huiDaContent);
});
}
void HuiDa(string huiDaContent)
{
var dialogueUI = (DialogueUI)Global.UIManager.ShowUI(UIType.DialogueUI);
dialogueUI.SetData(huiDaContent, () => { Global.UIManager.HideUI(UIType.DialogueUI); });
}
private void BasicInformationUI_TianXie(BasicInformationUIActionType obj)
{
switch (obj)
{
case BasicInformationUIActionType.:
TiWen(ConstStr., ConstStr.);
break;
case BasicInformationUIActionType.:
TiWen(ConstStr., ConstStr.);
break;
case BasicInformationUIActionType.:
TiWen(ConstStr., ConstStr.);
break;
case BasicInformationUIActionType.:
TiWen(ConstStr., ConstStr.);
break;
case BasicInformationUIActionType.:
TiWen(ConstStr., ConstStr.);
break;
case BasicInformationUIActionType.:
TiWen(ConstStr., ConstStr.);
break;
case BasicInformationUIActionType.:
TiWen(ConstStr., ConstStr.);
break;
case BasicInformationUIActionType.:
TiWen(ConstStr., ConstStr.);
break;
case BasicInformationUIActionType.:
TiWen(ConstStr., ConstStr.);
break;
case BasicInformationUIActionType.:
TiWen(ConstStr., ConstStr.);
break;
case BasicInformationUIActionType.:
TiWen(ConstStr., ConstStr.);
break;
case BasicInformationUIActionType.:
TiWen(ConstStr., ConstStr.);
break;
case BasicInformationUIActionType.:
TiWen(ConstStr., ConstStr.);
break;
case BasicInformationUIActionType.:
TiWen(ConstStr., ConstStr.);
break;
case BasicInformationUIActionType.:
TiWen(ConstStr., ConstStr.);
break;
case BasicInformationUIActionType.:
TiWen(ConstStr., ConstStr.);
break;
case BasicInformationUIActionType.穿:
TiWen(ConstStr.穿, ConstStr.穿);
break;
case BasicInformationUIActionType.:
TiWen(ConstStr., ConstStr.);
break;
case BasicInformationUIActionType.:
TiWen(ConstStr., ConstStr.);
break;
case BasicInformationUIActionType.:
TiWen(ConstStr., ConstStr.);
break;
case BasicInformationUIActionType.退:
TiWen(ConstStr.退, ConstStr.退);
break;
case BasicInformationUIActionType.:
TiWen(ConstStr., ConstStr.);
break;
case BasicInformationUIActionType.:
TiWen(ConstStr., ConstStr.);
break;
case BasicInformationUIActionType.:
TiWen(ConstStr., ConstStr.);
break;
case BasicInformationUIActionType.:
TiWen(ConstStr., ConstStr.);
break;
case BasicInformationUIActionType.:
TiWen(ConstStr., ConstStr.);
break;
case BasicInformationUIActionType.:
TiWen(ConstStr., ConstStr.);
break;
case BasicInformationUIActionType.:
TiWen(ConstStr., ConstStr.);
break;
case BasicInformationUIActionType.:
TiWen(ConstStr., ConstStr.);
break;
case BasicInformationUIActionType.:
TiWen(ConstStr., ConstStr.);
break;
case BasicInformationUIActionType.:
TiWen(ConstStr., ConstStr.);
break;
case BasicInformationUIActionType.:
TiWen(ConstStr., ConstStr.);
break;
default:
throw new ArgumentOutOfRangeException(nameof(obj), obj, null);
}
}
private void BasicInformationUI_Callback()
{
var introduceUI = (IntroduceUI)Global.UIManager.ShowUI(UIType.IntroduceUI);
introduceUI.SetData(ConstStr., ConstStr., IntroduceUI_Callback);
}
private void IntroduceUI_Callback()
{
Global.UIManager.HideUI(UIType.DialogueUI);
Global.UIManager.HideUI(UIType.IntroduceUI);
Global.UIManager.HideUI(UIType.BasicInformationUI);
Global.ProcedureManager.ChangeProcedure(ProcedureType.Procedure);
}
}
}