Exemplo n.º 1
0
    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;
    }
Exemplo n.º 2
0
    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;
    }