Class: Meteor
- Inherits:
-
Chingu::GameObject
- Object
- Chingu::GameObject
- Meteor
- Defined in:
- lib/games_paradise/gui/gosu/chinguroids/objects.rb
Overview
METEOR
Meteor class is used in Introduction gamestate
Instance Method Summary collapse
-
#initialize(options) ⇒ Meteor
constructor
A new instance of Meteor.
- #update ⇒ Object
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() super(.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
#update ⇒ Object
238 239 240 |
# File 'lib/games_paradise/gui/gosu/chinguroids/objects.rb', line 238 def update @angle += @angular_velocity end |