public override void handleTurn() { // find ally ship. target = mc.getAllyShip(); // chase target and fire. moveToTarget(target.Point); }
// Mark the turn over for that ship. public void turnOver(GenericShip ship) { if (Object.ReferenceEquals (ship, enemy)) { playerTurn = true; } else { playerTurn = false; enemy.handleTurn (); } }
protected void fireAt(GenericShip enemy) { int distance = Point.DistanceFrom (enemy.Point); GameObject bomb = GameObject.Instantiate (AssetManager.Instance.bombPrefab, Position, Quaternion.identity) as GameObject; bomb.transform.DOMove (mc.Map [enemy.Point], distance * 0.4f, false) .OnComplete (() => { GameObject.Destroy (bomb); endTurn (); }); }
private void PlaceShip() { ship = new Ship (ShipType.CARRACK); ship.instantiate (PointyHexPoint.Zero); enemy = new AutomatedShip (ShipType.GALLEY); enemy.instantiate (PointyHexPoint.East * 4); }