world添加获取tick值方法
This commit is contained in:
parent
3c3dd9f408
commit
102081251c
4
world.go
4
world.go
@ -45,6 +45,7 @@ type World interface {
|
|||||||
SetSpeed(speed float64) error
|
SetSpeed(speed float64) error
|
||||||
AddSystem(sys ...ISystem)
|
AddSystem(sys ...ISystem)
|
||||||
Close()
|
Close()
|
||||||
|
Tick() int
|
||||||
}
|
}
|
||||||
|
|
||||||
type world struct {
|
type world struct {
|
||||||
@ -73,6 +74,9 @@ func NewWorld(tick int) World {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (w *world) Tick() int {
|
||||||
|
return w.tick
|
||||||
|
}
|
||||||
func (w *world) Id() WorldId {
|
func (w *world) Id() WorldId {
|
||||||
return WorldId(w.world.Id())
|
return WorldId(w.world.Id())
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user