mirror of
https://github.com/klmp200/sarl-fireworks.git
synced 2024-12-26 17:51:11 +00:00
rewriting task cancelling
This commit is contained in:
parent
9316a74f07
commit
ed1ce51747
@ -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
|
||||
|
@ -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
|
||||
}
|
||||
|
@ -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)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user