public PanelNoticeStatus(PanelNoticeStatus panelNoticeStatus)
 {
     this.Message  = panelNoticeStatus.Message;
     this.FontSize = panelNoticeStatus.FontSize;
     this.Color    = panelNoticeStatus.Color;
     this.Duration = panelNoticeStatus.Duration;
 }
예제 #2
0
        public override bool ReadEvents(string[] headerArray, string dataStr)
        {
            // Notice of a Panel
            if (headerArray[1] == TrialPlaybackCommon.DataType1PanelNotice)
            {
                PlaybackPanelNoticeEvent panelNotice = new PlaybackPanelNoticeEvent();

                string[] dataArray = dataStr.Split('\t');

                string message  = Regex.Unescape(dataArray[0]);
                int    fontSize = int.Parse(dataArray[1]);
                Color  color    = new Color(float.Parse(dataArray[2]), float.Parse(dataArray[3]), float.Parse(dataArray[4]), float.Parse(dataArray[5]));
                float  duration = float.Parse(dataArray[6]);

                PanelNoticeStatus panelNoticeStatus = new PanelNoticeStatus(message, fontSize, color, duration);

                panelNotice.PanelNoticeStatus = panelNoticeStatus;
                panelNotice.Destination       = this.destination;

                PlaybackPanelNoticeEventList panelNoticeEventList = new PlaybackPanelNoticeEventList();
                panelNoticeEventList.ElapsedTime = float.Parse(headerArray[0]);
                panelNoticeEventList.EventList.Add(panelNotice);

                this.eventLists.Add(panelNoticeEventList);

                return(true);
            }

            return(false);
        }
        private void ShowNotice(PanelNoticeStatus panelNoticeStatus)
        {
            this.noticePanel.SetActive(true);

            noticeText.text     = panelNoticeStatus.Message;
            noticeText.fontSize = panelNoticeStatus.FontSize;
            noticeText.color    = panelNoticeStatus.Color;

            this.hideTime = UnityEngine.Time.time + panelNoticeStatus.Duration;

            StartCoroutine(this.HideNotice());             // Hide
        }
예제 #4
0
        public static string GetDataLine(string elapsedTime, PanelNoticeStatus panelNoticeStatus)
        {
            string dataLine = elapsedTime + "," + TrialPlaybackCommon.DataType1PanelNotice;

            dataLine += "\t" +
                        Regex.Escape(panelNoticeStatus.Message) + "\t" +
                        panelNoticeStatus.FontSize + "\t" +
                        panelNoticeStatus.Color.r + "\t" + panelNoticeStatus.Color.g + "\t" + panelNoticeStatus.Color.b + "\t" + panelNoticeStatus.Color.a + "\t" +
                        panelNoticeStatus.Duration;

            return(dataLine);
        }
예제 #5
0
        private string CreatePanelNoticeDataLine(PanelNoticeStatus panelNoticeStatus)
        {
            // Notice of a Panel
            string dataLine = this.GetHeaderElapsedTime() + "," + TrialPlaybackCommon.DataType1PanelNotice;

            dataLine += "\t" +
                        Regex.Escape(panelNoticeStatus.Message) + "\t" +
                        panelNoticeStatus.FontSize + "\t" +
                        panelNoticeStatus.Color.r + "\t" + panelNoticeStatus.Color.g + "\t" + panelNoticeStatus.Color.b + "\t" + panelNoticeStatus.Color.a + "\t" +
                        panelNoticeStatus.Duration;

            return(dataLine);
        }
예제 #6
0
        public PlaybackPanelNoticeEventList(PlaybackPanelNoticeEventList panelNoticeEventList)
        {
            this.ElapsedTime = panelNoticeEventList.ElapsedTime;
            this.EventList   = new List <PlaybackPanelNoticeEvent>();

            foreach (PlaybackPanelNoticeEvent panelNoticeEventOrg in panelNoticeEventList.EventList)
            {
                PanelNoticeStatus panelNoticeStatus = new PanelNoticeStatus(panelNoticeEventOrg.PanelNoticeStatus);
                GameObject        destination       = panelNoticeEventOrg.Destination;

                PlaybackPanelNoticeEvent panelNoticeEvent = new PlaybackPanelNoticeEvent();
                panelNoticeEvent.PanelNoticeStatus = panelNoticeStatus;
                panelNoticeEvent.Destination       = destination;

                this.EventList.Add(panelNoticeEvent);
            }
        }
 public void OnPanelNoticeChange(PanelNoticeStatus panelNoticeStatus)
 {
     base.AddDataLine(PlaybackPanelNoticeEventController.GetDataLine(this.GetHeaderElapsedTime(), panelNoticeStatus));
 }
 public void OnPanelNoticeChange(PanelNoticeStatus panelNoticeStatus)
 {
     this.ShowNotice(panelNoticeStatus);
 }
예제 #9
0
 public void OnPanelNoticeChange(PanelNoticeStatus panelNoticeStatus)
 {
     this.dataLines.Add(this.CreatePanelNoticeDataLine(panelNoticeStatus));
 }