Exemple #1
0
    void Awake()
    {
        me = this;
        this._pauseScript = this.gameObject.AddComponent<GameFramePause>();
        _templete.gameObject.SetActive(false);
        _btnPre.onClick.AddListener(OnPreFrameClick);
        _btnNext.onClick.AddListener(OnNextFrameClick);
        _btnPlay.onClick.AddListener(PlayTimeLine);
        _btnPause.onClick.AddListener(PauseTimeLine);
        this._Slider.onValueChanged.AddListener(this.OnSliderValueChanged);
        this._Slider.mOnPointerDown.AddListener(this.OnPointerDown);
        this._Slider.mOnPointerDown.AddListener(this.OnPointerUp);

        _btnHide.onClick.AddListener(OnClickHideShow);
        _btnShow.onClick.AddListener(OnClickHideShow);
    }
Exemple #2
0
 private void LoadShowPanel()
 {
     _testTimeLine.Play();
     if (this._view == null)
     {
         GameObject obj = Resources.Load<GameObject>("PhoneTimeLineUi");
         GameObject ui = GameObject.Instantiate(obj, _Canvas, false);
         var rectForm = ui.GetComponent<RectTransform>();
         var offmini = rectForm.offsetMin;
         var offmax = rectForm.offsetMax;
         rectForm.offsetMax = Vector2.zero;
         rectForm.offsetMin = Vector2.zero;
         rectForm.localScale = Vector3.one;
         rectForm.localPosition = Vector3.zero;
         this._view = ui.GetComponent<PhoneTimeLineUi>();
     }
     this._view.transform.SetAsLastSibling();
     this._view.gameObject.SetActive(true);
     this.TestUI.SetActive(false);
     this._view.Init();
 }