Esempio n. 1
0
    public bool SetCrawlPixel(Vector2 pos, bool last)
    {
        if (castingList != null && castingList.Contains(pos))
        {
            totalGrowth += 1;
        }

        Color color = growthColor;

        if (last)
        {
            color = lastColor;
        }

        return(elementController.AddElement(Element.NATURE, pos, color));
    }
    public void AddFire(Vector2 position)
    {
        if (!firePositions.ContainsKey(position) && elementController.AddElement(Element.FIRE, position, fireColor))
        {
            Fire newFire = new Fire(position);

            firePositions[position] = newFire;
            fireQueue.Enqueue(newFire);

            fireGrown++;
            if (castingList != null && castingList.Contains(position))
            {
                totalGrowth += 1;
            }
        }
    }
Esempio n. 3
0
 public void AddElement(ElementType eleType)
 {
     eleController.AddElement(eleType);
 }