public HexArray(DataMap dataMap) { _mapWidth = dataMap.Width; _mapHeight = dataMap.Height; _hexArray = new Hex [_mapWidth, _mapHeight]; _wormhole = dataMap.Wormhole; for (int y = 0; y < _mapHeight; y++) { for (int x = 0; x < _mapWidth; x++) { _hexArray[x, y] = new Hex(dataMap[x, y]); _hexArray[x, y].Index = new Point(x, y); } } }
public override void DoTask(ResourcePool resPool, SystemLog sysLog, DataMap dataMap) { switch (_currentTask) { case Task.Base: { break; } case Task.Collect: { if (dataMap[_hexLocation.X, _hexLocation.Y].System == null) { _currentTask = Task.Survey; goto case Task.Survey; } else { StarSystem system = dataMap[_hexLocation.X, _hexLocation.Y].System; sysLog.AddInfo(dataMap[this.HexLocation.X, this.HexLocation.Y]); system.GetResources(resPool, this, sysLog); this._acted = true; } break; } case Task.Survey: { sysLog.AddInfo(dataMap[this.HexLocation.X, this.HexLocation.Y]); this._acted = true; break; } case Task.Move: { break; } default: { //collect break; } } }
public override void DoTask(ResourcePool resPool, SystemLog sysLog, DataMap dataMap) { switch (_currentTask) { case Task.Survey: { sysLog.AddInfo(dataMap[this.HexLocation.X, this.HexLocation.Y]); this._acted = true; break; } case Task.Move: { break; } default: { sysLog.AddInfo(dataMap[this.HexLocation.X, this.HexLocation.Y]); this._acted = true; break; } } }
public virtual void DoTask(ResourcePool resPool, SystemLog sysLog, DataMap dataMap) { }