Example #1
0
    public override void SceneEvent(EnvEvent e, int[] args, Polygon p)
    {
        base.SceneEvent(e, args, p);

        RectangleF rect = p.Bounds;

        if (e.ID == 1)
        {
            baseList[args[0]] = new SYBase(p.Center, args[0], this);
        }

        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));
        }
    }
Example #2
0
    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));
        }
    }