Created
July 11, 2009 22:03
-
-
Save shawn42/145402 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def create_taxi_parts(direction) | |
taxi_parts = { | |
TaxiHood => 'taxi_hood', | |
TaxiBlower => 'taxi_blower', | |
TaxiMidsection => 'taxi_midsection', | |
TaxiTail => 'taxi_tail', | |
TaxiRearsection => 'taxi_rearsection', | |
TaxiThruster => 'taxi_thruster', | |
TaxiRightThruster => 'taxi_right_thruster', | |
TaxiRearThruster => 'taxi_rear_thruster' | |
} | |
@parts = [] | |
taxi_parts.each do |part_class,part| part = create_actor part.to_s, :x => part_class.offset_x(direction) + @taxi.x, :y => part_class.offset_y(direction) + @taxi.y | |
part.action = direction | |
part.when :remove_me do | |
fire :restart_level | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment