子类调用超类中的函数

发布于 2024-07-21 20:25:57 字数 177 浏览 5 评论 0原文

我在 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

策马西风 2024-07-28 20:25:57

您可以使用 super 语句来调用它们。

例如:

super.someFunction();

You'd call them with the super statement.

Such as:

super.someFunction();
难以启齿的温柔 2024-07-28 20:25:57

请参阅 super 语句。

See the super statement.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文