public static Material Get(EntityBase entity, int slot = 0) { #if !(RELEASE && RELEASE_DISABLE_CHECKS) if (entity == null) { throw new ArgumentNullException("entity"); } #endif var ptr = NativeMaterialMethods.GetMaterial(entity.GetIEntity(), slot); return(TryGet(ptr)); }
public static void Set(EntityBase entity, Material mat, int slot = 0) { #if !(RELEASE && RELEASE_DISABLE_CHECKS) if (entity == null) { throw new ArgumentNullException("entity"); } if (mat == null) { throw new ArgumentNullException("mat"); } #endif NativeMaterialMethods.SetMaterial(entity.GetIEntity(), mat.Handle, slot); }
public static void RemoveAll(EntityBase parent) { NativeEntityMethods.RemoveAllEntityLinks(parent.GetIEntity()); }
public static EntityLink Create(EntityBase parent, EntityBase slave, string linkName, Vec3?relativePos = null, Quat?relativeRot = null) { return(new EntityLink(NativeEntityMethods.AddEntityLink(parent.GetIEntity(), linkName, slave.Id, slave.GUID, relativeRot ?? Quat.Identity, relativePos ?? Vec3.Zero), parent)); }
public static EntityLink Create(EntityBase parent, EntityBase slave, string linkName, Vec3? relativePos = null, Quat? relativeRot = null) { return new EntityLink(NativeEntityMethods.AddEntityLink(parent.GetIEntity(), linkName, slave.Id, relativeRot ?? Quat.Identity, relativePos ?? Vec3.Zero), parent); }
public static void Set(EntityBase entity, Material mat, int slot = 0) { #if !(RELEASE && RELEASE_DISABLE_CHECKS) if (entity == null) throw new ArgumentNullException("entity"); if (mat == null) throw new ArgumentNullException("mat"); #endif NativeMaterialMethods.SetMaterial(entity.GetIEntity(), mat.Handle, slot); }
public static Material Get(EntityBase entity, int slot = 0) { #if !(RELEASE && RELEASE_DISABLE_CHECKS) if (entity == null) throw new ArgumentNullException("entity"); #endif var ptr = NativeMaterialMethods.GetMaterial(entity.GetIEntity(), slot); return TryGet(ptr); }