示例#1
0
 private void Awake()
 {
     m_Toggle          = GetComponent <Toggle>();
     m_IsOn            = m_Toggle.isOn;
     m_TweenerDirector = GetComponent <TweenerDirector>();
     m_TweenerDirector.Seek(m_IsOn ? 1 : 0);
 }
示例#2
0
        public override void OnInspectorGUI()
        {
            TweenerDirector target = (TweenerDirector)this.target;

            DrawDefaultInspector();

            EditorGUI.BeginDisabledGroup(Application.isPlaying);

            EditorGUI.BeginChangeCheck();
            m_Time = EditorGUILayout.Slider(s_Style.time, m_Time, 0f, 1f);
            if (EditorGUI.EndChangeCheck())
            {
                target.Seek(m_Time);
            }

            EditorGUI.EndDisabledGroup();
        }
示例#3
0
 public async Task Play()
 {
     m_TweenerDirector.Seek(0);
     await m_TweenerDirector.PlayForwardsAsync();
 }