예제 #1
0
 private void HandleOptionSelected(HomeQuizOptionView optionView)
 {
     if (optionView.IsSelected)
     {
         if (OnQuizSelectedEvent != null)
         {
             OnQuizSelectedEvent(optionView.Data);
         }
     }
 }
예제 #2
0
        private void AddQuizItem(QuizVO quiz)
        {
            HomeQuizOptionView optionView = _homeQuizOptionFactory.Create();

            optionView.OptionSelectionChangedEvent += HandleOptionSelected;
            optionView.SetData(quiz);

            RectTransform optionTransform = optionView.gameObject.GetComponent <RectTransform>();

            optionTransform.SetParent(container);
            optionTransform.localScale = Vector3.one;
            optionTransform.SetInsetAndSizeFromParentEdge(UnityEngine.RectTransform.Edge.Left, 0, container.rect.size.x);
        }