Advertisement
Guest User

Untitled

a guest
Jun 19th, 2017
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 1.10 KB | None | 0 0
  1. STANDING_EXTRA = "_stehend"
  2. WALKING_EXTRA = "_laufend"
  3. SHOT_EXTRA = "_schuss"
  4. WALKING_SHOT_EXTRA = "_laufschuss"
  5. SHOT_WAITTIME = 80
  6. class Game_Player
  7.   alias initialize_char_pose initialize unless $@
  8.   def initialize
  9.     @set_information = ["",0]
  10.     initialize_char_pose
  11.   end
  12.   def update_character_pose
  13.     @set_information[0] = $game_party.members[0].character_name
  14.     if @set_information[1] > 0
  15.       @set_information[1] -= 1
  16.     elsif Input.trigger?(Input::A) && Input.trigger?(Input::X) || Input.press?(Input::A) && Input.trigger?(Input::X)
  17.       @character_name = @set_information[0]+WALKING_SHOT_EXTRA
  18.       @set_information[1] = SHOT_WAITTIME
  19.     elsif Input.press?(Input::A)
  20.       @character_name = @set_information[0]+WALKING_EXTRA
  21.     elsif Input.trigger?(Input::X)
  22.       @character_name = @set_information[0]+SHOT_EXTRA
  23.       @set_information[1] = SHOT_WAITTIME
  24.     elsif Input.dir4 == 0
  25.       @character_name = @set_information[0]+STANDING_EXTRA
  26.     else
  27.       @character_name = @set_information[0]
  28.     end
  29.   end
  30.   alias update_char_pose update
  31.   def update
  32.     update_character_pose
  33.     update_char_pose
  34.   end
  35. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement