This repository has been archived on 2024-04-29. You can view files and clone it, but cannot push or open issues or pull requests.
node-fftcg/client/scripts/40-test-entities.coffee

47 lines
731 B
CoffeeScript
Raw Normal View History

2018-09-30 21:48:24 +00:00
# Load base scene
Crafty.scene "Battle"
# Testing some entities
Crafty.sprite 480, 670, '//www.fftcgmognet.com/images/cards/hd/1/1/107.jpg',
shantotto: [
0
0
]
2018-10-01 19:39:53 +00:00
backups = [
2018-09-30 21:48:24 +00:00
2018-10-01 19:39:53 +00:00
Crafty.e 'shantotto, AllyCard'
.attr {
card:
type: 'backup'
}
2018-09-30 21:48:24 +00:00
2018-10-01 19:39:53 +00:00
Crafty.e 'shantotto, AllyCard'
.attr {
card:
type: 'backup'
}
2018-09-30 21:48:24 +00:00
2018-10-01 19:39:53 +00:00
Crafty.e 'shantotto, AllyCard'
.attr {
card:
type: 'backup'
}
]
Crafty 'AllyCard'
.each (index) ->
switch @card.type
when 'backup'
@trigger 'Place',
x: CONF.coord.x.main + index * CONF.coord.x.step
y: CONF.coord.y.bkup
return
Crafty.e 'shantotto, EnemyCard'
.trigger 'Place',
x: 900
y: 0