Class: Earth1

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

Overview

EARTH 1

called in Ending gamestate - trial and error adjustments to slowly zoom into view

Instance Method Summary collapse

Instance Method Details

#fact_easeObject



397
398
399
# File 'lib/games_paradise/gui/gosu/chinguroids/objects.rb', line 397

def fact_ease
  @fact_ease = 0.998
end

#motionObject



400
401
402
# File 'lib/games_paradise/gui/gosu/chinguroids/objects.rb', line 400

def motion
  @motion = 0.08
end

#motion_easingObject



403
404
405
# File 'lib/games_paradise/gui/gosu/chinguroids/objects.rb', line 403

def motion_easing
  @easing = 0.998
end

#setupObject



389
390
391
392
393
394
395
396
# File 'lib/games_paradise/gui/gosu/chinguroids/objects.rb', line 389

def setup
  @image = Image["media/assets/future_earth.png"]
  self.factor = 0.002
  @factoring = 1.0045
  @motion = 0.0
  @easing = 1.0
  @fact_ease = 0.999975
end

#updateObject



406
407
408
409
410
411
412
413
414
415
416
# File 'lib/games_paradise/gui/gosu/chinguroids/objects.rb', line 406

def update
  @y += @motion
  @motion *= @easing
  self.factor *= @factoring
  if self.factor >= 0.21
    @factoring *= @fact_ease
  end
  if self.factor >= 0.3142
    @factoring = 1.0
  end
end