public void Open() { if (isOpen) { return; } director?.Play(); isOpen = true; }
// Update is called once per frame void Update() { m_Time = m_Time - Time.deltaTime; if (Input.anyKey && !Input.GetMouseButton(1) && Director.time == 0 && !m_isMenuOpen) { m_Time = -1; } if (m_Time < 0) { m_Time = loopDelay; Director?.Play(); } }
void Update() { if (playerBoyIn && playerGirlIn && !isChangeScene) { playerGirl.SetActive(false); playerBoy.SetActive(false); boyImage.SetActive(true); girlImage.SetActive(true); mDirector.Play(); StartCoroutine("ChangeScene"); isChangeScene = true; } if (Network.m_Actor.isTimeOK && !isLoadScene) { async = SceneManager.LoadSceneAsync("LevelBack"); async.allowSceneActivation = false; isLoadScene = true; } if (async != null) { if (async.progress >= 0.89 && !isAsync) { isAsync = true; Network.m_Actor.isLoadSceneAsync = true; } } if (Network.m_Actor.isReceiveStartReq) { Network.m_Actor.isReceiveStartReq = false; StartCoroutine("WaitToStart"); async.allowSceneActivation = true; } }
//ACTUALLY PLAYS TIMELINE public void PlayTimeline() { if (playerTimelinePosition) { SetPlayerToTimelinePosition(playerTimelinePosition, parentPlayerToPos); } if (characterTransforms.Length > 0) { for (int i = 0; i < characterTransforms.Length; i++) { SetCharacterPosition(i); } } if (playableDirector) { playableDirector.Play(); } timelinePlaying = true; StartCoroutine(WaitForTimelineToFinish()); }
private void Update() { //アニメーション制御用 if (SetFadeTitleBgm && !_changeSetFadeTitleBgm) { _changeSetFadeTitleBgm = true; Debug.Log("FadeTitleBGM"); AudioManager.FadeOut(5.0f); } if (SetPlaySelectStageBgm && !_changeSetPlaySelectStageBgm) { _changeSetPlaySelectStageBgm = true; Debug.Log("FadeStageSelectBGM"); AudioManager.FadeIn(3.0f, "bgm_maoudamashii_cyber29"); } if (_state == StageSelectState.Title && Input.GetMouseButtonDown(0)) { _titleAnimation.Play(); _state = StageSelectState.Opening; //アニメーションを止める StopCoroutine(_clickClickAnimationCoroutine); ClickStartText.color = new Color(0, 0, 0, 0); } if (!SetEnableButton || _changeSetEnableButton) { return; } _changeSetEnableButton = true; _state = StageSelectState.ListView; SelectStageGroup.interactable = true; }
void UpdateView() { if (conversionAmount == 1.0f) { if (!isConversionDone) { isConversionDone = true; symbol.enabled = true; symbolGlow.enabled = true; SpriteAlpha(symbol, 1.0f); SpriteAlpha(converting, 1.0f); particle01.Stop(); particle02.Stop(); playableDirector.Play(); //symbol.GetComponent<Animator } } else { isConversionDone = false; symbol.enabled = false; symbolGlow.enabled = false; if (!particle02.isPlaying) { particle01.Play(); particle02.Play(); } SpriteAlpha(symbol, 0.0f); SpriteAlpha(converting, conversionAmount); } }
public void checkDead() { if (go.GetComponent <HealthBarZombie>().health <= 0) { notifyGuMare(); Dead = true; coin.GetComponent <CoinManager>().updateCoin(1); anim.SetBool("isIdle", false); anim.SetBool("isWalking", false); anim.SetBool("isAttacking", false); anim.SetBool("isDead", true); if (playableDirector != null) { healthbar.SetActive(false); Component[] boxCols = this.GetComponents <BoxCollider>(); foreach (Component boxCol in boxCols) { Destroy(boxCol); } playableDirector.Play(); } TimedSpawn.countkillzombie++; } }
void Start() { var recipeCount = discoveredRecipes.ints.Count; if (recipeCount >= magicNumber1) { milestone1 = true; } else { milestone1 = false; } if (!milestone1) { Debug.Log("Milestone " + gameObject.name + " is " + milestone1); return; } else { Debug.Log("Milestone " + gameObject.name + " is " + milestone1); director = GetComponent <PlayableDirector>(); director.Play(); } }
public void OnTrackableStateChanged( TrackableBehaviour.Status previousStatus, TrackableBehaviour.Status newStatus) { if (newStatus == TrackableBehaviour.Status.DETECTED || newStatus == TrackableBehaviour.Status.TRACKED || newStatus == TrackableBehaviour.Status.EXTENDED_TRACKED) { // Play audio when target is found // audio.Play(); //leavesAudio.Play(); //spellAudio.Play(); wolfDirector.Evaluate(); wolfDirector.Play(); } else { // Stop audio when target is lost // audio.Stop(); vidRawImage.GetComponentInChildren <VideoPlayer>().Stop(); vidCanvas.SetActive(false); wolfDirector.Stop(); } }
private void CheckWinConditions() { if (DidWin) { return; } if (GameManager.Instance.GetBadAssSlider() >= 1.0f) { DidWin = true; SetEnabledInput(false); PlayerInputController.Instance.SetControllEnabled(false); PlayerInputController.Instance.GetCarController().ForceBreak(); CompletedTimeline.Play(); if (LevelManager.Instance.IsLastLevel()) { GoToMainMenu = true; } else { LevelManager.Instance.NextLevel(); } } }
private IEnumerator CorPlayLevelState() { LogUtil.PrintInfo(gameObject, GetType(), "LEVEL STATE change!"); inputDisabler.DisableControls(); if (playable != null) { playable.gameObject.SetActive(true); playable.Play(); yield return(new WaitForSeconds((float)playable.duration)); } if (LEVEL_CHANGER_TYPE.STARTER == type) { inputDisabler.EnableControls(); } else { SceneManager.LoadScene(sceneIndexes.LOADING, LoadSceneMode.Additive); SceneManager.LoadSceneAsync(sceneIndexes.MAIN_MENU); } Destroy(this); }
private void ResetLevelEvent_Handler() { _playableDirector.Stop(); _playableDirector.time = 0; _playableDirector.Play(); }
// Start is called before the first frame update void Start() { playable = gameObject.GetComponent <PlayableDirector>(); light = gameObject.GetComponent <Light>(); bindingDict = new Dictionary <string, PlayableBinding>(); foreach (var bind in playable.playableAsset.outputs) { bindingDict.Add(bind.streamName, bind); } // 动态绑定轨道中的节点 SetGenericBinding // playable.SetGenericBinding(bindingDict["LightTrack1"].sourceObject, light); playable.SetGenericBinding(bindingDict["Animation1"].sourceObject, sphere); // 动态绑定轨道中clip的节点 SetReferenceValue foreach (var track in ((TimelineAsset)playable.playableAsset).GetOutputTracks()) { // track.muted = false; foreach (var clip in track.GetClips()) { LightControlAsset asset = clip.asset as LightControlAsset; if (asset != null) { playable.SetReferenceValue(asset.light.exposedName, light); } ControlPlayableAsset asset2 = clip.asset as ControlPlayableAsset; if (asset2 != null) { playable.SetReferenceValue(asset2.sourceGameObject.exposedName, sphere); } } } playable.SetGenericBinding(bindingDict["ActivationTrack"].sourceObject, null); // playable.RebuildGraph(); // 获取track信息 TimelineAsset timelineAsset = (TimelineAsset)playable.playableAsset; // timelineAsset.DeleteTrack() // timelineAsset.A var count = timelineAsset.outputTrackCount; for (int i = 1; i < count; i++) { TrackAsset asset = timelineAsset.GetOutputTrack(i); var clips = asset.GetClips(); foreach (TimelineClip clip in clips) { var playableAsset = (PlayableAsset)clip.asset; var lightAsset = playableAsset as LightControlAsset; if (lightAsset != null) { // lightAsset.behaviour.OnGraphStop(); } // var behaviout = playableAsset.behaviour; } } // var graphCount = playable.playableGraph.GetOutputCount(); // for (int i = 0; i < graphCount; i++) // { // //// var playable1 = playable.playableGraph.GetRootPlayable(i); // PlayableOutput output = playable.playableGraph.GetOutput(i); // var p1 = output.GetSourcePlayable(); //// p1.GetInputCount(); // Playable i1 = p1.GetInput(1); //// playable.playableAsset //// i1.SetInputWeight(0); // //// output.SetWeight(); // var graph = playable.playableGraph; //// graph // var playable2 = output.GetSourcePlayable(); // } playable.Play(); }
public void PlayTimeline() { StopCoroutines(); Director.Play(); }
public IEnumerator TestTargetBranchExport() { director.Play(); exporter.Recorder.Settings.Scope = ExportScope.TargetBranch; exporter.Recorder.Settings.TargetBranch = cube; yield return(RecordAlembic()); deleteFileList.Add(exporter.Recorder.Settings.OutputPath); var go = TestAbcImported(exporter.Recorder.Settings.OutputPath); yield return(TestCubeContents(go)); }
private void OnTriggerEnter(Collider other) { director.Play(); }
public void Play() { Debug.Log("Playing " + _director.name + " Timeline..."); _director.Play(); }
//開始 void PlayTimeline3() { playableDirector3.Play(); }
//開始 void PlayTimeline1() { playableDirector1.Play(); }
public void ShowAdditionalDialogue() { playableDirector.playableAsset = additionalDialogues; playableDirector.Play(); StartCoroutine(Sleep2(6)); }
protected void DirectorPlay() { playableDirector.playableAsset = playableAsset; playableDirector.Play(); OnDirectorPlay.Invoke(); }
// Play first cutscene public void FirstScene() { player.gameObject.SetActive(true); director.Play(); }
//開始 void PlayTimeline2() { playableDirector2.Play(); }
// Update is called once per frame void Update() { /*Object.transform.eulerAngles += new Vector3(0, -h, 0) * Time.deltaTime; * Object.transform.eulerAngles += new Vector3(v, 0, 0) * Time.deltaTime;*/ foreach (Gamepad gamepad in Gamepad.all) { if (UI.activeSelf) { h = gamepad.rightStick.x.ReadValue(); v = gamepad.rightStick.y.ReadValue(); Object.transform.Rotate(new Vector3(0, 0, -h)); Object.transform.Rotate(new Vector3(-v, 0, 0)); } if (gamepad.buttonSouth.wasPressedThisFrame) { if (IsReady && !UI.activeSelf) { UI.SetActive(true); Object = Instantiate(deskItems[choosing].gameObject, Location); Object.transform.localPosition = Vector3.zero; Object.transform.localEulerAngles = deskItems[choosing].RotationOffset; NameText.text = deskItems[choosing].ItemName; IntroText.text = deskItems[choosing].ItemIntro; } } // Cancel if (gamepad.buttonEast.wasPressedThisFrame) { if (UI.activeSelf) { UI.SetActive(false); Destroy(Object); return; } if (IsUsing && playableDirector.state != PlayState.Playing) { playableDirector.Stop(); playBack.Play(); FacilityManager.UsingDirector = playBack; StageManager.EnablePlayerControl(); deskItems[choosing].Cancel(); IsUsing = false; IsReady = false; } } // DPad Choosing if (IsReady && !UI.activeSelf) { if (gamepad.dpad.left.wasPressedThisFrame) { deskItems[choosing].Cancel(); choosing--; if (choosing < 0) { choosing = deskItems.Count - 1; } deskItems[choosing].Choose(); } if (gamepad.dpad.right.wasPressedThisFrame) { deskItems[choosing].Cancel(); choosing++; if (choosing >= deskItems.Count) { choosing = 0; } deskItems[choosing].Choose(); } } } }
void ShowRaceCountdownAnimation() { raceCountdownTrigger.Play(); }
public override void LooseHp(float damage) { if (!onMovement || !isInvincible) { hp -= 1; switch ((int)hp) { case 5: arena1.SetActive(true); break; case 4: arena2.SetActive(true); break; case 3: arena3.SetActive(true); ChangePlatform(2); break; } if (hp <= 0) { //================================================ StartCoroutine(SoundController.instance.FadeOnExitTheme()); //Will launch an other theme automatically Game.playerData.Boss1KO = true; //================================================ isInvincible = false; isKnocked = true; Instantiate(knockedParticle, transform.position, Quaternion.identity).transform.parent = transform; rendererMat.SetColor("_FirstDColor", hitColor); //================================================ SoundController.instance.SelectYOKAI("KO"); //================================================ //rendererMat.SetColor("_Globalcolor", hitColor); } else { isInvincible = true; invincibleTime = 3f; //rendererMat.EnableKeyword("_EMISSION"); } if (hp < 3 && !isKnocked) { if (!changingPhase) { playableDirector.Play(); GameObject smokeParticleTransition = Instantiate(knockedParticle, arenaPhase1.transform.position, Quaternion.identity); smokeParticleTransition.transform.GetChild(0).localScale = new Vector3(200f, 200f, 200f); Destroy(smokeParticleTransition, 3f); arenaPhase1.SetActive(false); arenaPhase2.SetActive(true); changingPhase = true; } ChangePlatform(1); } if (hp > hpMax / 2) { ChangePlatform(0); } } }
// Start is called before the first frame update void Start() { // Debug.Log("timeline start"); timeline = GetComponent <PlayableDirector>(); timeline.Play(); }
void Start() { diretor.Play(); Debug.Log(ativado); }
override public float Run() { #if UNITY_2017_1_OR_NEWER if (!isRunning) { isRunning = true; if (director != null) { if (method == ActionDirectorMethod.Play) { isRunning = true; if (restart) { director.time = 0f; director.Play(); } else { director.Resume(); } if (willWait) { if (disableCamera) { KickStarter.mainCamera.Disable(); } return((float)director.duration - (float)director.time); } } else if (method == ActionDirectorMethod.Stop) { if (disableCamera) { KickStarter.mainCamera.Enable(); } if (pause) { director.Pause(); } else { director.time = director.duration; director.Stop(); } } } } else { if (method == ActionDirectorMethod.Play && disableCamera) { KickStarter.mainCamera.Enable(); } isRunning = false; } #endif return(0f); }
private void OnTriggerEnter2D(Collider2D collision) { player.EnableControl = false; timeline.Play(); GetComponent <BoxCollider2D>().enabled = false; }