Exemple #1
0
 public void startTargeting(Position pos, bool isPriority)
 {
     if (!this.isTargeted(pos))
     {
         TargetedSquare ts = new TargetedSquare(pos, isPriority);
         this.list.Add(ts);
         this.worldRenderer.dirtyExcavationTarget(pos, ts);
     }
 }
Exemple #2
0
    public void dirtyExcavationTarget(Position pos, TargetedSquare ts)
    {
        if (!this.initialized)
        {
            return;
        }

        if (this.targetLayer != null && pos.depth == this.targetLayer.depth)
        {
            this._targetedRenderer.setTile(pos.x, pos.y, ts);
        }
    }
Exemple #3
0
    public bool isPriority(Position pos)
    {
        TargetedSquare ts = this.get(pos);

        if (ts == null)
        {
            return(false);
        }
        else
        {
            return(ts.isPriority);
        }
    }
    public void setTile(int x, int y, TargetedSquare ts)
    {
        TileBase tile;

        if (ts == null)
        {
            tile = null;
        }
        else
        {
            if (ts.isPriority)
            {
                tile = this._tileHighPriority;
            }
            else
            {
                tile = this._tileNormalPriority;
            }
        }

        this._tilemap.SetTile(new Vector3Int(x, y, 0), tile);
    }
Exemple #5
0
    public bool isTargeted(Position pos)
    {
        TargetedSquare ts = this.get(pos);

        return(ts != null);
    }