Merge pull request #6 from jwunderl/pr-1

fix namespace now that we have a tilemap temp literal
This commit is contained in:
Daryl Zuniga 2020-07-16 16:43:27 -07:00 коммит произвёл GitHub
Родитель 28212abffa 8ad2a976a8
Коммит 0bfe5acde5
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
3 изменённых файлов: 13 добавлений и 9 удалений

Просмотреть файл

@ -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)
);
}

Просмотреть файл

@ -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());
}