Module: Chingu

Defined in:
lib/chingu/rect.rb,
lib/chingu.rb,
lib/chingu/text.rb,
lib/chingu/input.rb,
lib/chingu/assets.rb,
lib/chingu/window.rb,
lib/chingu/parallax.rb,
lib/chingu/particle.rb,
lib/chingu/animation.rb,
lib/chingu/inflector.rb,
lib/chingu/fpscounter.rb,
lib/chingu/game_state.rb,
lib/chingu/game_object.rb,
lib/chingu/helpers/gfx.rb,
lib/chingu/traits/timer.rb,
lib/chingu/traits/effect.rb,
lib/chingu/named_resource.rb,
lib/chingu/traits/retrofy.rb,
lib/chingu/traits/velocity.rb,
lib/chingu/game_object_list.rb,
lib/chingu/basic_game_object.rb,
lib/chingu/game_states/debug.rb,
lib/chingu/game_states/pause.rb,
lib/chingu/game_state_manager.rb,
lib/chingu/helpers/game_state.rb,
lib/chingu/game_states/fade_to.rb,
lib/chingu/helpers/game_object.rb,
lib/chingu/helpers/input_client.rb,
lib/chingu/helpers/rotation_center.rb,
lib/chingu/helpers/input_dispatcher.rb,
lib/chingu/traits/collision_detection.rb

Overview

Premade game state for chingu - Fade between two game states Fade from the current game state to a new one whenever with:

push_game_state(Chingu::GameStates::FadeTo.new(new_game_state, :speed => 3))

.. Or make your whole game look better with 1 line:

transitional_game_state(Chingu::GameStates::FadeTo, :speed => 10)

Defined Under Namespace

Modules: GameStates, Helpers, Inflector, Input, NamedResource, Traits Classes: Animation, BasicGameObject, FPSCounter, GameObject, GameObjectList, GameState, GameStateManager, ImagePath, Parallax, ParallaxLayer, Particle, Rect, Surface, Text, Window

Constant Summary collapse

VERSION =
"0.5.7.1"

Instance Method Summary collapse

Instance Method Details

#image_path(file) ⇒ Object



11
12
13
# File 'lib/chingu/assets.rb', line 11

def image_path(file)
  File.join($window.root, "gfx", file)
end

#media_path(file) ⇒ Object



7
8
9
# File 'lib/chingu/assets.rb', line 7

def media_path(file)
  File.join($window.root, "media", file)  
end