refactor: Update Unity to 2022.3.62
This commit is contained in:
@@ -11,11 +11,11 @@ namespace Cryville.Crtr {
|
||||
public static IMotionStringParser MotionStringParser { get; private set; }
|
||||
public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer) {
|
||||
var obj = JToken.ReadFrom(reader);
|
||||
switch (obj["format"].ToObject<int>()) {
|
||||
case 2: MotionStringParser = MotionStringParser2.Instance; break;
|
||||
case 3: MotionStringParser = MotionStringParser3.Instance; break;
|
||||
default: throw new FormatException("Unsupported chart format");
|
||||
}
|
||||
MotionStringParser = obj["format"].ToObject<int>() switch {
|
||||
2 => MotionStringParser2.Instance,
|
||||
3 => MotionStringParser3.Instance,
|
||||
_ => throw new FormatException("Unsupported chart format"),
|
||||
};
|
||||
return base.ReadJson(obj.CreateReader(), objectType, existingValue, serializer);
|
||||
}
|
||||
public override Chart Create(Type objectType) {
|
||||
@@ -28,12 +28,11 @@ namespace Cryville.Crtr {
|
||||
static MotionStringParser2 _instance;
|
||||
public static MotionStringParser2 Instance {
|
||||
get {
|
||||
if (_instance == null)
|
||||
_instance = new MotionStringParser2();
|
||||
_instance ??= new MotionStringParser2();
|
||||
return _instance;
|
||||
}
|
||||
}
|
||||
static readonly PdtFragmentInterpreter _itor = new PdtFragmentInterpreter();
|
||||
static readonly PdtFragmentInterpreter _itor = new();
|
||||
static readonly PropOp _vecop = new VectorOp(v => _vecbuf = v);
|
||||
static float[] _vecbuf;
|
||||
public void Parse(string str, out Identifier name, out MotionNode node) {
|
||||
@@ -74,12 +73,11 @@ namespace Cryville.Crtr {
|
||||
static MotionStringParser3 _instance;
|
||||
public static MotionStringParser3 Instance {
|
||||
get {
|
||||
if (_instance == null)
|
||||
_instance = new MotionStringParser3();
|
||||
_instance ??= new MotionStringParser3();
|
||||
return _instance;
|
||||
}
|
||||
}
|
||||
static readonly PdtFragmentInterpreter _itor = new PdtFragmentInterpreter();
|
||||
static readonly PdtFragmentInterpreter _itor = new();
|
||||
static readonly PropOp _vecop = new VectorOp(v => _vecbuf = v);
|
||||
static float[] _vecbuf;
|
||||
public void Parse(string str, out Identifier name, out MotionNode node) {
|
||||
|
Reference in New Issue
Block a user