refactoring
This commit is contained in:
parent
86e9d7c9d4
commit
f34ca3eade
5 changed files with 5 additions and 4 deletions
|
@ -1,10 +1,10 @@
|
||||||
Crafty.defineScene "Battle", ->
|
Crafty.defineScene "Battle", ->
|
||||||
|
|
||||||
# free viewport
|
# free viewport
|
||||||
Crafty.viewport.clampToEntities = false
|
Crafty.viewport.clampToEntities = false
|
||||||
|
|
||||||
# attach viewport to an (invisible) entity twice as big as a playmat
|
# attach viewport to an (invisible) entity twice as big as a playmat
|
||||||
Crafty.viewport.follow(
|
Crafty.viewport.follow (
|
||||||
Crafty.e('2D, Canvas')
|
Crafty.e('2D, Canvas')
|
||||||
.attr {
|
.attr {
|
||||||
w: 1 * CONF.playmat.w
|
w: 1 * CONF.playmat.w
|
||||||
|
@ -31,7 +31,8 @@ Crafty.defineScene "Battle", ->
|
||||||
0
|
0
|
||||||
]
|
]
|
||||||
|
|
||||||
Crafty.e('playmat, AllyPlaymat')
|
# Place example playmats
|
||||||
Crafty.e('playmat, EnemyPlaymat')
|
Crafty.e 'playmat, AllyPlaymat'
|
||||||
|
Crafty.e 'playmat, EnemyPlaymat'
|
||||||
|
|
||||||
return
|
return
|
||||||
|
|
Reference in a new issue