module M def self.m() loop do Graphics.update(); Input.update(); if Input.trigger?(:C) #我想在这里调用C类的c方法,但不知道怎么做…… break; end end end end class C def initialize() @b = false; loop do M.m(); break if @b; end end def c() @b = true; end end C.new();
欢迎光临 Project1 (https://rpg.blue/) | Powered by Discuz! X3.1 |