Skip to content

Latest commit

 

History

History
33 lines (26 loc) · 1.2 KB

File metadata and controls

33 lines (26 loc) · 1.2 KB

Components Package Documentation

Overview

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

Quick Links

Usage Example

GameObject obj = new GameObject("Player");
obj.addComponent(new RendererComponent());
obj.addComponent(new CameraComponent());

Best Practices

  • Attach only one CameraComponent per camera GameObject
  • Use RendererComponent for objects that need to be drawn
  • Extend Component to create custom behaviors

See Also