39 lines
620 B
CoffeeScript
39 lines
620 B
CoffeeScript
################
|
|
# Playmat
|
|
################
|
|
Crafty.c 'Playmat',
|
|
# Basic 2D Entity
|
|
required: '2D, Canvas'
|
|
|
|
# initialize Playmat
|
|
init: ->
|
|
@attr {
|
|
x: 0
|
|
y: CONF.playmat.h
|
|
z: CONF.layer.playmats
|
|
w: CONF.playmat.w
|
|
h: CONF.playmat.h
|
|
}
|
|
@origin 'top middle'
|
|
return
|
|
|
|
################
|
|
# EnemyPlaymat
|
|
################
|
|
Crafty.c 'EnemyPlaymat',
|
|
# Is a Playmat
|
|
required: 'Playmat'
|
|
|
|
# initialize Playmat
|
|
init: ->
|
|
@attr {
|
|
rotation: 180
|
|
}
|
|
return
|
|
|
|
################
|
|
# AllyPlaymat
|
|
################
|
|
Crafty.c 'AllyPlaymat',
|
|
# Is a Playmat
|
|
required: 'Playmat'
|