Method: ActorView#initialize

Defined in:
lib/gamebox/core/actor_view.rb

#initializeActorView

Returns a new instance of ActorView.



7
8
9
10
11
12
13
14
15
16
# File 'lib/gamebox/core/actor_view.rb', line 7

def initialize
  @layer = actor.do_or_do_not(:layer) || 0
  @parallax = actor.do_or_do_not(:parallax) || 1

  # TODO clean up the show/hide here make nice with visible behavior?
  actor.when :remove_me do unregister  end
  actor.when :hide_me   do unregister  end
  actor.when :show_me   do register    end
  
end