예제 #1
0
        public async ETVoid RunAsync()
        {
            if (SceneManager.GetActiveScene().name.Equals(SceneType.Battle))
            {
                ETModel.Game.Scene.GetComponent <ResourcesComponent>().UnloadBundle(AssetBundleName.Unit);
            }

            await FUIFactory.Create <LoadingViewComponent>(FUIType.Loading);
        }
예제 #2
0
        public override void Run()
        {
            FUI fui = Game.Scene.GetComponent <FUIComponent>().Get(FUIType.Hall);

            if (fui == null)
            {
                FUIFactory.Create <HallViewComponent>(FUIType.Hall).NoAwait();
            }
        }
예제 #3
0
        protected async ETVoid RunAsync(ETModel.Session session, B2C_BattleEnd message)
        {
            ETModel.Game.Scene.GetComponent <TankComponent>().RemoveAll();

            // 加载Unit资源
            ResourcesComponent resourcesComponent = ETModel.Game.Scene.GetComponent <ResourcesComponent>();

            // 加载场景资源
            await resourcesComponent.LoadBundleAsync("start.unity3d");

            using (SceneChangeComponent sceneChangeComponent = Game.Scene.AddComponent <SceneChangeComponent>())
            {
                await sceneChangeComponent.ChangeSceneAsync(SceneType.Start);
            }

            await FUIFactory.Create <CombatSettlementViewComponent, B2C_BattleEnd>(FUIType.CombatSettlement, message);
        }
예제 #4
0
        private async ETVoid Send_C2G_CreateRoom()
        {
            C2G_CreateRoom msg = new C2G_CreateRoom();

            msg.PeopleNum = this.GetPeopleNum();

            msg.MapId = this.GetMapName();

            msg.BigModel = this.GetBigModel();

            msg.SmallModel = this.GetSmallModel();

            msg.RoomNam = this.GetRoomName();

            G2C_CreateRoom response = (G2C_CreateRoom)await ETModel.SessionComponent.Instance.Session.Call(msg);

            if (response.Error == ErrorCode.ERR_Success)
            {
                await FUIFactory.Create <RoomViewComponent>(FUIType.Room);

                this.OnClose();
            }
        }
예제 #5
0
 /// <summary>
 /// 创建常驻UI
 /// </summary>
 private void CreateConstView()
 {
     FUIFactory.Create <PopMessageViewComponent>(FUIType.PopMessage).NoAwait();
 }
예제 #6
0
 public async ETVoid RunAsync()
 {
     await FUIFactory.Create <LoadingViewComponent>(FUIType.Loading);
 }
예제 #7
0
 public async ETVoid RunAsync()
 {
     // 使用工厂创建一个Login UI
     await FUIFactory.Create <LoginViewComponent>(FUIType.Login);
 }
예제 #8
0
        private void AgainBtn_OnClick()
        {
            FUIFactory.Create <RoomViewComponent>(FUIType.Room).NoAwait();

            this.OnClose();
        }