go get github.com/cherry-game/cherry/components/data-config@latest
import cherryDataConfig "github.com/cherry-game/cherry/components/data-config"
package demo
import (
"github.com/cherry-game/cherry"
cherryDataConfig "github.com/cherry-game/cherry/components/data-config"
)
// RegisterComponent 注册struct到data-config
func RegisterComponent() {
dataConfig := cherryDataConfig.NewComponent()
dataConfig.Register(
&DropList,
&DropOne,
)
//data-config组件注册到cherry引擎
cherry.RegisterComponent(dataConfig)
}