本文整理汇总了Python中vehicle.Vehicle.destroy方法的典型用法代码示例。如果您正苦于以下问题:Python Vehicle.destroy方法的具体用法?Python Vehicle.destroy怎么用?Python Vehicle.destroy使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类vehicle.Vehicle
的用法示例。
在下文中一共展示了Vehicle.destroy方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: destroy
# 需要导入模块: from vehicle import Vehicle [as 别名]
# 或者: from vehicle.Vehicle import destroy [as 别名]
def destroy(self):
"""Prepare this Character to be garbage-collected by Python:
Remove all of the Character's nodes from the scene graph, remove its
CollisionSolids from the global CollisionTraverser, clear its
CollisionHandler, remove tasks, destroy Actor.
After executing this method, any remaining references to the Character
object can be destroyed by the user module, and the Character will be
garbage-collected by Python.
"""
taskMgr.remove(self.characterStepTask)
self.cleanup()
self.actor.delete()
Vehicle.destroy(self)