public BaseEnemy(IEnumerable <Point> path, GameBase target)
 {
     this.target = target;
     Path        = path.GetEnumerator();
     Path.MoveNext();
     Location = new Point
     {
         X = Path.Current.X + new Random().Next(-5, 5),
         Y = Path.Current.Y + new Random().Next(-5, 5)
     };
     Path.MoveNext();
     nextPosition = Path.Current;
     NameImage    = "Enemy.png";
     Damage       = 1;
     HP           = 1;
     Speed        = 1;
     Money        = 10;
     Score        = 5;
 }
Esempio n. 2
0
 public Core(Action <bool> finished, Action updateMoney)
 {
     Score = 0;
     Money = 30;
     Path  = new List <Point>()
     {
         new Point(0, 200),
         new Point(200, 200),
         new Point(400, 200),
         new Point(400, 600),
         new Point(600, 600)
     };
     Base          = new GameBase(Path[Path.Count - 1], 1000);
     ScoreToFinish = 400;
     WaveGenerator = new WaveMachine(Path, Base);
     Storage       = new Storage(Base, AddScore, AddMoney);
     Finished      = finished;
     UpdateMoney   = updateMoney;
 }
 public WaveMachine(List <Point> path, GameBase target)
 {
     this.target = target;
     this.path   = path;
     wave        = new Wave(path, level, target);
 }