Skip to content

Commit

Permalink
a
Browse files Browse the repository at this point in the history
  • Loading branch information
SuCicada committed Nov 15, 2019
1 parent e7102b7 commit 9df7c18
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Examples-plus/Demo4/YourGame.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ var YourGame = {
if(!APG.Bag.getBagSize() && block.length){
getItem(block)
// if(site.x < 2){
var inf = aboutTextBitMap(block[0]);
var info= aboutTextBitMap(block[0]);
// 放置虚像, 放置当下的这个时候应该消灭之前那个,因为背包只能有一个快快,
// 所以地图上只会有一个虚像。
destroySprite(this.clearBlock.pop())
Expand Down
4 changes: 3 additions & 1 deletion src/APG/Sprite.js
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,9 @@ APG.Sprite.getSpriteListFromSite = function(x, y, group=game.world, recursive=fa
* @param {Phaser.Sprite} sprite - 要摧毁的精灵对象
*/
APG.Sprite.destroySprite = function(sprite){
sprite.destroy();
if(sprite){
sprite.destroy();
}
};

/**
Expand Down

0 comments on commit 9df7c18

Please sign in to comment.