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); } }
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); } }
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); }
public bool isTargeted(Position pos) { TargetedSquare ts = this.get(pos); return(ts != null); }