public IStarship CreateShip(StarshipType type, string name, StarSystem location) { IStarship ship; switch (type) { case StarshipType.Frigate: ship = new Frigate(name, location); break; case StarshipType.Cruiser: ship = new Cruiser(name, location); break; case StarshipType.Dreadnought: ship = new Dreadnought(name, location); break; default: throw new NotSupportedException("Starship type not supported."); } Console.WriteLine(Messages.CreatedShip, ship.GetType().Name, ship.Name); return(ship); }
public MoveDreadnoughtAnimation(Dreadnought dreadnought, Vector2Int position) { this.dreadnought = dreadnought; this.position = position; dreadnought.Move(position.x, position.y); }
// Use this for initialization void Start() { Dreadnought piece = new Dreadnought(this); piece.x = System.Convert.ToInt32(transform.position.x + 3.5); piece.y = System.Convert.ToInt32(transform.position.z + 3.5); Game.instance.pieces[piece.x, piece.y] = piece; Transform healthBar = transform.Find("HealthBar"); healtBarManager = healthBar.GetComponent <HealtBarManager>(); }
public DreadnoughtAttackAnimation(Dreadnought dreadnought, List <HumanPiece> targets) { this.dreadnought = dreadnought; this.targets = targets; List <Piece> tmp = new List <Piece>(); foreach (HumanPiece humanPiece in targets) { tmp.Add(humanPiece); } LazerAnimation.lazerAnimation.Animate(dreadnought, tmp); }
public IStarship CreateShip(StarshipType type, string name, StarSystem location) { switch (type) { case StarshipType.Frigate: Frigate frigate = new Frigate(name, location); return(frigate); case StarshipType.Cruiser: Cruiser crusier = new Cruiser(name, location); return(crusier); case StarshipType.Dreadnought: Dreadnought dreadnought = new Dreadnought(name, location); return(dreadnought); default: throw new NotSupportedException("Starship type not supported."); } }
public MoveDreadnought(Dreadnought dreadnought, List <Tile> moves) { this.dreadnought = dreadnought; this.moves = moves; }
public DreadnoughtAttack(Dreadnought dreadnought) { this.dreadnought = dreadnought; }