nitlanguage
/
nit.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
tests: add base_init_setter.nit
[nit.git]
/
lib
/
bucketed_game.nit
diff --git
a/lib/bucketed_game.nit
b/lib/bucketed_game.nit
index
eba5d69
..
ad79e6c
100644
(file)
--- a/
lib/bucketed_game.nit
+++ b/
lib/bucketed_game.nit
@@
-20,7
+20,9
@@
#
# Allows for fast support of a large number of entities with rare actions,
# such as a forest with many individual trees.
#
# Allows for fast support of a large number of entities with rare actions,
# such as a forest with many individual trees.
-module bucketed_game
+module bucketed_game is serialize
+
+import serialization
# Something acting on the game
class Turnable[G: Game]
# Something acting on the game
class Turnable[G: Game]
@@
-32,6
+34,7
@@
end
# Something acting on the game from time to time
class Bucketable[G: Game]
super Turnable[G]
# Something acting on the game from time to time
class Bucketable[G: Game]
super Turnable[G]
+
private var act_at: nullable Int = null
# Cancel the previously registered acting turn
private var act_at: nullable Int = null
# Cancel the previously registered acting turn
@@
-129,8
+132,8
@@
class ThinGameTurn[G: ThinGame]
# Game tick when `self` should act.
var tick: Int is protected writable
# Game tick when `self` should act.
var tick: Int is protected writable
- # List of game events occured for `self`.
- var events = new List[GameEvent] is protected writable
+ # Game events occurred for `self`.
+ var events = new Array[GameEvent] is protected writable
end
# Game turn on the full logic
end
# Game turn on the full logic