Class: Scene_Gameover

Inherits:
Scene_Base show all
Defined in:
Scene_GameOver.rb

Overview

** Scene_Gameover


This class performs game over screen processing.

Instance Method Summary (collapse)

Methods inherited from Scene_Base

#check_gameover, #create_main_viewport, #dispose_all_windows, #dispose_main_viewport, #fadeout_all, #main, #post_start, #pre_terminate, #return_scene, #scene_changing?, #transition_speed, #update_all_windows, #update_basic

Instance Method Details

- (Object) create_background


  • Create Background




55
56
57
58
# File 'Scene_GameOver.rb', line 55

def create_background
  @sprite = Sprite.new
  @sprite.bitmap = Cache.system("GameOver")
end

- (Object) dispose_background


  • Free Background




62
63
64
65
# File 'Scene_GameOver.rb', line 62

def dispose_background
  @sprite.bitmap.dispose
  @sprite.dispose
end

- (Object) fadein_speed


  • Get Fade In Speed




75
76
77
# File 'Scene_GameOver.rb', line 75

def fadein_speed
  return 120
end

- (Object) fadeout_frozen_graphics


  • Fade Out Frozen Graphics




48
49
50
51
# File 'Scene_GameOver.rb', line 48

def fadeout_frozen_graphics
  Graphics.transition(fadeout_speed)
  Graphics.freeze
end

- (Object) fadeout_speed


  • Get Fade Out Speed




69
70
71
# File 'Scene_GameOver.rb', line 69

def fadeout_speed
  return 60
end

- (Object) goto_title


  • Transition to Title Screen




81
82
83
84
# File 'Scene_GameOver.rb', line 81

def goto_title
  fadeout_all
  SceneManager.goto(Scene_Title)
end

- (Object) perform_transition


  • Execute Transition




34
35
36
# File 'Scene_GameOver.rb', line 34

def perform_transition
  Graphics.transition(fadein_speed)
end

- (Object) play_gameover_music


  • Play Music on Game Over Screen




40
41
42
43
44
# File 'Scene_GameOver.rb', line 40

def play_gameover_music
  RPG::BGM.stop
  RPG::BGS.stop
  $data_system.gameover_me.play
end

- (Object) start


  • Start Processing




11
12
13
14
15
16
# File 'Scene_GameOver.rb', line 11

def start
  super
  play_gameover_music
  fadeout_frozen_graphics
  create_background
end

- (Object) terminate


  • Termination Processing




20
21
22
23
# File 'Scene_GameOver.rb', line 20

def terminate
  super
  dispose_background
end

- (Object) update


  • Frame Update




27
28
29
30
# File 'Scene_GameOver.rb', line 27

def update
  super
  goto_title if Input.trigger?(:C)
end