//------------------------------------------------------------------------------ // // This code was generated by a tool. // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. // //------------------------------------------------------------------------------ package cfg import "errors" type Game_heroStargrowData struct { Star int32 Level int32 StarupHp float32 StarupAtk float32 StarupDef float32 StarupSpeed float32 } func (Game_heroStargrowData) GetTypeId() int { return 882965061 } func NewGame_heroStargrowData(_buf map[string]interface{}) (_v *Game_heroStargrowData, err error) { _v = &Game_heroStargrowData{} { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["star"].(float64); !_ok_ { err = errors.New("star error"); return }; _v.Star = int32(_tempNum_) } { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["level"].(float64); !_ok_ { err = errors.New("level error"); return }; _v.Level = int32(_tempNum_) } { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["starup_hp"].(float64); !_ok_ { err = errors.New("starup_hp error"); return }; _v.StarupHp = float32(_tempNum_) } { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["starup_atk"].(float64); !_ok_ { err = errors.New("starup_atk error"); return }; _v.StarupAtk = float32(_tempNum_) } { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["starup_def"].(float64); !_ok_ { err = errors.New("starup_def error"); return }; _v.StarupDef = float32(_tempNum_) } { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["starup_speed"].(float64); !_ok_ { err = errors.New("starup_speed error"); return }; _v.StarupSpeed = float32(_tempNum_) } return }