51 lines
2.3 KiB
Go
51 lines
2.3 KiB
Go
//------------------------------------------------------------------------------
|
|
// <auto-generated>
|
|
// This code was generated by a tool.
|
|
// Changes to this file may cause incorrect behavior and will be lost if
|
|
// the code is regenerated.
|
|
// </auto-generated>
|
|
//------------------------------------------------------------------------------
|
|
|
|
package cfg
|
|
|
|
import "errors"
|
|
import "bright/serialization"
|
|
|
|
type GameUiGameMinerData struct {
|
|
Minerkey int32
|
|
Mineid int32
|
|
Itemid *Gameatn
|
|
Itempos serialization.Vector2
|
|
Itemjpg string
|
|
}
|
|
|
|
const TypeId_GameUiGameMinerData = 725220039
|
|
|
|
func (*GameUiGameMinerData) GetTypeId() int32 {
|
|
return 725220039
|
|
}
|
|
|
|
func (_v *GameUiGameMinerData)Deserialize(_buf map[string]interface{}) (err error) {
|
|
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["minerkey"].(float64); !_ok_ { err = errors.New("minerkey error"); return }; _v.Minerkey = int32(_tempNum_) }
|
|
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["mineid"].(float64); !_ok_ { err = errors.New("mineid error"); return }; _v.Mineid = int32(_tempNum_) }
|
|
{ var _ok_ bool; var _x_ map[string]interface{}; if _x_, _ok_ = _buf["itemid"].(map[string]interface{}); !_ok_ { err = errors.New("itemid error"); return }; if _v.Itemid, err = DeserializeGameatn(_x_); err != nil { return } }
|
|
{ var _ok_ bool; var _v_ map[string]interface{}; if _v_, _ok_ = _buf["itempos"].(map[string]interface{}); !_ok_ { err = errors.New("itempos error"); return }
|
|
var _x_, _y_ float32;
|
|
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _v_["x"].(float64); !_ok_ { err = errors.New("x error"); return }; _x_ = float32(_tempNum_) }
|
|
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _v_["y"].(float64); !_ok_ { err = errors.New("y error"); return }; _y_ = float32(_tempNum_) }
|
|
_v.Itempos = serialization.NewVector2(_x_, _y_)
|
|
}
|
|
|
|
{ var _ok_ bool; if _v.Itemjpg, _ok_ = _buf["itemjpg"].(string); !_ok_ { err = errors.New("itemjpg error"); return } }
|
|
return
|
|
}
|
|
|
|
func DeserializeGameUiGameMinerData(_buf map[string]interface{}) (*GameUiGameMinerData, error) {
|
|
v := &GameUiGameMinerData{}
|
|
if err := v.Deserialize(_buf); err == nil {
|
|
return v, nil
|
|
} else {
|
|
return nil, err
|
|
}
|
|
}
|