The Components package contains all attachable behaviors for GameObjects, including rendering, camera, and custom logic. Each component extends the base Component class and implements specific functionality.
| Component | Purpose |
|---|---|
| Component | Base class for all attachable behaviors |
| CameraComponent | Attaches a Camera to a GameObject and synchronizes its transform |
| RendererComponent | Handles mesh rendering, color, shader, and texture |
GameObject obj = new GameObject("Player");
obj.addComponent(new RendererComponent());
obj.addComponent(new CameraComponent());- Attach only one
CameraComponentper camera GameObject - Use
RendererComponentfor objects that need to be drawn - Extend
Componentto create custom behaviors