Class: GamesAndRpgParadise::Meteor

Inherits:
Chingu::GameObject
  • Object
show all
Defined in:
lib/games_and_rpg_paradise/gui/gosu/chinguroids/objects.rb

Overview

METEOR

Meteor class is used in Introduction gamestate

Instance Method Summary collapse

Constructor Details

#initialize(options) ⇒ Meteor

Returns a new instance of Meteor.



232
233
234
235
236
237
238
239
# File 'lib/games_and_rpg_paradise/gui/gosu/chinguroids/objects.rb', line 232

def initialize(options)
	super(options.merge(:image => Gosu::Image["assets/meteor.png"]))
	@angular_velocity = 5
	@random = rand(2)+1
	if(@random == 1)
		@angular_velocity = -@angular_velocity
	end
end

Instance Method Details

#updateObject



241
242
243
# File 'lib/games_and_rpg_paradise/gui/gosu/chinguroids/objects.rb', line 241

def update
	@angle += @angular_velocity
end