public void GivenSonicTowerFiresABulletToTargetOne()
 {
     tower = new SonicTower() { Center = new PointF(0, 0), FireDelayMilis = 1000, Placed = true, Active = true };
     enemy1 = new GroundEnemy(1.3F, 1, 1, null) { Center = new PointF(0, range), Height = 10, Width = 10};
     bullet = tower.Fire(enemy1);
 }
Exemplo n.º 2
0
        public static bool IsOverlapingRoads(BaseTower tower, Map map)
        {
            foreach (var item in map.Roads)
            {
                if (item.IsInside(new PointF(tower.Center.X - tower.Width / 2, tower.Center.Y)))
                    return true;
                if (item.IsInside(new PointF(tower.Center.X, tower.Center.Y - tower.Height / 2)))
                    return true;
            }

            return false;
        }