public SYTowerWall(TKTools.Polygon p, int towerID, Map m) : base(OpenTK.Vector2.Zero, m) { this.towerID = towerID; RectangleF rect = p.Bounds; position = new Vector2(rect.X, rect.Y) + new Vector2(rect.Width / 2, rect.Height / 2); size = new Vector2(rect.Width, rect.Height); }
public override void SceneEvent(Scene.EnvEvent e, int[] args, TKTools.Polygon p) { base.SceneEvent(e, args, p); RectangleF rect = p.Bounds; if (e.ID == 0) { spawnPoints[args[0]] = new SpawnPoint(p.Center, new Vector2(rect.Width, rect.Height), this); } if (e.ID == 1) { baseList[args[0]] = new SYBase(p.Center, args[0], this); } if (e.ID == 10) { campList.Add(new SYCreepCamp(rect, args[0], this)); } if (e.ID == 5) { SpawnTower(new Vector2(rect.X + rect.Width / 2, rect.Y), args[0], args[1]); } if (e.ID == 6) { wallList[args[0]] = new SYTowerWall(p, args[0], this); } if (e.ID == 7) { towerAreaList.Add(new SYTowerArea(new Vector2(rect.X + rect.Width / 2, rect.Y + rect.Height / 2), new Vector2(rect.Width, rect.Height), this)); } }