子类调用超类中的函数
我在 Actionscript 3 中有一个小项目,如果可以从子类调用超类中的代码,一切都会变得容易得多。
这是项目:
CarGame
Car
是否可以从 Car 类调用 CarGame 类中的函数?
I'm having a small project in Actionscript 3, and everything would be very much easier if it was possible to call code in the superclass from the subclass.
This is the project:
CarGame
Car
is it possible to call a function in the CarGame class from the Car class?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您可以使用 super 语句来调用它们。
例如:
You'd call them with the super statement.
Such as:
请参阅
super
语句。See the
super
statement.