Пример #1
0
 def createGunMarker(self, baseCreateGunMarker, isStrategic):
     if self.enabled:
         self.player = getPlayer()
         bo_factory = BOGunMarkersDPFactory()
         if isStrategic:
             if self.replaceOriginalCircle:
                 client = ObserverSPGGunMarkerController(
                     CLIENT, bo_factory.getClientSPGProvider())
             else:
                 client = _SPGGunMarkerController(
                     CLIENT,
                     _GunMarkersDPFactory().getClientSPGProvider())
             server = ObserverSPGGunMarkerController(
                 SERVER, bo_factory.getServerSPGProvider())
         else:
             if self.replaceOriginalCircle:
                 client = _DefaultGunMarkerController(
                     CLIENT, bo_factory.getClientProvider())
             else:
                 client = gun_marker_ctrl._DefaultGunMarkerController(
                     CLIENT,
                     _GunMarkersDPFactory().getClientProvider())
             server = _DefaultGunMarkerController(
                 SERVER, bo_factory.getServerProvider())
         return _GunMarkersDecorator(client, server,
                                     self.replaceOriginalCircle,
                                     self.extraServerLap)
     else:
         return baseCreateGunMarker(isStrategic)
Пример #2
0
 def createGunMarker(isStrategic):
     factory = _GunMarkersDPFactory()
     if isStrategic:
         clientMarker = _SPGGunMarkerController(_MARKER_TYPE.CLIENT, factory.getClientSPGProvider())
         serverMarker = _SPGGunMarkerController(_MARKER_TYPE.SERVER, factory.getServerSPGProvider())
     else:
         clientMarker = _DefaultGunMarkerController(_MARKER_TYPE.CLIENT, factory.getClientProvider()) if not config.data['ReplaceOriginalCircle'] else new_DefaultGunMarkerController(_MARKER_TYPE.CLIENT, factory.getClientProvider())
         serverMarker = new_DefaultGunMarkerController(_MARKER_TYPE.SERVER, factory.getServerProvider())
     return _GunMarkersDecorator(clientMarker, serverMarker)
def new_createGunMarker(isStrategic):
    factory = _GunMarkersDPFactory()
    if isStrategic:
        clientMarker = _SPGGunMarkerController(_MARKER_TYPE.CLIENT,
                                               factory.getClientSPGProvider())
        serverMarker = _SPGGunMarkerController(_MARKER_TYPE.SERVER,
                                               factory.getServerSPGProvider())
    else:
        clientMarker = _DefaultGunMarkerController(_MARKER_TYPE.CLIENT, factory.getClientProvider()) if not REPLACE_ORIGINAL_CIRCLE else \
                       new_DefaultGunMarkerController(_MARKER_TYPE.CLIENT, factory.getClientProvider())
        serverMarker = new_DefaultGunMarkerController(
            _MARKER_TYPE.SERVER, factory.getServerProvider())
    return _GunMarkersDecorator(clientMarker, serverMarker)
Пример #4
0
def createGunMarker(func, isStrategic):
    factory = _GunMarkersDPFactory()
    if isStrategic:
        clientMarker = _SPGGunMarkerController(_MARKER_TYPE.CLIENT,
                                               factory.getClientSPGProvider())
        serverMarker = _SPGGunMarkerController(_MARKER_TYPE.SERVER,
                                               factory.getServerSPGProvider())
        clientMarkerFocus = _FocusSPGGunMarkerController(
            GUN_MARKER_TYPE_CLIENT_FOCUS, factory.getClientSPGFocusProvider())
        serverMarkerFocus = _FocusSPGGunMarkerController(
            GUN_MARKER_TYPE_SERVER_FOCUS, factory.getServerSPGFocusProvider())
    else:
        clientMarker = _DefaultGunMarkerController(_MARKER_TYPE.CLIENT,
                                                   factory.getClientProvider())
        serverMarker = _DefaultGunMarkerController(_MARKER_TYPE.SERVER,
                                                   factory.getServerProvider())
        clientMarkerFocus = _FocusGunMarkerController(
            GUN_MARKER_TYPE_CLIENT_FOCUS, factory.getClientFocusProvider())
        serverMarkerFocus = _FocusGunMarkerController(
            GUN_MARKER_TYPE_SERVER_FOCUS, factory.getServerFocusProvider())
    return _NewGunMarkersDecorator(clientMarker, serverMarker,
                                   clientMarkerFocus, serverMarkerFocus)