Esempio n. 1
0
    public Hero(UnitCoord centerCoord)
    {
        _centerCoord.X = centerCoord.X;
        _centerCoord.Y = centerCoord.Y;

        _heroCoordList.Add(new UnitCoord(_centerCoord.X, _centerCoord.Y - 1));
        _heroCoordList.Add(new UnitCoord(_centerCoord.X - 1, _centerCoord.Y));
        _heroCoordList.Add(new UnitCoord(_centerCoord.X, _centerCoord.Y));
        _heroCoordList.Add(new UnitCoord(_centerCoord.X + 1, _centerCoord.Y));
        _heroCoordList.Add(new UnitCoord(_centerCoord.X - 1, _centerCoord.Y + 1));
        _heroCoordList.Add(new UnitCoord(_centerCoord.X, _centerCoord.Y + 1));
        _heroCoordList.Add(new UnitCoord(_centerCoord.X + 1, _centerCoord.Y + 1));
        _heroCoordList.Add(new UnitCoord(_centerCoord.X - 1, _centerCoord.Y - 1));
        _heroCoordList.Add(new UnitCoord(_centerCoord.X + 1, _centerCoord.Y - 1));

        for (int i = 0; i < _heroCoordList.Count; i++)
        {
            _completeHero.Add(new HeroChar(_heroCoordList[i], _heroChars[i]));
        }

        Color = ConsoleColor.Cyan;
    }
Esempio n. 2
0
 public Snowflake(int id, UnitCoord coord) : base(coord, '■')
 {
     _id = id;
 }
Esempio n. 3
0
 public HeroChar(UnitCoord coord, char symbol) : base(coord, symbol)
 {
 }
Esempio n. 4
0
 public Bullet(UnitCoord coord) : base(coord, '▲')   // possible symbols: '¤', '×'
 {
     CreationTime = DateTime.Now;
 }
Esempio n. 5
0
 public Unit(UnitCoord coord, char symbol)
 {
     _coord.X = coord.X;
     _coord.Y = coord.Y;
     Symbol   = symbol;
 }