Class: GamesAndRpgParadise::EndPlayerSide
- Inherits:
-
Chingu::GameObject
- Object
- Chingu::GameObject
- GamesAndRpgParadise::EndPlayerSide
- Defined in:
- lib/games_and_rpg_paradise/gui/gosu/chinguroids/objects.rb
Overview
END PLAYER SIDE
used in Ending 2 gamestate
Instance Method Summary collapse
Instance Method Details
#adjust_particles ⇒ Object
525 526 527 528 |
# File 'lib/games_and_rpg_paradise/gui/gosu/chinguroids/objects.rb', line 525 def adjust_particles @particles_slow = 0.999 @part_off_change *= 0.99999 end |
#setup ⇒ Object
512 513 514 515 516 517 518 519 520 521 522 523 |
# File 'lib/games_and_rpg_paradise/gui/gosu/chinguroids/objects.rb', line 512 def setup @image = Gosu::Image["assets/player_side.png"] @width, @height = 32, 32 @max_speed, @speed, @part_speed = 10, 0.4, 6 @easing = 1.0 # define variables relating to scaling and movement @shrinkage = 1.0 @particles_slow = 1.0 @part_fact = 0.4 @part_offset = 15 @part_off_change = 1.0 self.factor = 1.5 end |
#update ⇒ Object
530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 |
# File 'lib/games_and_rpg_paradise/gui/gosu/chinguroids/objects.rb', line 530 def update self.factor *= @shrinkage @part_speed *= @particles_slow @part_offset *= @part_off_change self.velocity_x *= @easing self.velocity_y *= @easing Chingu::Particle.create(:x => @x + @part_offset, :y => @y, :image => "assets/particle_1.png", :color => 0xFF86EFFF, :mode => :default, :fade_rate => -25, :angle => @angle, :factor => @factor * @part_fact, :zorder => Zorder::Main_Character_Particles) Chingu::Particle.each { |particle| particle.y -= Gosu::offset_y(@angle, @part_speed); particle.x -= Gosu::offset_x(@angle, @part_speed)} Chingu::Particle.destroy_if { |object| object.outside_window? || object.color.alpha == 0 } end |