Exemplo n.º 1
0
        protected async Task LoadGame()
        {
            LoadGame _loadGame = new LoadGame();

            Player.LastName = await _loadGame.GetName();

            Player.Money = await _loadGame.GetMoney();

            Player.Energy = await _loadGame.GetEnergy();

            MessagingCenter.Send <BornToRace.App, string>((BornToRace.App)Xamarin.Forms.Application.Current, Events.PlayerNameChanged, Player.LastName);
            MessagingCenter.Send <BornToRace.App, double>((BornToRace.App)Xamarin.Forms.Application.Current, Events.PlayerMoneyChanged, Player.Money);
            MessagingCenter.Send <BornToRace.App, int>((BornToRace.App)Xamarin.Forms.Application.Current, Events.PlayerEnergyChanged, Player.Energy);
            if (Player.LastName != "NA")
            {
                WelcomeMessage.IsVisible = false;
                NewGame.IsVisible        = false;
            }
        }