Add frame list in skin data structure. Remove Cocos2d Plist support.
This commit is contained in:
@@ -1,9 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 925f95cb7c6644a4695b2701d42e1ea2
|
||||
folderAsset: yes
|
||||
timeCreated: 1606989037
|
||||
licenseType: Free
|
||||
DefaultImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@@ -1,49 +0,0 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Reflection;
|
||||
|
||||
namespace Cryville.Common.Plist {
|
||||
public class PlistConvert {
|
||||
public static T Deserialize<T>(string file) {
|
||||
return (T)Deserialize(typeof(T), PlistCS.Plist.readPlist(file));
|
||||
}
|
||||
|
||||
public static object Deserialize(Type type, object obj, Binder binder = null) {
|
||||
if (binder == null)
|
||||
binder = BinderAttribute.CreateBinderOfType(type);
|
||||
if (obj is IList) {
|
||||
var lobj = (List<object>)obj;
|
||||
foreach (var i in lobj) {
|
||||
throw new NotImplementedException(); // TODO
|
||||
}
|
||||
}
|
||||
else if (obj is IDictionary) {
|
||||
var dobj = (Dictionary<string, object>)obj;
|
||||
if (typeof(IDictionary).IsAssignableFrom(type)) {
|
||||
var result = (IDictionary)ReflectionHelper.InvokeEmptyConstructor(type);
|
||||
var it = type.GetGenericArguments()[1];
|
||||
foreach (var i in dobj) {
|
||||
var value = Deserialize(it, i.Value, binder);
|
||||
result.Add(i.Key, value);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
else {
|
||||
var result = ReflectionHelper.InvokeEmptyConstructor(type);
|
||||
foreach (var i in dobj) {
|
||||
var imis = type.GetMember(i.Key);
|
||||
if (imis.Length == 0) continue;
|
||||
var imi = imis[0];
|
||||
var it = ReflectionHelper.GetMemberType(imi);
|
||||
var value = Deserialize(it, i.Value, binder);
|
||||
ReflectionHelper.SetValue(imi, result, value, binder);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
}
|
||||
else return obj;
|
||||
throw new Exception(); // TODO
|
||||
}
|
||||
}
|
||||
}
|
@@ -1,12 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 3bc71e8b62d4022409aa5518bbf3a7d8
|
||||
timeCreated: 1608801352
|
||||
licenseType: Free
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
Reference in New Issue
Block a user