Sha256: 81a4b16c74ff102a5a328aa9fca2ab7ad531b531fd81b1c5963b3e99e011c2a3
Contents?: true
Size: 1.14 KB
Versions: 5
Compression:
Stored size: 1.14 KB
Contents
require_relative 'launcher.rb' class DumbMissileLauncher < Launcher MISSILE_LAUNCHER_MIN_ANGLE = 75 MISSILE_LAUNCHER_MAX_ANGLE = 105 MISSILE_LAUNCHER_INIT_ANGLE = 90 # COOLDOWN_DELAY = 15 def init_projectile pointer, options # Bullet.new(@scale, @screen_width, @screen_height, self, options) Missile.new(@scale, @screen_width, @screen_height, self, pointer.x, pointer.y, MISSILE_LAUNCHER_MIN_ANGLE, MISSILE_LAUNCHER_MAX_ANGLE, MISSILE_LAUNCHER_INIT_ANGLE, {damage_increase: @damage_increase}) end def self.get_hardpoint_image Gosu::Image.new("#{MEDIA_DIRECTORY}/missile_launcher.png") end # def draw # if @inited # if @active # # @image.draw(@x - @image_width_half, @y - @image_height_half, get_draw_ordering, @scale, @scale) # end # return true # else # return false # end # end def attack pointer # puts "DUMB MISSILE LAUNCHER ATTACK" if @cooldown_wait <= 0 options = {damage_increase: @damage_increase} projectile = init_projectile(pointer, options) # @projectiles << projectile @cooldown_wait = get_cooldown return projectile end end end
Version data entries
5 entries across 5 versions & 1 rubygems