Class: Meteor

Inherits:
Chingu::GameObject
  • Object
show all
Defined in:
lib/games_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.



229
230
231
232
233
234
235
236
# File 'lib/games_paradise/gui/gosu/chinguroids/objects.rb', line 229

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



238
239
240
# File 'lib/games_paradise/gui/gosu/chinguroids/objects.rb', line 238

def update
	@angle += @angular_velocity
end