Beispiel #1
0
    private void LoadOpponentCards(PlayerBoardData data)
    {
        LoadCards(data, _opponentBoardView);
        SpawnCards(_opponentBoardView.PlayedEffectsContainer, data.PlayedEffects);

        _opponentBoardView.PlayedEffectsContainer.gameObject.SetActive(data.PlayedEffects.Count > 0);
    }
Beispiel #2
0
    private void LoadPlayerCards(PlayerBoardData data)
    {
        LoadCards(data, _playerBoardView);
        SpawnCards(_playerBoardView.HandContainer, data.Hand);
        SpawnCards(_playerBoardView.ArchiveContainer, data.Archive);
        SpawnCards(_playerBoardView.DeckContainer, data.Deck);

        _playerBoardView.HandContainer.gameObject.SetActive(data.Hand.Count > 0);
        _playerBoardView.ArchiveContainer.gameObject.SetActive(data.Archive.Count > 0);
        _playerBoardView.DeckContainer.gameObject.SetActive(data.Deck.Count > 0);
    }
Beispiel #3
0
    private void GeneratePuzzelData()
    {
        var descriptionData = new DescriptionData()
        {
            Number = _number, Title = _tittle, Description = _description
        };
        var playerJson = JsonConvert.SerializeObject(_playerData, Formatting.Indented, new JsonSerializerSettings {
            DefaultValueHandling = DefaultValueHandling.Ignore
        });
        PlayerBoardData playerData    = JsonConvert.DeserializeObject <PlayerBoardData>(playerJson);
        var             oppponentJson = JsonConvert.SerializeObject(_opponentData, Formatting.Indented, new JsonSerializerSettings {
            DefaultValueHandling = DefaultValueHandling.Ignore
        });
        PlayerBoardData opponentData = JsonConvert.DeserializeObject <PlayerBoardData>(oppponentJson);

        _puzzelData = new PuzzelData()
        {
            DescriptionData = descriptionData, PlayerData = playerData, OponnentData = opponentData
        };
    }
Beispiel #4
0
 public void InitPlayerView(PlayerBoardData data, Sprite[] houses)
 {
     _playerBoardView.SetHouses(houses);
 }
Beispiel #5
0
 public virtual void Init(PlayerBoardData data, Sprite[] houseIcons)
 {
     Clear();
     SetHouses(houseIcons);
     SetKeys(data.ForgedKeys, data.Amber);
 }
Beispiel #6
0
 private void LoadCards(PlayerBoardData data, BaseBoardView view)
 {
     _cardBuilder.Init(data.Expansion, _language);
     SpawnCards(view.CreaturesContainer, data.PlayedCreatures);
     SpawnCards(view.ArtefactsContainer, data.PlayedArtifacts);
 }