public override void SetUpReference()
        {
            IPlayerInputManager inputManager = inputManagerAdaptor.GetInputManager();

            thisShootingManager.SetInputManager(inputManager);

            ILaunchPoint launchPoint = launchPointAdaptor.GetLaunchPoint();

            thisShootingManager.SetLaunchPoint(launchPoint);

            ITrajectory trajectory = trajectoryAdaptor.GetTrajectory();

            thisShootingManager.SetTrajectory(trajectory);

            ILandedArrowReserve landedArrowReserve = landedArrowReserveAdaptor.GetLandedArrowReserve();

            thisShootingManager.SetLandedArrowReserve(landedArrowReserve);

            IArrowReserve arrowReserve = arrowReserveAdaptor.GetArrowReserve();

            thisShootingManager.SetArrowReserve(arrowReserve);

            // IArrowTrailReserve arrowTrailReserve = arrowTrailReserveAdaptor.GetArrowTrailReserve();
            // thisShootingManager.SetArrowTrailReserve(arrowTrailReserve);

            ICriticalFlash flash = criticalFlashAdaptor.GetCriticalFlash();

            thisShootingManager.SetCriticalFlash(flash);

            IShootingDataManager shootingDataManager = shootingDataManagerAdaptor.GetShootingDataManager();

            thisShootingManager.SetShootingDataManager(shootingDataManager);
        }
        string GetArrowStateString(IArrow arrow)
        {
            ArrowStateEngine.IState state = arrow.GetCurrentState();
            string        result          = state.GetName();
            IArrowReserve reserve         = arrowReserveAdaptor.GetArrowReserve();

            if (!(state is ArrowStateEngine.NockedState))
            {
                if (state is ArrowStateEngine.FlightState)
                {
                    result += ": " + reserve.GetIndexInFlight(arrow);
                }
                else
                {
                    result += ": " + reserve.GetIndexInReserve(arrow);
                }
            }
            return(result);
        }
Exemple #3
0
        public override void SetUpReference()
        {
            IArrowReserve reserve = thisArrowReserveAdaptor.GetArrowReserve();

            thisArrow.SetArrowReserve(reserve);

            ILaunchPoint launchPoint = thisLaunchPointAdaptor.GetLaunchPoint();

            thisArrow.SetLaunchPoint(launchPoint);

            IShootingManager shootingManager = thisShootingManagerAdaptor.GetShootingManager();

            thisArrow.SetShootingManager(shootingManager);
            thisShootingManager = shootingManager;

            IArrowTrailReserve arrowTrailReserve = thisArrowTrailReserveAdaptor.GetArrowTrailReserve();

            thisArrow.SetArrowTrailReserve(arrowTrailReserve);

            thisAudioManager = thisAudioManagerAdaptor.GetAudioManager();
        }
 /*  */
 void DrawArrowsState(Rect rect)
 {
     if (thisSystemIsReady)
     {
         IArrowReserve arrowReserve = arrowReserveAdaptor.GetArrowReserve();
         IArrow[]      arrows       = arrowReserve.GetArrows();
         string        result       = "";
         foreach (IArrow arrow in arrows)
         {
             result +=
                 "id: " + arrow.GetIndex() + ", " +
                 "state: " + GetArrowStateString(arrow) + ", " +
                 "position: " + arrow.GetPosition().ToString() + ", " +
                 "parent : " + arrow.GetParentName() + "\n";
         }
         GUI.Label(
             rect,
             result
             );
     }
 }
 public void SetArrowReserve(IArrowReserve reserve)
 {
     thisArrowReserve = reserve;
 }