Example #1
0
        protected virtual void OnTerminatedMission(MissionEventArgs e)
        {
            EventHandler <MissionEventArgs> handler = TerminatedMission;

            if (handler != null)
            {
                handler(this, e);
            }
        }
Example #2
0
 public void OnTerminatedMission(object sender, MissionEventArgs e)
 {
     try
     {
         var writer = new FileIO(_outputFilePath);
         writer.Write(string.Format("{0} {1} {2}", X, Y, Direction.ToDirection()));
     }
     catch (Exception ex)
     {
         var msg = string.Format("{0}: OnTerminatedMission {1}", this.GetType().Name, ex.Message);
         _loger.Error(msg);
     }
 }
        private void OnDisplayBrief(object sender, MissionEventArgs e)
        {
            //TODO Resize Start Popup to changing screen size.
            //_popup.transform.position = new Vector3(x: Screen.width / 2.0F, y: Screen.height / 2.0F);
            //_popup.transform.localScale = new Vector3(2.0F, 2.0F);

            _popup = gameObject.transform.GetChild(0).gameObject;
            _popup.SetActive(true);

            var minutes = Mathf.Floor(e.MissionLength / 60).ToString("00");
            var seconds = (e.MissionLength % 60).ToString("00");

            MissionNumberText.text =
                string.Format("Mission {0}", e.MissionNumber);
            DescriptionText.text = e.MissionBrief + "\nMission Length: " +
                                   minutes + ":" + seconds;
            _popup.SetActive(true);
        }
Example #4
0
 private void OnMetaDataLoaded(object sender, MissionEventArgs e)
 {
     Mission.Lifecycle.EventManager.OnInitialize(ParticipantBehavior.Participant.CurrentMission);
 }