Quote:
Originally Posted by ApothiX
PHP Code:
function onActionPulled() { player.x += -vecx(player.dir); player.y += -vecy(player.dir); x += -vecx(player.dir); y += -vecy(player.dir); }
Would probably accomplish the same thing, without having 4 different if statements.
|
Not sure how well this would work?
PHP Code:
function onActionpulled()
{
this.x = player.x += -vecx(player.dir);
this.y = player.y += -vecy(player.dir);
}