Module: RGSS::Game

Defined in:
lib/rgss.rb,
lib/rgss/stubs/rpg.rb

Constant Summary collapse

SPEED =
8

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.fullscreenObject

Returns the value of attribute fullscreen


245
246
247
# File 'lib/rgss/stubs/rpg.rb', line 245

def fullscreen
  @fullscreen
end

.titleObject

Returns the value of attribute title


244
245
246
# File 'lib/rgss/stubs/rpg.rb', line 244

def title
  @title
end

Class Method Details

.centerObject


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

Returns:

  • (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

.initObject


248
249
# File 'lib/rgss/stubs/rpg.rb', line 248

def self.init
end

.terminateObject


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