2021-04-08 20:09:59 +08:00
|
|
|
|
|
|
|
|
|
using Cal.DataTable;
|
|
|
|
|
using ET;
|
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
|
|
|
|
|
namespace ET
|
|
|
|
|
{
|
|
|
|
|
public class LeftTransPointUIAwakeSyatem : AwakeSystem<LeftTransPointUI>
|
|
|
|
|
{
|
|
|
|
|
public override void Awake(LeftTransPointUI self)
|
|
|
|
|
{
|
|
|
|
|
self.Awake();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
public class LeftTransPointUIDestroySyatem : DestroySystem<LeftTransPointUI>
|
|
|
|
|
{
|
|
|
|
|
public override void Destroy(LeftTransPointUI self)
|
|
|
|
|
{
|
|
|
|
|
self.Destroy();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
public class LeftTransPointUI : Entity
|
|
|
|
|
{
|
|
|
|
|
public FUI_LeftTransPointUI ui;
|
2021-04-20 00:25:04 +08:00
|
|
|
|
private Scene zoneScene;
|
|
|
|
|
|
2021-04-08 20:09:59 +08:00
|
|
|
|
public void Awake()
|
|
|
|
|
{
|
2021-04-20 00:25:04 +08:00
|
|
|
|
zoneScene = this.ZoneScene();
|
2021-04-08 20:09:59 +08:00
|
|
|
|
ui = GetParent<FUI_LeftTransPointUI>();
|
|
|
|
|
AwakeAsync().Coroutine();
|
|
|
|
|
}
|
|
|
|
|
private async ETVoid AwakeAsync()
|
|
|
|
|
{
|
2021-04-11 19:50:39 +08:00
|
|
|
|
GWindow window = ui.GetComponent<FUIWindowComponent>().Window;
|
2021-04-08 20:09:59 +08:00
|
|
|
|
ui.m_btn1.onClick.Set1(async context =>
|
|
|
|
|
{
|
|
|
|
|
if (context.inputEvent.isDoubleClick)
|
|
|
|
|
{
|
2021-04-20 00:25:04 +08:00
|
|
|
|
M2C_RequestEnterMap m2C_RequestEnterMap = (M2C_RequestEnterMap)await zoneScene.GetComponent<SessionComponent>().Session.Call(new C2M_RequestEnterMap() { MapId = Cal.DataTable.Sys_SceneId.Scene_MarvellousSquare * 100 + 1 });
|
2021-04-08 20:09:59 +08:00
|
|
|
|
if (m2C_RequestEnterMap.Message.IsNullOrEmpty())
|
|
|
|
|
{
|
|
|
|
|
window.Hide();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
ui.m_txtName.text = "美丽的奇妙广场";
|
|
|
|
|
});
|
|
|
|
|
ui.m_btn2.onClick.Set1(async context =>
|
|
|
|
|
{
|
|
|
|
|
if (context.inputEvent.isDoubleClick)
|
|
|
|
|
{
|
2021-04-20 00:25:04 +08:00
|
|
|
|
M2C_RequestEnterMap m2C_RequestEnterMap = (M2C_RequestEnterMap)await zoneScene.GetComponent<SessionComponent>().Session.Call(new C2M_RequestEnterMap() { MapId = Cal.DataTable.Sys_SceneId.Scene_Beach * 100 + 1 });
|
2021-04-08 20:09:59 +08:00
|
|
|
|
if (m2C_RequestEnterMap.Message.IsNullOrEmpty())
|
|
|
|
|
{
|
|
|
|
|
window.Hide();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
ui.m_txtName.text = "凉爽的比基尼海滩";
|
|
|
|
|
});
|
|
|
|
|
ui.m_btn3.onClick.Set1(async context =>
|
|
|
|
|
{
|
|
|
|
|
if (context.inputEvent.isDoubleClick)
|
|
|
|
|
{
|
2021-04-20 00:25:04 +08:00
|
|
|
|
M2C_RequestEnterMap m2C_RequestEnterMap = (M2C_RequestEnterMap)await zoneScene.GetComponent<SessionComponent>().Session.Call(new C2M_RequestEnterMap() { MapId = Cal.DataTable.Sys_SceneId.Scene_HonorTemple * 100 + 1 });
|
2021-04-08 20:09:59 +08:00
|
|
|
|
if (m2C_RequestEnterMap.Message.IsNullOrEmpty())
|
|
|
|
|
{
|
|
|
|
|
window.Hide();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
ui.m_txtName.text = "庄严的荣誉圣殿";
|
|
|
|
|
});
|
|
|
|
|
ui.m_btn4.onClick.Set1(async context =>
|
|
|
|
|
{
|
|
|
|
|
if (context.inputEvent.isDoubleClick)
|
|
|
|
|
{
|
2021-04-20 00:25:04 +08:00
|
|
|
|
M2C_RequestEnterMap m2C_RequestEnterMap = (M2C_RequestEnterMap)await zoneScene.GetComponent<SessionComponent>().Session.Call(new C2M_RequestEnterMap() { MapId = Cal.DataTable.Sys_SceneId.Scene_GuardianPark * 100 + 1 });
|
2021-04-08 20:09:59 +08:00
|
|
|
|
if (m2C_RequestEnterMap.Message.IsNullOrEmpty())
|
|
|
|
|
{
|
|
|
|
|
window.Hide();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
ui.m_txtName.text = "快乐的守护乐园";
|
|
|
|
|
});
|
|
|
|
|
await ETTask.CompletedTask;
|
|
|
|
|
}
|
|
|
|
|
public void Destroy()
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|