public Entity AddChild(EntityPattern pattern, EntityParameters ep) { Entity entity = null; IntPtr ep_pointer = IntPtr.Zero; if (ep != null) { ep_pointer = ep.GetNativPointer(); } switch (pattern.type) { case EntityPattern.Types.Type_ScenePattern: entity = new Scene(ComplexEntity_AddChild(this.pointer, pattern.GetNativPointer(), ep_pointer)); break; case EntityPattern.Types.Type_SpritePattern: entity = new Sprite(ComplexEntity_AddChild(this.pointer, pattern.GetNativPointer(), ep_pointer)); break; } if (entity != null) { childs.Add(entity); } return(entity); }
public override object ConvertTo(ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value, Type destType) { if (destType == typeof(string) && value is EntityParameters) { EntityParameters v = (EntityParameters)value; return("رنگ،موقعیت،چرخش،مقیاس،نام"); } return(base.ConvertTo(context, culture, value, destType)); }
public Entity(IntPtr pointer) : base(pointer) { this.ep = new EntityParameters(Entity_GetEP(this.pointer)); }