private async UniTaskVoid Initialize() { Controller.I.AddRpcContainer(this); // Controller.I.OnAppPause += DestroyLobby; await UniTask.DelayFrame(1); var containerRoot = new GameObject("Lobby").transform; new LobbyReferences(); LobbyReferences.I.Canvas = (await Addressables.InstantiateAsync("canvas", containerRoot)) .GetComponent <Transform>(); await FriendsView.Create(); SoundButton.Create(); await PersonalActiveUserView.Create(); await RoomRequester.Create(); await Shop.Create(LobbyReferences.I.Canvas, ItemType.Cardback); await Shop.Create(LobbyReferences.I.Canvas, ItemType.Background); #if HMS IapShop.Create(); #endif Background.I.SetForLobby(); }
public IEnumerator MoneyAid() => UniTask.ToCoroutine(async() => { await LoadEss(); Repository.I = new Repository { PersonalFullInfo = new PersonalFullUserInfo { Money = 11, Name = "Holy Hanaka", Picture = Texture2D.linearGrayTexture, Xp = 5742, MoneyAimTimePassed = null, MoneyAidRequested = 2, } }; Repository.I.PersonalFullInfo.DecreaseMoneyAimTimeLeft().Forget(); Controller.I = new Mock <IController>().Object; LobbyReferences.I = new LobbyReferences { Canvas = canvas }; ProjectReferences.I = new ProjectReferences { Canvas = canvas }; await Toast.Create(); RoomSettings.I = new RoomSettings(0, 0, null, 0); await PersonalActiveUserView.Create(); await UniTask.Delay(int.MaxValue); });