8 TazColor color = { 255, 255, 255, 255 };
12 float temp_rotation = 0.0f;
24 void init()
override {
32 void update(
float deltaTime)
override {
33 temp_rotation += 0.1f;
37 batch.drawBox(v_index, transform->size, transform->position, transform->rotation, color);
41 batch.drawBox(v_index, transform->size, transform->position, color, transform->rotation, 5.0f);
45 batch.drawBox(v_index, transform->size, transform->position, transform->rotation, color);
48 std::string GetComponentName()
override {
49 return "BoxComponent";
52 void showGUI(std::vector<BaseComponent*> otherComponents = {})
override {
53 showGUI(otherComponents, { entity });
57 void showGUI(std::vector<BaseComponent*> otherComponents, std::vector<Entity*> otherEntities)
override {
60 ImVec4 a_color = ImVec4(color.r / 255.0f, color.g / 255.0f, color.b / 255.0f, color.a / 255.0f);
61 if (ImGui::ColorPicker4(
"TazColor", (
float*)&a_color)) {
63 (GLubyte)(a_color.x * 255),
64 (GLubyte)(a_color.y * 255),
65 (GLubyte)(a_color.z * 255),
66 (GLubyte)(a_color.w * 255)
69 for (
auto& e : otherEntities) {