Beispiel #1
0
        public static Member CreateMember(string name, Type type, ValueAccessor accessor)
        {
            var m = CreateMemberWithType(name, type);

            m.Accessor = accessor;
            return(m);
        }
Beispiel #2
0
 public static Entity CreateEntity(string name, Type type, ValueAccessor accessor)
 {
     if (type == typeof(GameObject))
     {
         return(new GameObjectEntity(name, accessor));
     }
     else if (type == typeof(Component) || type.IsSubclassOf(typeof(Component)))
     {
         return(new ComponentEntity(name, accessor));
     }
     else if (type.IsValueType)
     {
         return(new StructEntity(name, accessor));
     }
     else
     {
         return(new ClassEntity(name, accessor));
     }
 }
Beispiel #3
0
 public GameObjectEntity(string name, ValueAccessor accessor)
     : base(name)
 {
     this._accessor = accessor;
 }
Beispiel #4
0
 public UnityObjectEntity(string name, ValueAccessor accessor)
     : base(name, accessor)
 {
 }
Beispiel #5
0
 public ComponentEntity(string name, ValueAccessor accessor)
     : base(name, accessor)
 {
 }
Beispiel #6
0
 public ClassEntity(string name, ValueAccessor accessor)
     : base(name)
 {
     this._accessor = accessor;
 }
 public StructPropertyValueAccessor(ValueAccessor outer, PropertyInfo info)
 {
     this._structValueAccessor = outer;
     this._propertyInfo        = info;
 }
 public StructFieldValueAccessor(ValueAccessor outer, FieldInfo info)
 {
     this._structValueAccessor = outer;
     this._fieldInfo           = info;
 }
 public GenericDictionaryValueAccessor(ValueAccessor outer, object key)
 {
     this._dictValueAccessor = outer;
     this.key = key;
 }
Beispiel #10
0
 public GenericListElementValueAccessor(ValueAccessor outer, int index)
 {
     this._listValueAccessor = outer;
     this._elementIndex      = index;
 }
Beispiel #11
0
 public Array1DElementValueAccessor(ValueAccessor outer, int index)
 {
     this._arrayValueAccessor = outer;
     this._elementIndex       = index;
 }