Toggle navigation
Home
Latest pastes
FAQ
Random
Register
Login
Untitled
SUBMITTED BY:
Guest
DATE:
Aug. 8, 2014, 8:07 p.m.
FORMAT:
JavaScript
SIZE:
267 Bytes
Raw
Download
Tweet
HITS:
978
Go to comments
Report
function
Player
(
x
,
y
,
maxHealth
)
{
this
.
sprite
=
game
.
add
.
sprite
(
'player'
);
this
.
health
=
maxHealth
;
this
.
maxHealth
=
maxHealth
;
}
Player
.
prototype
=
{
update
:
function
()
{
this
.
sprite
.
animations
.
play
(
'idle'
);
}
};
Please enable JavaScript to view the
comments powered by Disqus.
comments powered by
Disqus