Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #==============================================================================
- # ** Main
- #------------------------------------------------------------------------------
- # This processing is executed after module and class definition is finished.
- #==============================================================================
- # rgss_main { SceneManager.run }
- def updates
- Graphics.update
- Input.update
- if Input.press?(:RIGHT)
- $test.x += 5 unless $test.x + $test.width == Graphics.width
- print_pos
- elsif Input.press?(:LEFT)
- $test.x -= 5 unless $test.x == 0
- print_pos
- elsif Input.press?(:DOWN)
- $test.y += 5 unless $test.y + $test.height == Graphics.height
- print_pos
- elsif Input.press?(:UP)
- $test.y -= 5 unless $test.y == 0
- print_pos
- end
- end
- def print_pos
- p $test.x.to_s + " " + $test.y.to_s
- end
- DataManager.init
- $test = Window_Base.new(0,0,100,100)
- Audio.bgm_play("Audio/BGM/Battle1")
- updates while true
Advertisement
Add Comment
Please, Sign In to add comment