Example #1
0
 public void InitializePiece(LandContent lc)
 {
     cardPortrait   = lc.cardPortrait;
     name           = lc.name;
     flavor         = lc.flavor;
     gameProperties = lc.gameProperties;
 }
Example #2
0
        public LandContent RandomLand()
        {
            LandContent randomLand = null;

            if (landContentList.Count > 0)
            {
                randomLand = landContentList[Random.Range(0, landContentList.Count)];
                if (randomLand.isUnique)
                {
                    landContentList.Remove(randomLand);
                }
            }

            return(randomLand);
        }
Example #3
0
        public override void Execute(GameData data)
        {
            landContent = landIndex.RandomLand();
            if (landContent != null)
            {
                CardInstance newCard = Instantiate(cardPrefab);
                newCard.transform.SetParent(GameObject.Find("LandPanel").transform);  //Don't like this hard reference.
                newCard.name        = landContent.name;
                newCard.isDraggable = false;

                var land = ScriptableObject.CreateInstance <Land>();
                land.isRevealed = false;
                land.isActive   = false;
                land.InitializePiece(landContent);

                landList.Add(land);
                newCard.GetComponent <CardInstance>().pieceDetails = land;
            }
        }