Beispiel #1
0
        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);
        }
Beispiel #3
0
    // 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>();
    }
Beispiel #4
0
        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);
        }
Beispiel #5
0
        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.");
            }
        }
Beispiel #6
0
 public MoveDreadnought(Dreadnought dreadnought, List <Tile> moves)
 {
     this.dreadnought = dreadnought;
     this.moves       = moves;
 }
Beispiel #7
0
 public DreadnoughtAttack(Dreadnought dreadnought)
 {
     this.dreadnought = dreadnought;
 }