We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Some changes to make the component module easier to use:
EntityId
Entity
set()
Expected usage:
namespace rsc = atta::resource; namespace cmp = atta::component; // Create material resource rsc::Material::CreateInfo info = {.color = {1,0,0}}; rsc::Material* rmat = rsc::create<rsc::Material>("CubeMaterial", info); // Create cube cmp::Entity cube = cmp::createEntity(); cube.add<cmp::Name>()->set("Cube"); cube.add<cmp::Mesh>()->set("meshes/cube.obj"); cube.add<cmp::Transform>(); cube.add<cmp::Material>()->set(rmat); // Create cube2 by copying cmp::Entity cube2 = cmp::copyEntity(cube); cube2.get<cmp::Transform>()->position = {1,0,0}; cube2.get<cmp::Material>()->getResource()->color = {0,1,0}; // Delete cube cmp::deleteEntity(cube);
The text was updated successfully, but these errors were encountered:
Refactor: Component module interface. #34
e039f3d
No branches or pull requests
Some changes to make the component module easier to use:
EntityId
, should returnEntity
.Entity
<->EntityId
set()
set()
set()
Expected usage:
The text was updated successfully, but these errors were encountered: