Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /// <summary>
- /// On initializing the UIPage.
- /// </summary>
- protected override void OnInitPage()
- {
- base.OnInitPage();
- takePhotoButton.OnClick = () =>
- {
- System.Action action = () =>
- {
- if (InstructionStateManager.GetState(InstructionStateManager.StateDictID.HasEditorTutorial) != InstructionStateManager.Value.FINISHED)
- {
- InstructionStateManager.SetState(InstructionStateManager.StateDictID.HasEditorTutorial, InstructionStateManager.Value.STARTED);
- this.ReportBack(true);
- }
- else
- {
- CreateNewMapObject(CameraManager.CaptureFrame());
- }
- EditorManager.Instance.SaveCurrentProject(false);
- };
- if (EditorManager.EditingProject.LoadedAndPlayable())
- {
- action.Invoke();
- }
- else
- {
- StartCoroutine(WaitLoadingCo(action));
- }
- };
- UIEventListener listener = UIEventListener.AssignUIEventListener(this.photoDisplayObject, this.MyUIPage.GetComponent<CanvasEventCaller>());
- listener.PointerUp = delegate { this.UpdateFocusPoint(); };
- // On clicking player icon.
- listener = UIEventListener.AssignUIEventListener(this.playerIconCollider.gameObject, this.MyUIPage.GetComponent<CanvasEventCaller>());
- listener.PointerDown = delegate { this.OnClickDownPlayer(); };
- playerScaleSlider.onValueChanged.AddListener(OnScaleSliderValueChanged);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement