Class: GameScene
- Inherits:
-
Metro::Scene
- Object
- Metro::Scene
- GameScene
- Defined in:
- lib/templates/game/scenes/game_scene.rb
Direct Known Subclasses
Constant Summary
Constants included from Metro::Units
Instance Attribute Summary
Attributes inherited from Metro::Scene
Instance Method Summary collapse
-
#fade_in_and_out(name) ⇒ Object
This animation helper will fade in and fade out information.
Methods inherited from Metro::Scene
#_prepare_transition, #actor, #add_actors_to_scene, after, #after, #after_initialize, after_intervals, #base_draw, #base_update, #draw, #drawers, #enqueue, hierarchy, inherited, #initialize, metro_name, #notification, #prepare_transition_from, #prepare_transition_to, #register_actor, #register_actors!, #register_after_intervals!, #register_animations!, #register_events!, #register_events_for_target, #scene_name, scene_name, scenes, #show, #state, #to_hash, #to_s, #transition_to, #update, #updaters
Methods included from Metro::SceneView
included, #save_view, #view, #view_content, #view_name
Methods included from Metro::HasAnimations
Methods included from Metro::HasEvents
Methods included from Metro::Draws
Constructor Details
This class inherits a constructor from Metro::Scene
Instance Method Details
#fade_in_and_out(name) ⇒ Object
This animation helper will fade in and fade out information.
33 34 35 36 37 38 39 40 41 |
# File 'lib/templates/game/scenes/game_scene.rb', line 33 def fade_in_and_out(name) animate name, to: { alpha: 255 }, interval: 2.seconds do after 1.second do animate name, to: { alpha: 0 }, interval: 1.second do yield if block_given? end end end end |