public Ship(TimeSpan waitTime, Texture2D texture, Cargo cargo, Harbour Home, Harbour Destination, int speed) { this._fromOff = new Vector2((GSS.world.mapWidth / 2) - Home.getLocation().X, (GSS.world.mapHeight / 2) - Home.getLocation().Y); this._waitTime = waitTime; this._texture = texture; this._cargo = cargo; this._home = Home; this._destination = Destination; this._position = Home.getLocation() * GSS.TileSize; this._baseSpeed = speed * GSS.ClockSpeed; this._speed = (500f / _baseSpeed); this._size = new Vector2(texture.Width, texture.Height); _origin = _size / 2; }
public Ship(TimeSpan waitTime, Texture2D texture, Cargo cargo, Harbour Home, Harbour Destination, int speed) { _fromOff = new Vector2((WorldInformation.mapWidth / 2) - Home.getLocation().X, (WorldInformation.mapHeight / 2) - Home.getLocation().Y); _waitTime = waitTime; _texture = texture; _cargo = cargo; _home = Home; _destination = Destination; _position = Home.getLocation() * EngineSettings.TileSize; _baseSpeed = speed * GSS.ClockSpeed; _speed = (500f / _baseSpeed); _size = new Vector2(texture.Width, texture.Height); _halfSize = _size / 2; _origin = _size / 2; }
void Start() { Harbour.AddToPool(this); }
static void Main(string[] args) { Harbour harbour = new Harbour(); harbour.RegisterNewBoats(); }