Quote:
Originally Posted by thatdwarf
PHP Code:
function onCreated() {
this.image = "block.png";
setTimer(2);
onMovementFinished();
}
function onMovementFinished() {
if(!onwall(this.x + imgwidth(this.image), this.y + imgheight(this.image))) {
temp.movex = sin(this.angle) * this.speed;
temp.movey = cos(this.angle) * this.speed;
move(movex, movey, .1, 8);
}
}
function onTimeout() {
destroy();
}
|
PHP Code:
function onCreated() {
this.image = "block.png";
setTimer(2);
onMovementFinished();
}
function onMovementFinished() {
if(!onwall(this.x + imgwidth(this.image), this.y + imgheight(this.image))) {
temp.movex = sin(this.angle) * this.speed;
temp.movey = cos(this.angle) * this.speed;
move(this.x + movex, this.y + movey, .1, 8);
}
}
function onTimeout() {
destroy();
}