Class: Yuki::SoftReset

Inherits:
Object show all
Defined in:
scripts/99999 Scripts_a_haute_dependences/00200 Yuki__SoftReset.rb

Overview

Class that manage the soft reset

Instance Method Summary collapse

Instance Method Details

#display_message



42
43
44
# File 'scripts/99999 Scripts_a_haute_dependences/00200 Yuki__SoftReset.rb', line 42

def display_message(*)
  return
end

#main

Main process of the scene



21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# File 'scripts/99999 Scripts_a_haute_dependences/00200 Yuki__SoftReset.rb', line 21

def main
  # Force the on_transition event to be called
  Scheduler.start(:on_transition)
  # Disposing everything and freeing memory
  Audio.__reset__
  ObjectSpace.each_object(::Viewport) { |v| v.dispose unless v.disposed? }
  GC.start
  ObjectSpace.each_object(::Sprite) { |s| s.dispose unless s.disposed? }
  ObjectSpace.each_object(::Text) { |t| t.dispose unless t.disposed? }
  ObjectSpace.each_object(::Texture) { |b| b.dispose unless b.disposed? }
  Pathfinding.debug = false
  PFM.game_state = nil
  GC.start
  ts = 0.1
  sleep(ts) while Input::Keyboard.press?(Input::Keyboard::F12)
end

#update



38
39
40
# File 'scripts/99999 Scripts_a_haute_dependences/00200 Yuki__SoftReset.rb', line 38

def update
  return
end