public void ClearStage() { if (currentLevel == PlayerClearStage) { PlayerClearStage++; } player.gameObject.SetActive(false); VictoryView victoryViewPanel = Instantiate(victoryView).GetComponent <VictoryView>(); victoryViewPanel.GetInfo(player.currentMoney, 3, PlayerClearStage - 1); SoundManager.instance.PlaySE(Constant.win); player.currentMoney += currentLevel * 10; CallSave(true); }
private async void GamePage_PropertyChanged(object sender, System.ComponentModel.PropertyChangedEventArgs e) { if (e.PropertyName == nameof(GameViewModel.Progress)) { AdjustTemp(((GameViewModel)BindingContext).Progress); } else if (e.PropertyName == nameof(GameViewModel.VictoryMode)) { bool state = ((GameViewModel)BindingContext).VictoryMode; Shell.Current.FlyoutBehavior = state ? FlyoutBehavior.Disabled : FlyoutBehavior.Flyout; if (state) { OldImage.Opacity = 1; HamburgerButton.FadeTo(0, 800u, Easing.CubicOut); await BottomSheet.TranslateTo(0, Height, 800u, Easing.CubicOut); Darkener.FadeTo(0.4); VictoryView.FadeTo(1); } else { Darkener.FadeTo(0); await VictoryView.FadeTo(0); await OldImage.FadeTo(0, easing : Easing.CubicIn); await Task.Delay(250); HamburgerButton.FadeTo(0.85); await BottomSheet.TranslateTo(0, positions[1], 350u, Easing.CubicOut); } } else if (e.PropertyName == nameof(GameViewModel.IsDone)) { if (((GameViewModel)BindingContext).IsDone) { TempFinisher.FadeTo(1); } else { TempFinisher.FadeTo(0); } } }
public void ShowVictory() { _victoryView = new VictoryView(); _victoryView.showVictory(); }