Beispiel #1
0
 def _createArcadeMarker(self,
                         markerType,
                         dataProvider,
                         components=None,
                         name=_CONSTANTS.ARCADE_GUN_MARKER_NAME,
                         linkage=_CONSTANTS.DEFAULT_GUN_MARKER_LINKAGE):
     component = self._findComponent(markerType, dataProvider, components,
                                     name)
     if component is None:
         component = _components.DefaultGunMarkerComponent(
             markerType, _VIEW_ID.ARCADE, name, linkage, dataProvider)
     return component
Beispiel #2
0
 def _createSniperMarker(self,
                         markerType,
                         dataProvider,
                         components=None,
                         name=_CONSTANTS.SNIPER_GUN_MARKER_NAME,
                         linkage=_CONSTANTS.GUN_MARKER_LINKAGE):
     component = self._findComponent(markerType, dataProvider, components,
                                     name)
     if component is None:
         component = _components.DefaultGunMarkerComponent(
             markerType, _VIEW_ID.SNIPER, name, linkage, dataProvider)
     return component
Beispiel #3
0
def create(self, markersInfo, vehicleInfo, components=None):
    if vehicleInfo.isSPG():
        dataProvider = markersInfo.serverMarkerDataProvider if markersInfo.isServerMarkerActivated else markersInfo.clientMarkerDataProvider
        markerType = GUN_MARKER_TYPE.SERVER if markersInfo.isServerMarkerActivated else GUN_MARKER_TYPE.CLIENT
        component = self._findComponent(markerType, dataProvider, components,
                                        _CONSTANTS.SNIPER_GUN_MARKER_NAME)
        if component is None:
            component = _components.DefaultGunMarkerComponent(
                markerType, _VIEW_ID.SNIPER, _CONSTANTS.SNIPER_GUN_MARKER_NAME,
                _CONSTANTS.GUN_MARKER_LINKAGE, dataProvider)
        return component,
    elif markersInfo.isEnabledInVideoMode:
        return self._createVideoMarker(GUN_MARKER_TYPE.CLIENT,
                                       markersInfo.clientMarkerDataProvider,
                                       components),
    else:
        return tuple()