class DumbMissileLauncher

Constants

MISSILE_LAUNCHER_INIT_ANGLE
MISSILE_LAUNCHER_MAX_ANGLE
MISSILE_LAUNCHER_MIN_ANGLE

Public Class Methods

get_hardpoint_image() click to toggle source
# File line-em-up/models/dumb_missile_launcher.rb, line 14
def self.get_hardpoint_image
  Gosu::Image.new("#{MEDIA_DIRECTORY}/missile_launcher.png")
end

Public Instance Methods

attack(pointer) click to toggle source
  return true
else
  return false
end

end

# File line-em-up/models/dumb_missile_launcher.rb, line 29
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
init_projectile(pointer, options) click to toggle source

COOLDOWN_DELAY = 15

# File line-em-up/models/dumb_missile_launcher.rb, line 8
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