コード例 #1
0
        void Awake()
        {
            if (_player != null)
            {
                _player = gameObject.GetComponentInParent <RealmYouTubeVideoPlayer> ();
            }

            Debug.Assert(_player != null, "Player is missing");

            _player.OnPlay += OnVideoPlay;

            _ui            = gameObject.GetComponent <RealmPlayPauseButtonUI> ();
            _buttonHandler = gameObject.GetComponent <RealmButtonWithClickMeter> ();

            _buttonHandler.OnClick.AddListener(OnClick);
        }
コード例 #2
0
        protected override void Init()
        {
            base.Init();

            if (_player != null)
            {
                _player = gameObject.GetComponentInParent <RealmYouTubeVideoPlayer> ();
            }

            Debug.Assert(_player != null, "Player is missing");

            if (_player != null)
            {
                _player.OnMute += OnPlayerMute;
            }

            _ui = gameObject.GetComponent <RealmMuteButtonUI> ();
        }