配置表访问接口化,简化常量访问

This commit is contained in:
flswld
2023-02-09 19:20:47 +08:00
parent 867448b80d
commit ae4c505e48
74 changed files with 2313 additions and 3189 deletions
+6 -17
View File
@@ -1,19 +1,8 @@
package constant
var LifeStateConst *LifeState
type LifeState struct {
LIFE_NONE uint16
LIFE_ALIVE uint16
LIFE_DEAD uint16
LIFE_REVIVE uint16
}
func InitLifeStateConst() {
LifeStateConst = new(LifeState)
LifeStateConst.LIFE_NONE = 0
LifeStateConst.LIFE_ALIVE = 1
LifeStateConst.LIFE_DEAD = 2
LifeStateConst.LIFE_REVIVE = 3
}
const (
LIFE_STATE_NONE uint16 = 0
LIFE_STATE_ALIVE uint16 = 1
LIFE_STATE_DEAD uint16 = 2
LIFE_STATE_REVIVE uint16 = 3
)