Example #1
0
 private void ObjectFactory()
 {
     if (clock.Timer() > 1)
     {
         Enemy e = new Enemy(turtleSprite, game, path);
         enemy.Add(e);
         clock.ResetTime();
     }
 }
Example #2
0
 public Shot(Texture2D texture, Vector2 pos, Enemy target)
     : base(texture, pos, new Vector2(0,0))
 {
     this.target = target;
 }
Example #3
0
        public void Shoot(Tower t, Enemy e)
        {
            if (Vector2.Distance(t.Pos, e.GetPos()) < range && clock.Timer() < 0.01f)
            {

                shot.Add(new Shot(shotsprite, t.Pos, e));
            }
        }