Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.
Sure you can.
The way I do it is by using an anonymous inner class. There might be others. In fact there probably is.
Code:
module Input
class << self
unless self.method_defined?(:zeriab_myscript_input_update)
alias_method(:zeriab_myscript_input_update, :update)
end
def update
@x ||= 0
@x += 1
p @x if @x % 100 == 0
zeriab_myscript_input_update
end
end
end
@mephisto: Hidden classes can be aliased. If you don't know what to alias just use reflection to get that information.