我知道您很快就会使用协议(protocol),但您不能像使用Java中的接口(interface)那样自行实例化协议(protocol)。这是Java中的示例restartGameButton.setOnClickListener(newGuiClickListener(){@OverridepublicvoidonClick(floatx,floaty){//TODOAuto-generatedmethodstubrestartScene();//IcanputwhatevercodeIwantinhere.//ThisisgreatbecauseIcanembedthisinsid