Class: GamesAndRpgParadise::Meteor
- Inherits:
-
Chingu::GameObject
- Object
- Chingu::GameObject
- GamesAndRpgParadise::Meteor
- 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
-
#initialize(options) ⇒ Meteor
constructor
A new instance of Meteor.
- #update ⇒ Object
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() 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
241 242 243 |
# File 'lib/games_and_rpg_paradise/gui/gosu/chinguroids/objects.rb', line 241 def update @angle += @angular_velocity end |