public void UpdateTimer(UpdateEvent e, DialogNode dialog, [JoinAll] HomeScreenNode homeScreen, [JoinAll] SelfUserWithReservNode user) { int time = (int)(user.reservedInBattleInfo.ExitTime - Date.Now); if (dialog.returnToBattleDialog.SecondsLeft != time) { dialog.returnToBattleDialog.SecondsLeft = time; dialog.modalConfirmWindow.MainText = this.InsertLeftTime(dialog.returnToBattleDialog.PreformatedMainText, time); if (dialog.returnToBattleDialog.SecondsLeft <= 0) { dialog.modalConfirmWindow.Hide(); base.ScheduleEvent <ReleaseReservationInBattleEvent>(user); } } }
public void PlayAmbientSoundEffect(NodeAddedEvent evt, ReadySilentAmbientSoundNode soundListener, HomeScreenNode screen) { base.NewEvent(new BeforeLobbyAmbientSoundPlayEvent(true)).Attach(soundListener).ScheduleDelayed(soundListener.soundListener.DelayForLobbyState); }
public void SwitchToHymmSnapshot(NodeAddedEvent evt, HomeScreenNode screen, [JoinAll] ReadyNonSilentAmbientSoundNode listener) { this.SwitchMusicMixerToSnapshot(listener.soundListenerResources.Resources.MusicMixerSnapshots[listener.soundListenerMusicSnapshots.HymnLoopSnapshot], listener.soundListenerMusicTransitions.MusicTransitionSec, listener); }
public void PrepareNotificationText(NodeAddedEvent e, SingleNode <EmailConfirmationNotificationComponent> notification, [JoinAll] HomeScreenNode activeScreen, [JoinAll] SingleNode <SelfUserComponent> selfUser) { if (this.emailIsEmpty(selfUser.Entity)) { notification.Entity.AddComponent(new NotificationMessageComponent(notification.component.ChangeEmailMessageTemplate)); } else { notification.Entity.AddComponent(new NotificationMessageComponent(notification.component.ConfirmationMessageTemplate)); } }
public void TryShowReturnToBattleDialog(NodeAddedEvent e, HomeScreenNode homeScreen, [JoinAll] SelfUserWithReservNode user) { base.NewEvent <TryShowDialog>().Attach(user).ScheduleDelayed(0.05f); }
public void ShowReturnToBattleDialog(TryShowDialog e, SelfUserWithReservNode user, [JoinAll] HomeScreenNode homeScreen, [JoinAll] SingleNode <Dialogs60Component> dialogs) { if (!Flow.Current.EntityRegistry.ContainsEntity(user.reservedInBattleInfo.Map)) { base.Log.ErrorFormat("map={0} not found on reservation in battle for user={1}", user.reservedInBattleInfo.Map, user); } else if (!TutorialCanvas.Instance.IsShow) { string name = Flow.Current.EntityRegistry.GetEntity(user.reservedInBattleInfo.Map).GetComponent <DescriptionItemComponent>().Name; ReturnToBattleDialogComponent component = dialogs.component.Get <ReturnToBattleDialogComponent>(); ModalConfirmWindowComponent component2 = component.gameObject.GetComponent <ModalConfirmWindowComponent>(); component2.Show(homeScreen.Entity); component.PreformatedMainText = string.Format(component2.MainText, name, user.reservedInBattleInfo.BattleMode); component2.MainText = this.InsertLeftTime(component.PreformatedMainText, (int)(user.reservedInBattleInfo.ExitTime - Date.Now)); } }
public void HideReturnToBattleDialog(NodeRemoveEvent e, SelfUserWithReservNode user, [JoinAll] DialogNode dialog, [JoinAll] HomeScreenNode homeScreen) { dialog.modalConfirmWindow.Hide(); }