private void Start() { trackerGroupTweener = GetComponent <AlphaTweener>(); timelineDirector = timeline?.GetComponent <TweenerDirector>(); pyramidDirector = pyramid?.GetComponent <TweenerDirector>(); UpdateTrackerUsage(usePyramid, useTimeline); }
private void Awake() { m_Toggle = GetComponent <Toggle>(); m_IsOn = m_Toggle.isOn; m_TweenerDirector = GetComponent <TweenerDirector>(); m_TweenerDirector.Seek(m_IsOn ? 1 : 0); }
private async Task PlaySpeechBubbleAudio(AudioClip clip, TweenerDirector tweener) { float duration = 0; foreach (Tweener tween in tweener.tweeners) { duration = duration < tween.delayTime + tween.duration ? tween.delayTime + tween.duration : duration; } tweener.PlayForwardsAsync(); await Task.Delay(Mathf.FloorToInt((duration) * 1000) - 800); await m_AudioService.PlayAudioClipAsync(clip, AudioChannels.Assistant); }
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(); }