Help me I'm so confused on where did the game assigns the player's current x and y. Do I have to make another method to do this?
Ruby:
class Player_Actions < Game_Player
def initialize
super
@sprite = Sprite.new
end
def draw_hitbox(x, y)
@sprite.bitmap = @bmp
end
def attack_state
@get_dir = "right" if Input.repeat?(:RIGHT)
@get_dir = "left" if Input.repeat?(:LEFT)
@get_dir = "up" if Input.repeat?(:UP)
@get_dir = "down" if Input.repeat?(:DOWN)
if Input.trigger?(:C)
msgbox(@x)
msgbox(@y)
draw_hitbox(0,0)
else
@sprite.visible = false
end
return
end
end