1
0
mirror of https://github.com/klmp200/sarl-fireworks.git synced 2024-11-25 02:24:28 +00:00

rewriting task cancelling

This commit is contained in:
ngaud 2017-05-02 17:34:19 +02:00
parent 9316a74f07
commit ed1ce51747
3 changed files with 6 additions and 5 deletions

View File

@ -9,6 +9,7 @@ import javafx.scene.paint.Color
class RocketsPos {
public val ROCKETREFRESHDELAY = 100
var position = new Vector<Double>()
var color : Color
var hidden = false

View File

@ -38,7 +38,7 @@ agent Fire {
on Freeze {
this.frozen = occurrence.value
if (frozen)
cancel(move, true)
move.cancel(true)
else
wake(new UpdateFirePosition)
}
@ -106,7 +106,7 @@ agent Fire {
}
def cleanBeforeExit() {
cancel(move, true)
move.cancel(true)
exited = true
destroyed = true
}

View File

@ -47,7 +47,7 @@ agent Rocket {
exploded = true
frozen = true
exited = true
cancel(move, true)
move.cancel(true)
innerContext.defaultSpace.emit(new Exit)
}
@ -55,7 +55,7 @@ agent Rocket {
on Freeze {
this.frozen = occurrence.value
if (frozen)
cancel(move, true)
move.cancel(true)
if (!frozen)
wake(new UpdateRocketPosition)
}
@ -98,7 +98,7 @@ agent Rocket {
grid.setRocketPosition(id, vect)
if (lifetime <= 0) {
exploded = true
cancel(move, true)
move.cancel(true)
grid.hideHocketPosition(id)
wake(new Explode)
}