void Awake() { isModalOpen = FindObjectOfType <TrackIsModalOpen>(); towerModalViewService = new TowerModalViewService(ClosePanel); Answer = new DispatchOnSet <int>(); }
void Awake() { isModalOpen = FindObjectOfType <TrackIsModalOpen>(); IsPressed = new DispatchOnSet <bool>(gameObject.GetInstanceID()); IsHighlighted = false; CurrentColorStates = new HashSet <HighlightState>(); }
void Start() { isModalOpen = FindObjectOfType <TrackIsModalOpen>(); questionAnswer = gameObject.GetComponentInChildren <ModalQuestionImpl>(); dropFrontBack = gameObject.GetComponentInChildren <ModalDropFrontBackImpl>(); confirm = gameObject.GetComponentInChildren <ModalConfirmImpl>(); victoriousPlayer = gameObject.GetComponentInChildren <IModalVictoriousPlayerImpl>(); visibility = gameObject.GetComponentInChildren <ModalVisibilityImpl>(); visibility.IsVisible.NotifyOnValueSet(OnVisibilityChanged); visibility.Cancel.NotifyOnValueSet(CancelModal); CancelButton.onClick.AddListener(CancelModal); ClosePanel(); }