Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

hid more of the reliance on rubygame/sdl

  • Loading branch information...
commit acb5ede4ef8b6174f5c46ef3ca2bc520f68f7e77 1 parent 9584e23
bgoodspeed authored
7 lib/domain/player.rb
View
@@ -1,7 +1,5 @@
class Player
- include Rubygame
- include Sprites::Sprite
attr_accessor :universe, :party
@@ -43,6 +41,10 @@ def initialize( position, universe, party, filename, sx, sy, game)
@party = party
end
+ def draw(screen)
+ @animated_sprite_helper.image.blit screen, [screen.w/2,screen.h/2], [0,0,@hero_x_dim,@hero_y_dim]
+ end
+
def set_key_pressed_for(key, ticks)
update_facing_if_key_matches(key)
update_animated_sprite_helper(key)
@@ -69,7 +71,6 @@ def json_params
end
-
def update_facing_if_key_matches(newkey)
if [:down, :left,:up, :right].include?(newkey)
@interaction_helper.facing = newkey
2  lib/event_system/event_system.rb
View
@@ -5,7 +5,7 @@ class EventSystem
extend Forwardable
attr_reader :queue, :clock
def_delegators :@clock, :lifetime
- def_delegators :@helper, :non_menu_hooks, :menu_active_hooks, :menu_hooks
+ def_delegators :@helper, :non_menu_hooks, :menu_active_hooks, :menu_hooks, :battle_active_hooks
def initialize(clock, queue, helper)
@clock = clock
@queue = queue
6 lib/npcs/monster.rb
View
@@ -1,12 +1,6 @@
class Monster
include ScreenOffsetHelper
- include Rubygame
- include Sprites::Sprite
-
-
-
-
extend Forwardable
def_delegators :@coordinate_helper, :px, :py, :collides_on_x?, :collides_on_y?
Please sign in to comment.
Something went wrong with that request. Please try again.