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

            m.Accessor = accessor;
            return(m);
        }
Example #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));
     }
 }
Example #3
0
 public GameObjectEntity(string name, ValueAccessor accessor)
     : base(name)
 {
     this._accessor = accessor;
 }
Example #4
0
 public UnityObjectEntity(string name, ValueAccessor accessor)
     : base(name, accessor)
 {
 }
Example #5
0
 public ComponentEntity(string name, ValueAccessor accessor)
     : base(name, accessor)
 {
 }
Example #6
0
 public ClassEntity(string name, ValueAccessor accessor)
     : base(name)
 {
     this._accessor = accessor;
 }
Example #7
0
 public StructPropertyValueAccessor(ValueAccessor outer, PropertyInfo info)
 {
     this._structValueAccessor = outer;
     this._propertyInfo        = info;
 }
Example #8
0
 public StructFieldValueAccessor(ValueAccessor outer, FieldInfo info)
 {
     this._structValueAccessor = outer;
     this._fieldInfo           = info;
 }
Example #9
0
 public GenericDictionaryValueAccessor(ValueAccessor outer, object key)
 {
     this._dictValueAccessor = outer;
     this.key = key;
 }
Example #10
0
 public GenericListElementValueAccessor(ValueAccessor outer, int index)
 {
     this._listValueAccessor = outer;
     this._elementIndex      = index;
 }
Example #11
0
 public Array1DElementValueAccessor(ValueAccessor outer, int index)
 {
     this._arrayValueAccessor = outer;
     this._elementIndex       = index;
 }