Example #1
0
        public async void Show(Tile _tile)
        {
            tile = _tile;
            town = await townRest.GetTown(_tile.town_id, playerInfo.GetAccesToken());

            townName.text = town.name + "\n" + town.username;

            UI.SetActive(true);
        }
Example #2
0
        private async void GetTown()
        {
            List <Map> maps = await mapRest.GetAllTowns();

            foreach (Map map in maps)
            {
                town = await townRest.GetTown(map.id, player.AuthenticationToken);

                if (town.username == player.Username)
                {
                    playerInfo.UpdateTown(town);
                    EventManager.BuildingImageUpdate();
                    EventManager.ResourceUpdate();
                    break;
                }
            }
        }
Example #3
0
 public void UpdateTown(PlayerTown town)
 {
     currrentTown = town;
 }