示例#1
0
 public void OnRowDoubleClick(InteractionStoryFiller row)
 {
     if (closeStoryScreenEvent != null)
     {
         closeStoryScreenEvent.RaiseEvent();
         if (onStorySelectEvent != null)
         {
             onStorySelectEvent.RaiseEvent(row.Story);
         }
     }
 }
示例#2
0
        public void OnCategoryRowSelected(InteractionStoryFiller row)
        {
            var story = row.Story;
            var task  = story.Tasks.Find(o => o.IsDone == false);

            // set the right information
            storyTitle.StringReference = story ? story.Title : null;
            // TODO see if we need a title
            taskTitle.StringReference       = task ? task.Description : null;
            taskDescription.StringReference = task ? task.Description : null;

            if (panel)
            {
                panel.SetActive(true);
            }
        }
示例#3
0
        public void Add(StorySO story)
        {
            InteractionStoryFiller row = Instantiate(storyRowPrefab, Vector3.zero, Quaternion.identity);

            row.categoryManager = this;

            selectedRow = row;

            var trans = row.transform;

            trans.SetParent(transform);
            trans.localScale = Vector3.one;

            // fill the in the item in the story log.
            row.Set(story);
            row.FillInteractionPanel();
            m_RowItems.Add(row);
        }
示例#4
0
        public void OnRowSelected(InteractionStoryFiller row)
        {
            if (selectedRow != null)
            {
                selectedRow.Deselect();
            }

            selectedRow = row;
            selectedRow.Select();

            ResetRows();
            // row.background.sprite = rowActive;
            int index   = row.transform.GetSiblingIndex();
            var rowItem = index < m_RowItems.Count ? m_RowItems[index] : null;

            if (rowItem)
            {
                rowItem.Select();
                manager.OnCategoryRowSelected(rowItem);
            }
        }
示例#5
0
 public void OnRowExit(InteractionStoryFiller row)
 {
     ResetRows();
 }
示例#6
0
 public void OnRowEnter(InteractionStoryFiller row)
 {
     ResetRows();
     // if(selectedRow == null || row != selectedRow)
     // row.background.sprite = rowHover;
 }
示例#7
0
 public void Subscribe(InteractionStoryFiller row)
 {
     m_RowItems.Add(row);
 }