def __onGunMarkerStateChanged(self, markerType, position, direction, collision):
     if self.__isShotResultHintActive and self.__inSniperMode:
         shotResultResolver = gun_marker_ctrl.createShotResultResolver()
         result = shotResultResolver.getShotResult(position, collision, direction, excludeTeam=self._avatar.team)
         piercing_chance_hint = self._SHOT_RESULT_TO_PIERCING_CHANCE_HINT.get(result)
         self.__changePiercingHint(piercing_chance_hint)
     else:
         self.__changePiercingHint(self._PIERCING_CHANCE_HINT_HIDE_VALUE)
예제 #2
0
 def __init__(self, parentObj):
     super(ShotResultIndicatorPlugin, self).__init__(parentObj)
     self.__isEnabled = False
     self.__mapping = defaultdict(lambda: False)
     self.__playerTeam = 0
     self.__cache = defaultdict(str)
     self.__colors = None
     self.__shotResultResolver = gun_marker_ctrl.createShotResultResolver()
     return