本文整理汇总了Python中AvatarInputHandler.CallbackDelayer.CallbackDelayer.destroy方法的典型用法代码示例。如果您正苦于以下问题:Python CallbackDelayer.destroy方法的具体用法?Python CallbackDelayer.destroy怎么用?Python CallbackDelayer.destroy使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类AvatarInputHandler.CallbackDelayer.CallbackDelayer
的用法示例。
在下文中一共展示了CallbackDelayer.destroy方法的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: destroy
# 需要导入模块: from AvatarInputHandler.CallbackDelayer import CallbackDelayer [as 别名]
# 或者: from AvatarInputHandler.CallbackDelayer.CallbackDelayer import destroy [as 别名]
def destroy(self):
CallbackDelayer.destroy(self)
self.__cam = None
if self.__aim is not None:
self.__aim.destroy()
self.__aim = None
return
示例2: destroy
# 需要导入模块: from AvatarInputHandler.CallbackDelayer import CallbackDelayer [as 别名]
# 或者: from AvatarInputHandler.CallbackDelayer.CallbackDelayer import destroy [as 别名]
def destroy(self):
CallbackDelayer.destroy(self)
self.disable()
self.__activeSelector = None
self.__cam.destroy()
self.__aih = None
return
示例3: destroy
# 需要导入模块: from AvatarInputHandler.CallbackDelayer import CallbackDelayer [as 别名]
# 或者: from AvatarInputHandler.CallbackDelayer.CallbackDelayer import destroy [as 别名]
def destroy(self):
_SPGFlashGunMarker.destroy(self)
CallbackDelayer.destroy(self)
self.__desiredShotInfoFunc = None
self.__trajectoryDrawer.visible = False
self.__trajectoryDrawer = None
return
示例4: destroy
# 需要导入模块: from AvatarInputHandler.CallbackDelayer import CallbackDelayer [as 别名]
# 或者: from AvatarInputHandler.CallbackDelayer.CallbackDelayer import destroy [as 别名]
def destroy(self):
CallbackDelayer.destroy(self)
if self.__manualSound is not None:
self.__manualSound.stop()
if self.__gearSound is not None:
self.__gearSound.stop()
self.__stateTable = None
示例5: destroy
# 需要导入模块: from AvatarInputHandler.CallbackDelayer import CallbackDelayer [as 别名]
# 或者: from AvatarInputHandler.CallbackDelayer.CallbackDelayer import destroy [as 别名]
def destroy(self):
CallbackDelayer.destroy(self)
self.disable()
self.__onChangeControlMode = None
self.__cam = None
self._writeUserPreferences()
self.__aimingSystem.destroy()
self.__aimingSystem = None
示例6: enable
# 需要导入模块: from AvatarInputHandler.CallbackDelayer import CallbackDelayer [as 别名]
# 或者: from AvatarInputHandler.CallbackDelayer.CallbackDelayer import destroy [as 别名]
def enable(self, enableSound):
if enableSound:
self.delayCallback(self.__updatePeriod, self.__update)
else:
CallbackDelayer.destroy(self)
if self.__manualSound is not None:
self.__manualSound.stop()
if self.__gearSound is not None:
self.__gearSound.stop()
示例7: stop
# 需要导入模块: from AvatarInputHandler.CallbackDelayer import CallbackDelayer [as 别名]
# 或者: from AvatarInputHandler.CallbackDelayer.CallbackDelayer import destroy [as 别名]
def stop(self):
self.__isStarted = False
FMOD.setEventsParam('viewPlayMode', 0)
self.__removeBattleCtrlListeners()
for control in self.__ctrls.itervalues():
control.destroy()
replayCtrl = BattleReplay.g_replayCtrl
if replayCtrl.isRecording:
replayCtrl.setPlayerVehicleID(0)
self.onCameraChanged = None
self.__targeting.enable(False)
self.__killerVehicleID = None
g_guiResetters.remove(self.__onRecreateDevice)
BigWorld.player().arena.onPeriodChange -= self.__onArenaStarted
from account_helpers.settings_core.SettingsCore import g_settingsCore
g_settingsCore.onSettingsChanged -= self.__onSettingsChanged
CallbackDelayer.destroy(self)
示例8: CombatEquipmentManager
# 需要导入模块: from AvatarInputHandler.CallbackDelayer import CallbackDelayer [as 别名]
# 或者: from AvatarInputHandler.CallbackDelayer.CallbackDelayer import destroy [as 别名]
class CombatEquipmentManager(object):
def testArtyStrike(self, id = 33, offset = Vector3(0, 0, 0)):
if not IS_DEVELOPMENT:
return
else:
p = Vector3(BigWorld.camera().position)
d = BigWorld.camera().direction
collRes = BigWorld.wg_collideSegment(BigWorld.player().spaceID, p, p + d * 1000, 18, lambda matKind, collFlags, itemId, chunkId: collFlags & 8)
if collRes is None:
return
strikePos = collRes[0]
vDir = Vector2(d.x, d.z)
vDir.normalise()
self.setEquipmentApplicationPoint(id, strikePos + offset, vDir)
return
def __init__(self):
self.__callbackDelayer = CallbackDelayer()
self.__selectedAreas = {}
self.__wings = {}
if _ENABLE_DEBUG_DRAW:
self.debugPolyLine = Flock.DebugPolyLine()
self.debugPoints = []
self.debugDirs = []
def onBecomePlayer(self):
pass
def onBecomeNonPlayer(self):
for area in self.__selectedAreas.itervalues():
area.destroy()
for wing in self.__wings.itervalues():
wing.destroy()
self.__callbackDelayer.destroy()
self.__selectedAreas = {}
self.__wings = {}
def updateBomberTrajectory(self, equipmentID, team, curTime, curPos, curDir, nextTime, nextPos, nextDir, isDroppingPoint):
if _ENABLE_DEBUG_LOG:
LOG_DEBUG('===== updateBomberTrajectory =====')
LOG_DEBUG(equipmentID, team)
LOG_DEBUG(curPos, curDir, curTime)
LOG_DEBUG(nextPos, nextDir, nextTime)
LOG_DEBUG(isDroppingPoint)
moveDir = nextPos - curPos
moveDir.normalise()
nextDir3d = Vector3(nextDir.x, moveDir.y, nextDir.y)
nextDir3d.normalise()
startP = BombersWing.CurveControlPoint(curPos, Vector3(curDir.x, 0, curDir.y), curTime)
nextP = BombersWing.CurveControlPoint(nextPos, nextDir3d, nextTime)
points = (startP, nextP)
wingID = (team, equipmentID)
wing = self.__wings.get(wingID)
if wing is None or wing.withdrawn:
if wing is not None:
wing.destroy()
self.__wings[wingID] = BombersWing.BombersWing(equipmentID, points)
if _ENABLE_DEBUG_DRAW:
self.debugPoints.append(curPos)
self.debugDirs.append(curDir)
else:
wing.addControlPoint(points, isDroppingPoint)
if _ENABLE_DEBUG_DRAW:
self.debugPoints.append(nextPos)
self.debugDirs.append(nextDir)
self.debugPoints.append(nextPos + Vector3(nextDir.x, 0, nextDir.y) * 10)
self.debugPoints.append(nextPos)
self.debugPolyLine.set(self.debugPoints)
return
def showHittingArea(self, equipmentID, pos, dir, time):
if _ENABLE_DEBUG_LOG:
LOG_DEBUG('===== showHittingArea =====')
LOG_DEBUG(equipmentID)
LOG_DEBUG(pos, dir, time)
correctedCoords = tuple((int(x * 1000.0) for x in pos.tuple()))
areaUID = (int(equipmentID), correctedCoords)
if areaUID in self.__selectedAreas:
return
eq = vehicles.g_cache.equipments()[equipmentID]
if BattleReplay.isPlaying():
BigWorld.callback(0.0, functools.partial(self.__showMarkerCallback, eq, pos, dir, time, areaUID))
else:
self.__showMarkerCallback(eq, pos, dir, time, areaUID)
def __delayedAreaDestroy(self, areaUID):
area = self.__selectedAreas.pop(areaUID, None)
if area is not None:
area.destroy()
return
def __showMarkerCallback(self, eq, pos, dir, time, areaUID):
timer = round(time - BigWorld.serverTime())
area = self.__selectedAreas.pop(areaUID, None)
if area is not None:
area.destroy()
self.__selectedAreas[areaUID] = self.createEquipmentSelectedArea(pos, dir, eq)
#.........这里部分代码省略.........
示例9: destroy
# 需要导入模块: from AvatarInputHandler.CallbackDelayer import CallbackDelayer [as 别名]
# 或者: from AvatarInputHandler.CallbackDelayer.CallbackDelayer import destroy [as 别名]
def destroy(self):
CallbackDelayer.destroy(self)
for bomber in self.__bombers:
bomber.destroy()
示例10: onLeaveWorld
# 需要导入模块: from AvatarInputHandler.CallbackDelayer import CallbackDelayer [as 别名]
# 或者: from AvatarInputHandler.CallbackDelayer.CallbackDelayer import destroy [as 别名]
def onLeaveWorld(self):
self.models = []
FlockLike.destroy(self)
CallbackDelayer.destroy(self)
示例11: destroy
# 需要导入模块: from AvatarInputHandler.CallbackDelayer import CallbackDelayer [as 别名]
# 或者: from AvatarInputHandler.CallbackDelayer.CallbackDelayer import destroy [as 别名]
def destroy(self):
self.__avatar = None
CallbackDelayer.destroy(self)
示例12: DetachedTurret
# 需要导入模块: from AvatarInputHandler.CallbackDelayer import CallbackDelayer [as 别名]
# 或者: from AvatarInputHandler.CallbackDelayer.CallbackDelayer import destroy [as 别名]
class DetachedTurret(BigWorld.Entity):
allTurrets = list()
def __init__(self):
self.__vehDescr = vehicles.VehicleDescr(compactDescr=self.vehicleCompDescr)
self.filter = BigWorld.WGTurretFilter()
self.__detachConfirmationTimer = SynchronousDetachment(self)
self.__detachConfirmationTimer.onInit()
self.__detachmentEffects = None
self.__hitEffects = {TankComponentNames.TURRET: None,
TankComponentNames.GUN: None}
self.__reactors = []
self.targetFullBounds = True
self.targetCaps = [1]
self.__isBeingPulledCallback = None
def reload(self):
pass
def prerequisites(self):
prereqs = [self.__vehDescr.turret['models']['exploded'], self.__vehDescr.gun['models']['exploded']]
prereqs += self.__vehDescr.prerequisites()
return prereqs
def onEnterWorld(self, prereqs):
self.model = prereqs[self.__vehDescr.turret['models']['exploded']]
self.__gunModel = prereqs[self.__vehDescr.gun['models']['exploded']]
node = self.model.node('HP_gunJoint', Math.Matrix())
node.attach(self.__gunModel)
self.__detachConfirmationTimer.onEnterWorld()
self.__vehDescr.keepPrereqs(prereqs)
turretDescr = self.__vehDescr.turret
if self.isUnderWater == 0:
self.__detachmentEffects = _TurretDetachmentEffects(self.model, turretDescr['turretDetachmentEffects'], self.isCollidingWithWorld == 1)
self.__reactors.append(self.__detachmentEffects)
else:
self.__detachmentEffects = None
self.__hitEffects[TankComponentNames.TURRET] = turretHitEffects = _HitEffects(self.model)
self.__hitEffects[TankComponentNames.GUN] = gunHitEffects = _HitEffects(self.__gunModel)
self.__reactors.append(turretHitEffects)
self.__reactors.append(gunHitEffects)
self.__componentsDesc = (self.__vehDescr.turret, self.__vehDescr.gun)
for desc in self.__componentsDesc:
desc['hitTester'].loadBspModel()
from AvatarInputHandler.CallbackDelayer import CallbackDelayer
self.__isBeingPulledCallback = CallbackDelayer()
self.__isBeingPulledCallback.delayCallback(self.__checkIsBeingPulled(), self.__checkIsBeingPulled)
DetachedTurret.allTurrets.append(self)
def onLeaveWorld(self):
DetachedTurret.allTurrets.remove(self)
self.__detachConfirmationTimer.cancel()
self.__detachConfirmationTimer = None
for reactor in self.__reactors:
if reactor is not None:
reactor.destroy()
self.__isBeingPulledCallback.destroy()
self.__isBeingPulledCallback = None
def onStaticCollision(self, energy, point, normal):
if self.__detachmentEffects is not None:
surfaceMaterial = calcSurfaceMaterialNearPoint(point, normal, self.spaceID)
effectIdx = surfaceMaterial.effectIdx
groundEffect = True
distToWater = BigWorld.wg_collideWater(self.position, surfaceMaterial.point)
if distToWater != -1:
vel = Math.Vector3(self.velocity).length
if vel < _MIN_COLLISION_SPEED:
groundEffect = False
effectIdx = material_kinds.EFFECT_MATERIAL_INDEXES_BY_NAMES['water']
self.__detachmentEffects.notifyAboutCollision(energy, point, effectIdx, groundEffect, self.isUnderWater)
def showDamageFromShot(self, points, effectsIndex):
(maxHitEffectCode, decodedPoints,) = DamageFromShotDecoder.decodeHitPoints(points, self.__vehDescr)
for shotPoint in decodedPoints:
hitEffects = self.__hitEffects.get(shotPoint.componentName)
if hitEffects is not None:
hitEffects.showHit(shotPoint, effectsIndex)
else:
LOG_ERROR("Detached turret got hit into %s component, but it's impossible" % shotPoint.componentName)
def collideSegment(self, startPoint, endPoint, skipGun = False):
res = None
#.........这里部分代码省略.........
示例13: destroy
# 需要导入模块: from AvatarInputHandler.CallbackDelayer import CallbackDelayer [as 别名]
# 或者: from AvatarInputHandler.CallbackDelayer.CallbackDelayer import destroy [as 别名]
def destroy(self):
CallbackDelayer.destroy(self)
if self.__turretSound is not None:
self.__turretSound.stop()
return