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