修改参数错误信息
This commit is contained in:
parent
d3a42565a8
commit
8b25469d6e
2
world.go
2
world.go
@ -98,7 +98,7 @@ func Entries(w World, entities []donburi.Entity) []*Entry {
|
||||
// tick 单位为ms,且必须大于0,(小于15ms的值在Windows系统中会达不到,Windows系统中系统中断好像默认是15.6ms,也就是一秒最多64次)
|
||||
func NewWorld(tick int) World {
|
||||
if tick <= 0 {
|
||||
panic("tick必须大于0")
|
||||
panic(fmt.Errorf("创建World错误: tick必须大于0"))
|
||||
}
|
||||
return &world{
|
||||
World: donburi.NewWorld(),
|
||||
|
Loading…
Reference in New Issue
Block a user