Module: Chingu

Defined in:
lib/chingu/rect.rb,
lib/chingu.rb,
lib/chingu/text.rb,
lib/chingu/input.rb,
lib/chingu/window.rb,
lib/chingu/assets.rb,
lib/chingu/version.rb,
lib/chingu/console.rb,
lib/chingu/viewport.rb,
lib/chingu/parallax.rb,
lib/chingu/particle.rb,
lib/chingu/animation.rb,
lib/chingu/inflector.rb,
lib/chingu/game_state.rb,
lib/chingu/fpscounter.rb,
lib/chingu/helpers/gfx.rb,
lib/chingu/simple_menu.rb,
lib/chingu/game_object.rb,
lib/chingu/traits/timer.rb,
lib/chingu/traits/effect.rb,
lib/chingu/traits/sprite.rb,
lib/chingu/traits/retrofy.rb,
lib/chingu/named_resource.rb,
lib/chingu/high_score_list.rb,
lib/chingu/traits/velocity.rb,
lib/chingu/async/task_list.rb,
lib/chingu/game_object_map.rb,
lib/chingu/traits/viewport.rb,
lib/chingu/async_tasks/exec.rb,
lib/chingu/async_tasks/call.rb,
lib/chingu/async_tasks/move.rb,
lib/chingu/async_tasks/wait.rb,
lib/chingu/traits/animation.rb,
lib/chingu/game_object_list.rb,
lib/chingu/game_states/edit.rb,
lib/chingu/async/basic_task.rb,
lib/chingu/game_states/debug.rb,
lib/chingu/basic_game_object.rb,
lib/chingu/game_states/popup.rb,
lib/chingu/async_tasks/tween.rb,
lib/chingu/game_states/pause.rb,
lib/chingu/async/task_builder.rb,
lib/chingu/game_state_manager.rb,
lib/chingu/helpers/game_state.rb,
lib/chingu/traits/asynchronous.rb,
lib/chingu/helpers/game_object.rb,
lib/chingu/helpers/fps_counter.rb,
lib/chingu/game_states/fade_to.rb,
lib/chingu/classic_game_object.rb,
lib/chingu/traits/bounding_box.rb,
lib/chingu/async_tasks/parallel.rb,
lib/chingu/traits/simple_sprite.rb,
lib/chingu/helpers/input_client.rb,
lib/chingu/online_high_score_list.rb,
lib/chingu/helpers/options_setter.rb,
lib/chingu/traits/bounding_circle.rb,
lib/chingu/game_states/enter_name.rb,
lib/chingu/helpers/rotation_center.rb,
lib/chingu/helpers/input_dispatcher.rb,
lib/chingu/game_states/network_state.rb,
lib/chingu/traits/collision_detection.rb,
lib/chingu/game_states/network_client.rb,
lib/chingu/game_states/network_server.rb,
lib/chingu/helpers/class_inheritable_accessor.rb

Overview

This code is from railstips.org/2008/6/13/a-class-instance-variable-update But we use the rails-name for it, class_inheritable_accessor, which should make ppl more @ home.

Defined Under Namespace

Modules: Async, AsyncTasks, GameStates, Helpers, Inflector, Input, NamedResource, Traits Classes: Animation, Asset, BasicGameObject, ClassicGameObject, Console, FPSCounter, GameObject, GameObjectList, GameObjectMap, GameState, GameStateManager, HighScoreList, OnlineHighScoreList, Parallax, ParallaxLayer, Particle, Rect, SimpleMenu, Text, Viewport, Window

Constant Summary

DEBUG_COLOR =
Gosu::Color.new(0xFFFF0000)
DEBUG_ZORDER =
9999
INFINITY =
1.0 / 0
VERSION =
"0.9rc9"

Instance Method Summary (collapse)

Instance Method Details

- (Object) image_path(file)



15
16
17
# File 'lib/chingu/assets.rb', line 15

def image_path(file)
  File.join(ROOT, "images", file)
end

- (Object) media_path(file)



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

def media_path(file)
  File.join(ROOT, "media", file)  
end

- (Object) root_path(file)



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

def root_path(file)
  File.join(ROOT, file)  
end