Ejemplo n.º 1
0
        public override void handleTurn()
        {
            // find ally ship.
              target = mc.getAllyShip();

              // chase target and fire.
              moveToTarget(target.Point);
        }
Ejemplo n.º 2
0
 // Mark the turn over for that ship.
 public void turnOver(GenericShip ship)
 {
     if (Object.ReferenceEquals (ship, enemy)) {
       playerTurn = true;
     } else {
       playerTurn = false;
       enemy.handleTurn ();
     }
 }
Ejemplo n.º 3
0
 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 ();
       });
 }
Ejemplo n.º 4
0
    private void PlaceShip()
    {
        ship = new Ship (ShipType.CARRACK);
        ship.instantiate (PointyHexPoint.Zero);

        enemy = new AutomatedShip (ShipType.GALLEY);
        enemy.instantiate (PointyHexPoint.East * 4);
    }