go_dreamfactory/sys/configure/structs/game.Figure.go
2022-07-25 18:40:01 +08:00

40 lines
1.9 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"
type Game_Figure struct {
Id int32
Key string
Color string
Val int32
PositonX int32
PositonY int32
PositonZ int32
Icon string
}
func (Game_Figure) GetTypeId() int {
return -1818502016
}
func NewGame_Figure(_buf map[string]interface{}) (_v *Game_Figure, err error) {
_v = &Game_Figure{}
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["id"].(float64); !_ok_ { err = errors.New("id error"); return }; _v.Id = int32(_tempNum_) }
{ var _ok_ bool; if _v.Key, _ok_ = _buf["key"].(string); !_ok_ { err = errors.New("key error"); return } }
{ var _ok_ bool; if _v.Color, _ok_ = _buf["color"].(string); !_ok_ { err = errors.New("color error"); return } }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["val"].(float64); !_ok_ { err = errors.New("val error"); return }; _v.Val = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["positon_x"].(float64); !_ok_ { err = errors.New("positon_x error"); return }; _v.PositonX = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["positon_y"].(float64); !_ok_ { err = errors.New("positon_y error"); return }; _v.PositonY = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["positon_z"].(float64); !_ok_ { err = errors.New("positon_z error"); return }; _v.PositonZ = int32(_tempNum_) }
{ var _ok_ bool; if _v.Icon, _ok_ = _buf["icon"].(string); !_ok_ { err = errors.New("icon error"); return } }
return
}