Class: RGame::Engine::Component
- Inherits:
-
Object
- Object
- RGame::Engine::Component
show all
- Extended by:
- Signal::DSL
- Defined in:
- lib/rgame/engine/component.rb
Direct Known Subclasses
RGame::Engine::Components::ActionTrigger, RGame::Engine::Components::AnimatedSprite, RGame::Engine::Components::CameraFollow, RGame::Engine::Components::CharacterBody, RGame::Engine::Components::CircleCollider, RGame::Engine::Components::CollisionWorld, RGame::Engine::Components::DespawnOffscreen, RGame::Engine::Components::PathFollow, RGame::Engine::Components::PlayerController, RGame::Engine::Components::Pool, RGame::Engine::Components::ScreenWrap, RGame::Engine::Components::Sprite, RGame::Engine::Components::Targeting, RGame::Engine::Components::ThrustController, RGame::Engine::Components::TileWorld, RGame::Engine::Components::Timer, RGame::Engine::Components::Velocity, RGame::Engine::Components::WanderController, Players, Scene::SceneStack, Viewports
Instance Attribute Summary collapse
Instance Method Summary
collapse
signal
Instance Attribute Details
#node ⇒ Object
Returns the value of attribute node.
8
9
10
|
# File 'lib/rgame/engine/component.rb', line 8
def node
@node
end
|
Instance Method Details
#context ⇒ Object
10
11
12
|
# File 'lib/rgame/engine/component.rb', line 10
def context
@context ||= node.context
end
|
#control(actions) ⇒ Object
21
|
# File 'lib/rgame/engine/component.rb', line 21
def control(actions); end
|
#draw(renderer, view) ⇒ Object
23
|
# File 'lib/rgame/engine/component.rb', line 23
def draw(renderer, view); end
|
#on_attach ⇒ Object
Tree-lifecycle hooks. on_attach fires once the node is in the live tree, so
node.root / node.scene and sibling systems are reachable — pull and register
shared systems here, not in initialize (where the node has no anchors yet).
on_detach mirrors it: release those registrations.
18
|
# File 'lib/rgame/engine/component.rb', line 18
def on_attach; end
|
#on_detach ⇒ Object
19
|
# File 'lib/rgame/engine/component.rb', line 19
def on_detach; end
|
#sweep_freed ⇒ Object
Container components (e.g. SceneStack) that hold nodes off the normal child
list override this to forward the deferred-free sweep into them.
27
|
# File 'lib/rgame/engine/component.rb', line 27
def sweep_freed; end
|
#update(dt) ⇒ Object
22
|
# File 'lib/rgame/engine/component.rb', line 22
def update(dt); end
|