Пример #1
0
 public ConstArg(
     IDestroyedTargetReserveAdaptor adaptor
     ) : base(
         adaptor
         )
 {
 }
        public override void SetUpReference()
        {
            if (destroyedTargetReserveAdaptor != null)
            {
                thisDestroyedTargetReserveAdaptor = destroyedTargetReserveAdaptor;
            }
            if (popUIReserveAdaptor != null)
            {
                thisPopUIReserveAdaptor = popUIReserveAdaptor;
            }

            IDestroyedTargetReserve destroyedTargetReserve = thisDestroyedTargetReserveAdaptor.GetDestroyedTargetReserve();

            thisShootingTarget.SetDestroyedTargetReserve(destroyedTargetReserve);

            IPopUIReserve popUIReserve = thisPopUIReserveAdaptor.GetPopUIReserve();

            thisShootingTarget.SetPopUIReserve(popUIReserve);

            IGameStatsTracker tracker = thisGameStatsTrackerAdaptor.GetTracker();

            thisShootingTarget.SetGameStatsTracker(tracker);

            IShootingManager shootingManager = thisShootingManagerAdaptor.GetShootingManager();

            thisShootingTarget.SetShootingManager(shootingManager);

            IShootingTargetNormalHitDetector normalHitDetector = thisNormalHitDetectorAdaptor.GetShootingTargetNormalHitDetector();

            thisShootingTarget.SetShootingTargetNormalHitDetector(normalHitDetector);
            normalHitDetector.SetShootingTarget(thisShootingTarget);

            if (thisCriticalHitDetectorAdaptor != null)
            {
                IShootingTargetCriticalHitDetector criticalHitDetector = thisCriticalHitDetectorAdaptor.GetShootingTargetCriticalHitDetector();
                thisShootingTarget.SetShootingTargetCriticalHitDetector(criticalHitDetector);
                criticalHitDetector.SetShootingTarget(thisShootingTarget);
            }

            thisAudioManager = thisAudioManagerAdaptor.GetAudioManager();
        }
 public void SetDestroyedTargetReserveAdaptor(IDestroyedTargetReserveAdaptor adaptor)
 {
     thisDestroyedTargetReserveAdaptor = adaptor;
 }