private void ObjectFactory() { if (clock.Timer() > 1) { Enemy e = new Enemy(turtleSprite, game, path); enemy.Add(e); clock.ResetTime(); } }
public Shot(Texture2D texture, Vector2 pos, Enemy target) : base(texture, pos, new Vector2(0,0)) { this.target = target; }
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)); } }