protected EntityLot GetEntLot(string entLotName)
 {
     if (!entlots.ContainsKey(entLotName))
     {
         entlots.Add(entLotName, EntityLot.NewEntLot(entLotName));
     }
     return(entlots[entLotName]);
 }
Beispiel #2
0
    // Start is called before the first frame update
    void Start()
    {
        players = EntityLot.NewEntLot("players");
        dots    = EntityLot.NewEntLot("dots");
        ghosts  = EntityLot.NewEntLot("ghosts");

        Physics2D.IgnoreLayerCollision(LayerMask.NameToLayer("Entity"), LayerMask.NameToLayer("Entity"));
        loader.SetupTileset(spriteLot,
                            new int[] { 22, 30, 31, 32, 42, },
                            new int[] { 01, 02, 03, });

        StartLevel(levelAssets[currentLevelNumber]);
    }
Beispiel #3
0
    // Start is called before the first frame update
    void Start()
    {
        Physics2D.IgnoreLayerCollision(LayerMask.NameToLayer("Entity"), LayerMask.NameToLayer("Entity"));

        players   = EntityLot.NewEntLot("players");
        creatures = EntityLot.NewEntLot("creatures");
        var levelData = loader.Load(levelAsset);

        loader.SetupTileset(sprites,
                            solidTileIds: new int[] { 1, 2, },
                            spawnTileIds: new int[] { 3, 4, 5, 6, 7, }
                            );
        loader.PlaceTiles(levelData, this.tilemap, this.SpawnTileId);
    }
Beispiel #4
0
    // Start is called before the first frame update
    void Start()
    {
        Physics2D.IgnoreLayerCollision(
            LayerMask.NameToLayer("Entity"),
            LayerMask.NameToLayer("Entity")
            );

        players = EntityLot.NewEntLot("players");
        attacks = EntityLot.NewEntLot("attacks");

        loader.SetupTileset(sprites,
                            solidTileIds: new int[] { 3 },
                            spawnTileIds: new int[] { 1 });
        loader.PlaceTiles(loader.Load(testLevel), tilemap, SpawnTileId);
    }
    private void Start()
    {
        Physics2D.IgnoreLayerCollision(LayerMask.NameToLayer("Entity"), LayerMask.NameToLayer("Entity"));

        players = EntityLot.NewEntLot("players");
        dots    = EntityLot.NewEntLot("dots");
        boys    = EntityLot.NewEntLot("boys");
        walls   = EntityLot.NewEntLot("walls");

        tiledLoader.SetupTileset(sprites,
                                 new int[] { 10, },
                                 new int[] { 1, 2, 3, 4, 11, 12, 13, 14, }
                                 );
        tiledLoader.PlaceTiles(tiledLoader.Load(testLevel), tilemap, this.SpawnTileId);
    }