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", ->
|
||||
|
||||
|
||||
# free viewport
|
||||
Crafty.viewport.clampToEntities = false
|
||||
|
||||
# attach viewport to an (invisible) entity twice as big as a playmat
|
||||
Crafty.viewport.follow(
|
||||
Crafty.viewport.follow (
|
||||
Crafty.e('2D, Canvas')
|
||||
.attr {
|
||||
w: 1 * CONF.playmat.w
|
||||
|
@ -31,7 +31,8 @@ Crafty.defineScene "Battle", ->
|
|||
0
|
||||
]
|
||||
|
||||
Crafty.e('playmat, AllyPlaymat')
|
||||
Crafty.e('playmat, EnemyPlaymat')
|
||||
# Place example playmats
|
||||
Crafty.e 'playmat, AllyPlaymat'
|
||||
Crafty.e 'playmat, EnemyPlaymat'
|
||||
|
||||
return
|
||||
|
|
Reference in a new issue