// SpecificTaskPage public void gotoSpecificTaskPage(string taskId) { SpecificTaskView script = _specificTaskPage.GetComponent <SpecificTaskView> (); // show loading page DataStore.Get <Task> ("1", task => { if (task.Available) { _activePageForward(this._specificTaskPage); script.EnterPage(task); } else { OpenPopup_Error("Data Error", "Can't find data about the specific task with id: " + task.Id); } }) ; }
// Use this for initialization void Awake() { this._buttonGroup = this.transform.FindChild("ButtonGroup").gameObject; this._textField = this.transform.FindChild("Name").GetComponent <Text>(); this._regularToggle = this.transform.FindChild("Toggle").GetComponent <Toggle>(); this._bonusToggle = this.transform.FindChild("Toggle-Bonus").GetComponent <Toggle>(); this._warningButton = this._buttonGroup.transform.FindChild("Warning").GetComponent <Button> (); this._infoButton = this._buttonGroup.transform.FindChild("Info").GetComponent <Button> (); this._helpButton = this._buttonGroup.transform.FindChild("Help").GetComponent <Button> (); this._toolButton = this._buttonGroup.transform.FindChild("Tool").GetComponent <Button> (); this._page = GameObject.Find("Specific Task View").transform.GetComponent <SpecificTaskView> (); this._pageswapper = GameObject.FindWithTag("Pageswapper").GetComponent <Pageswapper>(); _regularToggle.onValueChanged.AddListener(_toggleListener); _bonusToggle.onValueChanged.AddListener(_toggleListener); // TODO: _warningButton.onClick.AddListener(_infoListener); _infoButton.onClick.AddListener(_infoListener); //_helpButton.onClick.AddListener (_pageSwapper.dostuff); //_toolButton.onClick.AddListener (_pageSwapper.dostuff); }
private void _leaveSpecificTaskPage() { SpecificTaskView script = _specificTaskPage.GetComponent <SpecificTaskView> (); script.LeavePage(); }