Ejemplo n.º 1
0
 public void InitializePiece(LandContent lc)
 {
     cardPortrait   = lc.cardPortrait;
     name           = lc.name;
     flavor         = lc.flavor;
     gameProperties = lc.gameProperties;
 }
Ejemplo n.º 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);
        }
Ejemplo n.º 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;
            }
        }