Merge pull request #6 from jwunderl/pr-1
fix namespace now that we have a tilemap temp literal
This commit is contained in:
Коммит
0bfe5acde5
|
@ -31,7 +31,7 @@ namespace ConnectionKind {
|
|||
|
||||
//% color=#84b89f icon="\uf279"
|
||||
//% groups='["Sprites", "Cover", "Tiles", "Creation", "Connections", "Location", "Camera"]'
|
||||
namespace tilemap {
|
||||
namespace tiles {
|
||||
export const OVERWORLD_MAP_ID = 7686;
|
||||
export const MAP_LOADED_EVENT = 7687;
|
||||
|
||||
|
@ -142,7 +142,7 @@ namespace tilemap {
|
|||
export function loadMap(map: WorldMap) {
|
||||
const loaded = getLoadedMap();
|
||||
|
||||
tilemap.destorySpritesOfKind(SpriteKind._TileSprite)
|
||||
tiles.destroySpritesOfKind(SpriteKind._TileSprite)
|
||||
|
||||
if (loaded) {
|
||||
OverWorldState.callUnloadListeners();
|
||||
|
@ -297,8 +297,8 @@ namespace tilemap {
|
|||
//% direction.shadow=direction_editor
|
||||
//% group="Overworld Grid" weight=40
|
||||
loadMapAt(
|
||||
tilemap.columnInDirection(loadedWorldColumn(), direction),
|
||||
tilemap.rowInDirection(loadedWorldRow(), direction)
|
||||
tiles.columnInDirection(loadedWorldColumn(), direction),
|
||||
tiles.rowInDirection(loadedWorldRow(), direction)
|
||||
);
|
||||
}
|
||||
|
||||
|
|
9
pxt.json
9
pxt.json
|
@ -1,18 +1,21 @@
|
|||
{
|
||||
"name": "tilemaps",
|
||||
"version": "1.7.1",
|
||||
"description": "An extension for handling multiple tilemaps and extra tilemap blocks.",
|
||||
"dependencies": {
|
||||
"device": "*"
|
||||
},
|
||||
"description": "An extension for handling multiple tilemaps and extra tilemap blocks.",
|
||||
"files": [
|
||||
"README.md",
|
||||
"tilemap.ts",
|
||||
"overworld.ts",
|
||||
"search.ts"
|
||||
],
|
||||
"preferredEditor": "tsprj",
|
||||
"testFiles": [
|
||||
"test.ts"
|
||||
],
|
||||
"version": "1.7.1"
|
||||
"supportedTargets": [
|
||||
"arcade"
|
||||
],
|
||||
"preferredEditor": "tsprj"
|
||||
}
|
||||
|
|
|
@ -3,8 +3,9 @@ namespace SpriteKind {
|
|||
}
|
||||
|
||||
//% color=#84b89f icon="\uf279"
|
||||
//% block="Tilemaps"
|
||||
//% groups='["Sprites", "Cover", "Tiles", "Location", "Camera"]'
|
||||
namespace tilemap {
|
||||
namespace tiles {
|
||||
//
|
||||
// Cover
|
||||
//
|
||||
|
@ -98,7 +99,7 @@ namespace tilemap {
|
|||
//% block="destroy all sprites of kind $spriteKind"
|
||||
//% spriteKind.shadow=spritekind
|
||||
//% group="Sprites" weight=9 blockGap=8
|
||||
export function destorySpritesOfKind(spriteKind: number) {
|
||||
export function destroySpritesOfKind(spriteKind: number) {
|
||||
sprites.allOfKind(spriteKind).forEach(s => s.destroy());
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче