Skip to content

Commit

Permalink
Fixed all relative camera sprites didn't been drawn
Browse files Browse the repository at this point in the history
  • Loading branch information
AqeeAqee committed Aug 4, 2022
1 parent fd7adb7 commit 1ca63f3
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
5 changes: 5 additions & 0 deletions main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -310,3 +310,8 @@ game.onUpdate(() => {
// character.loopFrames(spr, textures[Math.floor(i * textures.length / characterAniDirs.length)], 150, character.rule(dir))
// })
// }
info.setScore(999)
info.setLife(3)
let mySprite = sprites.create(sprites.builtin.computer1, SpriteKind.Player)
mySprite.setPosition(80,10)
mySprite.setFlag(SpriteFlag.RelativeToCamera, true)
2 changes: 1 addition & 1 deletion pxt.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
"branch": "v0.14.3",
"tag": "v0.14.3",
"commits": "https://github.com/microsoft/pxt-arcade/commits/aef27bb278de89a83ecb6ab02af5319c06d617e2",
"target": "1.8.26",
"target": "1.8.30",
"pxt": "5.21.6",
"targetId": "arcade"
},
Expand Down
7 changes: 4 additions & 3 deletions render_raycasting.ts
Original file line number Diff line number Diff line change
Expand Up @@ -312,11 +312,12 @@ namespace Render {
// const ms=control.micros()
this.render()
// info.setScore(control.micros()-ms)
screen.fill(0)
}
this.sprites2D.forEach(spr => {
spr.__draw(sc.camera)
})
this.sprites2D.forEach(spr => spr.__draw(sc.camera))
this.spriteLikes.forEach(spr => spr.__draw(sc.camera))
if (this._viewMode == ViewMode.raycastingView)
this.tempScreen.drawTransparentImage(screen,0,0)
})

sc.tileMap.addEventListener(tiles.TileMapEvent.Unloaded, data => {
Expand Down

0 comments on commit 1ca63f3

Please sign in to comment.