Example #1
0
    private Tile LoadSparkyTile(int x, int y)
    {
        GameObjectList enemies = this.Find("enemies") as GameObjectList;
        TileField      tiles   = this.Find("tiles") as TileField;
        Sparky         enemy   = new Sparky((y + 1) * tiles.CellHeight - 100f);

        enemy.Position = new Vector2(((float)x + 0.5f) * tiles.CellWidth, (y + 1) * tiles.CellHeight - 100f);
        enemies.Add(enemy);
        return(new Tile());
    }
Example #2
0
 private Tile LoadSparkyTile(int x, int y)
 {
     GameObjectList enemies = this.Find("enemies") as GameObjectList;
     TileField tiles = this.Find("tiles") as TileField;
     Sparky enemy = new Sparky((y + 1) * tiles.CellHeight - 100f);
     enemy.Position = new Vector2(((float)x + 0.5f) * tiles.CellWidth, (y + 1) * tiles.CellHeight - 100f);
     enemies.Add(enemy);
     return new Tile();
 }
Example #3
0
    void LoadSparkyEnemy(int x, int y)
    {
        Sparky s = new Sparky(this, GetCellBottomCenter(x, y));

        AddChild(s);
    }