예제 #1
0
        private void UpdateCheckpoints()
        {
            var boundingSphere             = MySession.PlayerShip.WorldVolume;
            MyMissionLocation raceLocation = m_raceLocations[m_currentCheckPointIndex];

            if (raceLocation.Entity.GetIntersectionWithSphere(ref boundingSphere))
            {
                if (CheckpointReached != null)
                {
                    CheckpointReached(raceLocation.Entity, m_currentCheckPointIndex);
                }

                RemovelabelFormCurrentCheckPoint();

                m_currentCheckPointIndex++;
                if (m_currentCheckPointIndex >= m_raceLocations.Count)
                {
                    Success();
                    m_currentCheckPointIndex--;
                }
                else
                {
                    AddLabelToCurrentCheckPoint();
                    MyHud.ShowGPSPathToNextObjective(false);
                }
            }
        }
예제 #2
0
        public override void Load()
        {
            m_succesDialogStarted   = false;
            m_successDialogFinished = false;
            if (RequiresDrone)
            {
                MyGuiScreenGamePlay.Static.CameraContrlolledObjectChanged += Static_CameraContrlolledObjectChanged;
                if (MyGuiScreenGamePlay.Static.CameraAttachedTo != MyCameraAttachedToEnum.Drone)
                {
                    AddDroneNotification();
                }
            }
            m_objectiveStartTime = MyMinerGame.TotalGamePlayTimeInMilliseconds;
            MySession.Static.EventLog.AddSubmissionAvailable(ID);

            MyMwcLog.WriteLine("Submission " + NameTemp + " loaded.");
            base.Load();

            // Clear player notifications (so that ie. Travel notification can change color immediately)
            MySession.PlayerShip.ClearNotifications();

            if (SuccessDialogId != null)
            {
                MyDialogues.OnDialogueFinished += OnDialogueFinished;
            }

            MyHud.ShowGPSPathToNextObjective(false);


            if (MarkMissionEntities)
            {
                foreach (var item in MissionEntityIDs)
                {
                    SetLocationVisibility(true, MyScriptWrapper.GetEntity(item), MyGuitargetMode.Objective);
                }
            }
        }