public void SetCard(LineManager.CardIndexer cardIndexer, CardManager.Direction direction, GameObject uiBlock) { this.cardIndexer = cardIndexer; this.direction = direction; this.uiBlock = uiBlock; uiTextMesh = uiBlock.GetComponentInChildren <TextMeshProUGUI>(); //Format text to fit a sentence CardData card = cardIndexer.Card; name = card.From + "-->" + card.To; }
public void SetCard(LineManager.CardIndexer cardIndexer, CardManager.Direction direction) { this.cardIndexer = cardIndexer; this.direction = direction; CardData card = cardIndexer.Card; name = card.From + "-->" + card.To; //TEMPORARY setting location to somewhere random; CreateHomeLocation(); Vector3 randomSpot = new Vector3(UnityEngine.Random.Range(SpawnRangeX.x, SpawnRangeX.y), UnityEngine.Random.Range(SpawnRangeY.x, SpawnRangeY.y)); HomeLocation.transform.position += randomSpot; }