Module: RGSS::Game
- Defined in:
- lib/rgss.rb,
lib/rgss/stubs/rpg.rb
Constant Summary collapse
- SPEED =
8
Class Attribute Summary collapse
-
.fullscreen ⇒ Object
Returns the value of attribute fullscreen.
-
.title ⇒ Object
Returns the value of attribute title.
Class Method Summary collapse
- .center ⇒ Object
- .close(flag = true) ⇒ Object
- .closing? ⇒ Boolean
- .create(width, height, title, **opts) ⇒ Object
- .init ⇒ Object
- .terminate ⇒ Object
- .update(delta) ⇒ Object
Class Attribute Details
.fullscreen ⇒ Object
Returns the value of attribute fullscreen.
245 246 247 |
# File 'lib/rgss/stubs/rpg.rb', line 245 def fullscreen @fullscreen end |
.title ⇒ Object
Returns the value of attribute title.
244 245 246 |
# File 'lib/rgss/stubs/rpg.rb', line 244 def title @title end |
Class Method Details
.center ⇒ Object
254 255 |
# File 'lib/rgss/stubs/rpg.rb', line 254 def self.center end |
.close(flag = true) ⇒ Object
257 258 |
# File 'lib/rgss/stubs/rpg.rb', line 257 def self.close(flag = true) end |
.closing? ⇒ Boolean
260 261 |
# File 'lib/rgss/stubs/rpg.rb', line 260 def self.closing? end |
.create(width, height, title, **opts) ⇒ Object
251 252 |
# File 'lib/rgss/stubs/rpg.rb', line 251 def self.create(width, height, title, **opts) end |
.init ⇒ Object
248 249 |
# File 'lib/rgss/stubs/rpg.rb', line 248 def self.init end |
.terminate ⇒ Object
263 264 |
# File 'lib/rgss/stubs/rpg.rb', line 263 def self.terminate end |
.update(delta) ⇒ Object
45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 |
# File 'lib/rgss.rb', line 45 def self.update(delta) $sprite.cy += 1 if Game.ticks % 8 == 0 $v.y -= SPEED if Input.press?(:UP) $v.y += SPEED if Input.press?(:DOWN) $v.x -= SPEED if Input.press?(:LEFT) $v.x += SPEED if Input.press?(:RIGHT) $fog.zoom += vec2(0.05) if Input.press?(:RAISE) $fog.zoom -= vec2(0.05) if Input.press?(:LOWER) $sprite.update(delta) $v.update(delta) $fog.update(delta) if Input.trigger?(:FULLSCREEN) p Graphics.fps p $v.position end if Input.press?(:QUIT) Game.close(true) end end |