|
|
@ -104,9 +104,10 @@ pub fn Entity(comptime ctx: anytype) type { |
|
|
|
return @alignCast(@ptrCast(c.ecs_get_id(self.world.raw, self.raw, id))); |
|
|
|
return @alignCast(@ptrCast(c.ecs_get_id(self.world.raw, self.raw, id))); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
pub fn set(self: Self, comptime T: type, value: T) void { |
|
|
|
pub fn set(self: Self, comptime T: type, value: T) Self { |
|
|
|
const id = Lookup(ctx, T).id; |
|
|
|
const id = Lookup(ctx, T).id; |
|
|
|
_ = c.ecs_set_id(self.world.raw, self.raw, id, @sizeOf(T), &value); |
|
|
|
_ = c.ecs_set_id(self.world.raw, self.raw, id, @sizeOf(T), &value); |
|
|
|
|
|
|
|
return self; |
|
|
|
} |
|
|
|
} |
|
|
|
}; |
|
|
|
}; |
|
|
|
} |
|
|
|
} |
|
|
|