Guest User

Untitled

a guest
Sep 25th, 2018
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 0.61 KB | None | 0 0
  1. class Test < Scene_Base
  2.  
  3.   def main
  4.     super ()
  5.   end
  6.  
  7.  
  8.   def start
  9.     @gambar = Sprite.new
  10.     @gambar.bitmap = Bitmap.new("graphics/pictures/actor5.png")
  11.     @gambar.x | @gambar.y = 0
  12.    
  13.   end
  14.    
  15.   def movement
  16.     if Input.press?(Input::DOWN)
  17.       @gambar.y += 1
  18.     end
  19.     if Input.press?(Input::LEFT)
  20.       @gambar.x -= 1
  21.     end
  22.     if Input.press?(Input::RIGHT)
  23.       @gambar.x += 1
  24.     end
  25.     if Input.press?(Input::UP)
  26.       @gambar.y -= 1
  27.     end
  28.     if Input.trigger?(Input::B)
  29.       SceneManager.scene != self
  30.     end
  31.   end
  32.  
  33.   def terminate
  34.     super()
  35.   end
  36. end
Add Comment
Please, Sign In to add comment