Esempio n. 1
0
    public void SetPart(SpellPartType type, SpellPart spell)
    {
        //Check if spell able to be set

        //

        setPart(type, spell);
    }
Esempio n. 2
0
 private void setPart(SpellPartType type, SpellPart spell)
 {
     if (!Parts.ContainsKey(type))
     {
         Parts.Add(type, spell);
     }
     else
     {
         Parts[type] = spell;
     }
     //displ spell icon
     transform.GetChild((int)type).GetComponent <SpriteRenderer>().sprite = Parts[type].Sprite;
 }
Esempio n. 3
0
    public void CreateCard(int index, Sprite sprite, ULess.Card card, SpellPartType type = SpellPartType.first)
    {
        CardItems[index] = new SpellPart(sprite, card, type: type);
        var cardObj = new GameObject();

        cardObj.transform.parent = GameFolders.Cards.transform;
        cardObj.name             = $"Card{index}";
        var tempPosition = transform.position;

        tempPosition.x            += (index * 1.5f);
        cardObj.transform.position = tempPosition;
        var cardObjCardComponent = cardObj.AddComponent <Card>();

        cardObjCardComponent.SetIndex(index);
        cardObjCardComponent.sprite = sprite;
        _lastIndex = index;
    }
Esempio n. 4
0
 public SpellPart(Sprite sprite, ULess.Card card, SpellPartType type) : this(sprite, type)
 {
     Card = card;
 }
Esempio n. 5
0
 public SpellPart(Sprite sprite, SpellPartType type = SpellPartType.first)
 {
     Sprite = sprite;
     Type   = type;
 }