150 lines
9.8 KiB
Go
150 lines
9.8 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 GameStroyData struct {
|
|
Id int32
|
|
Groupid int32
|
|
Before int32
|
|
Next int32
|
|
Type int32
|
|
Bg string
|
|
Place int32
|
|
Speak string
|
|
Listen string
|
|
Des string
|
|
Modelstatetarget string
|
|
Modelstate int32
|
|
Modelaction string
|
|
Speakstate string
|
|
Listenstate string
|
|
Chose []int32
|
|
Turn int32
|
|
Show int32
|
|
Move string
|
|
Action string
|
|
Sound string
|
|
PositionR serialization.Vector3
|
|
PositionL serialization.Vector3
|
|
RevolveR serialization.Vector3
|
|
RevolveL serialization.Vector3
|
|
SizeR serialization.Vector3
|
|
SizeL serialization.Vector3
|
|
Perf string
|
|
Cg string
|
|
Skip bool
|
|
}
|
|
|
|
const TypeId_GameStroyData = 1697302313
|
|
|
|
func (*GameStroyData) GetTypeId() int32 {
|
|
return 1697302313
|
|
}
|
|
|
|
func (_v *GameStroyData)Deserialize(_buf map[string]interface{}) (err error) {
|
|
{ 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; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["groupid"].(float64); !_ok_ { err = errors.New("groupid error"); return }; _v.Groupid = int32(_tempNum_) }
|
|
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["before"].(float64); !_ok_ { err = errors.New("before error"); return }; _v.Before = int32(_tempNum_) }
|
|
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["next"].(float64); !_ok_ { err = errors.New("next error"); return }; _v.Next = int32(_tempNum_) }
|
|
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["type"].(float64); !_ok_ { err = errors.New("type error"); return }; _v.Type = int32(_tempNum_) }
|
|
{ var _ok_ bool; if _v.Bg, _ok_ = _buf["bg"].(string); !_ok_ { err = errors.New("bg error"); return } }
|
|
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["place"].(float64); !_ok_ { err = errors.New("place error"); return }; _v.Place = int32(_tempNum_) }
|
|
{ var _ok_ bool; if _v.Speak, _ok_ = _buf["speak"].(string); !_ok_ { err = errors.New("speak error"); return } }
|
|
{ var _ok_ bool; if _v.Listen, _ok_ = _buf["listen"].(string); !_ok_ { err = errors.New("listen error"); return } }
|
|
{ var _ok_ bool; if _v.Des, _ok_ = _buf["des"].(string); !_ok_ { err = errors.New("des error"); return } }
|
|
{ var _ok_ bool; if _v.Modelstatetarget, _ok_ = _buf["modelstatetarget"].(string); !_ok_ { err = errors.New("modelstatetarget error"); return } }
|
|
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["modelstate"].(float64); !_ok_ { err = errors.New("modelstate error"); return }; _v.Modelstate = int32(_tempNum_) }
|
|
{ var _ok_ bool; if _v.Modelaction, _ok_ = _buf["modelaction"].(string); !_ok_ { err = errors.New("modelaction error"); return } }
|
|
{ var _ok_ bool; if _v.Speakstate, _ok_ = _buf["speakstate"].(string); !_ok_ { err = errors.New("speakstate error"); return } }
|
|
{ var _ok_ bool; if _v.Listenstate, _ok_ = _buf["listenstate"].(string); !_ok_ { err = errors.New("listenstate error"); return } }
|
|
{
|
|
var _arr_ []interface{}
|
|
var _ok_ bool
|
|
if _arr_, _ok_ = _buf["chose"].([]interface{}); !_ok_ { err = errors.New("chose error"); return }
|
|
|
|
_v.Chose = make([]int32, 0, len(_arr_))
|
|
|
|
for _, _e_ := range _arr_ {
|
|
var _list_v_ int32
|
|
{ var _ok_ bool; var _x_ float64; if _x_, _ok_ = _e_.(float64); !_ok_ { err = errors.New("_list_v_ error"); return }; _list_v_ = int32(_x_) }
|
|
_v.Chose = append(_v.Chose, _list_v_)
|
|
}
|
|
}
|
|
|
|
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["turn"].(float64); !_ok_ { err = errors.New("turn error"); return }; _v.Turn = int32(_tempNum_) }
|
|
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["show"].(float64); !_ok_ { err = errors.New("show error"); return }; _v.Show = int32(_tempNum_) }
|
|
{ var _ok_ bool; if _v.Move, _ok_ = _buf["move"].(string); !_ok_ { err = errors.New("move error"); return } }
|
|
{ var _ok_ bool; if _v.Action, _ok_ = _buf["action"].(string); !_ok_ { err = errors.New("action error"); return } }
|
|
{ var _ok_ bool; if _v.Sound, _ok_ = _buf["sound"].(string); !_ok_ { err = errors.New("sound error"); return } }
|
|
{ var _ok_ bool; var _v_ map[string]interface{}; if _v_, _ok_ = _buf["positionR"].(map[string]interface{}); !_ok_ { err = errors.New("positionR error"); return }
|
|
var _x_, _y_, _z_ 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_) }
|
|
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _v_["z"].(float64); !_ok_ { err = errors.New("z error"); return }; _z_ = float32(_tempNum_) }
|
|
_v.PositionR = serialization.NewVector3(_x_, _y_, _z_)
|
|
}
|
|
|
|
{ var _ok_ bool; var _v_ map[string]interface{}; if _v_, _ok_ = _buf["positionL"].(map[string]interface{}); !_ok_ { err = errors.New("positionL error"); return }
|
|
var _x_, _y_, _z_ 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_) }
|
|
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _v_["z"].(float64); !_ok_ { err = errors.New("z error"); return }; _z_ = float32(_tempNum_) }
|
|
_v.PositionL = serialization.NewVector3(_x_, _y_, _z_)
|
|
}
|
|
|
|
{ var _ok_ bool; var _v_ map[string]interface{}; if _v_, _ok_ = _buf["revolveR"].(map[string]interface{}); !_ok_ { err = errors.New("revolveR error"); return }
|
|
var _x_, _y_, _z_ 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_) }
|
|
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _v_["z"].(float64); !_ok_ { err = errors.New("z error"); return }; _z_ = float32(_tempNum_) }
|
|
_v.RevolveR = serialization.NewVector3(_x_, _y_, _z_)
|
|
}
|
|
|
|
{ var _ok_ bool; var _v_ map[string]interface{}; if _v_, _ok_ = _buf["revolveL"].(map[string]interface{}); !_ok_ { err = errors.New("revolveL error"); return }
|
|
var _x_, _y_, _z_ 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_) }
|
|
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _v_["z"].(float64); !_ok_ { err = errors.New("z error"); return }; _z_ = float32(_tempNum_) }
|
|
_v.RevolveL = serialization.NewVector3(_x_, _y_, _z_)
|
|
}
|
|
|
|
{ var _ok_ bool; var _v_ map[string]interface{}; if _v_, _ok_ = _buf["sizeR"].(map[string]interface{}); !_ok_ { err = errors.New("sizeR error"); return }
|
|
var _x_, _y_, _z_ 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_) }
|
|
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _v_["z"].(float64); !_ok_ { err = errors.New("z error"); return }; _z_ = float32(_tempNum_) }
|
|
_v.SizeR = serialization.NewVector3(_x_, _y_, _z_)
|
|
}
|
|
|
|
{ var _ok_ bool; var _v_ map[string]interface{}; if _v_, _ok_ = _buf["sizeL"].(map[string]interface{}); !_ok_ { err = errors.New("sizeL error"); return }
|
|
var _x_, _y_, _z_ 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_) }
|
|
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _v_["z"].(float64); !_ok_ { err = errors.New("z error"); return }; _z_ = float32(_tempNum_) }
|
|
_v.SizeL = serialization.NewVector3(_x_, _y_, _z_)
|
|
}
|
|
|
|
{ var _ok_ bool; if _v.Perf, _ok_ = _buf["perf"].(string); !_ok_ { err = errors.New("perf error"); return } }
|
|
{ var _ok_ bool; if _v.Cg, _ok_ = _buf["cg"].(string); !_ok_ { err = errors.New("cg error"); return } }
|
|
{ var _ok_ bool; if _v.Skip, _ok_ = _buf["skip"].(bool); !_ok_ { err = errors.New("skip error"); return } }
|
|
return
|
|
}
|
|
|
|
func DeserializeGameStroyData(_buf map[string]interface{}) (*GameStroyData, error) {
|
|
v := &GameStroyData{}
|
|
if err := v.Deserialize(_buf); err == nil {
|
|
return v, nil
|
|
} else {
|
|
return nil, err
|
|
}
|
|
}
|