public void CreatePoint() { if (LevelStateManager.canCreateTetherPoint()) { //Debug.Log("Create tether point"); //CreateTimeTetherIndicator(GameManager.GetPlayer().transform.position, LevelStateManager.curState + 1); LevelStateManager.createTetherPoint(); GameManager.GetPlayerScript().setPlaceAnchorAnim(); AudioLibrary.PlayTetherPlacementSound(); // Timeline arrow SetArrowTarget(LevelStateManager.curState, false, true); if (LevelStateManager.curState < tetherUICreateParticles.Length && tetherUICreateParticles[LevelStateManager.curState] != null) { tetherUICreateParticles[LevelStateManager.curState].Play(); } } else { if (!GlobalAudio.ClipIsPlaying(AudioLibrary.inst.tetherError)) { AudioLibrary.PlayTetherErrorSound(); } Debug.Log("Can't create tether point right now"); } }
public static IEnumerator GameFadeIn() { GlobalAudio.GlobalAudioFadeIn(); yield return(new WaitForSeconds(.05f)); //DeacivateIntro(); PostProcessControl.OpeningFadeEffect(-10, 0, .02f); }
void ProfitStart(int[] comboTypes) { if (comboTypes == null) { return; } ProfitFX(comboTypes); GlobalAudio.PlayPreLoadedClipByID("Profit"); }
public static IEnumerator StartLogo() { yield return(new WaitForSeconds(_logoSceneTimer)); PostProcessControl.OpeningFadeEffect(0, -10f, .025f); GlobalAudio.GlobalAudioFadeOut(); yield return(new WaitForSeconds(2f)); _sceneToLoad.SetActive(true); }
public static IEnumerator MoveToIntroScene() { PostProcessControl.PostExposureFade(-10, .025f); GlobalAudio.GlobalAudioFadeOut(); yield return(new WaitForSeconds(1.5f)); //DeacivateIntro(); //PostProcessControl.PostExposureFade(-10, 0, .025f); //_escapeHouseText.SetActive(true); _sceneToLoad.SetActive(true); }
IEnumerator <float> Tick() { while (countDown > 0) { GlobalAudio.PlayPreLoadedClipByID("Tick"); countDown -= 1; Context.countDownText.text = countDown.ToString(); yield return(MEC.Timing.WaitForSeconds(1)); } CountdownEnd(); }
// Update is called once per frame void Update() { // TODO UpdateDashPanelActive() should probably be called when the dash ability is collected if (GameManager.dashIsCharged()) { dashImg.color = Color.Lerp(dashImg.color, Color.white, colorLerpSpeed * Time.deltaTime); // Executes when the dash has finished charging if (!charged) { if (!GlobalAudio.ClipIsPlaying(AudioLibrary.inst.dashRecharge)) { AudioLibrary.PlayDashRechargeSound(); } charged = true; dashParticlesIn.Play(); } } // If charging else { dashImg.color = Color.Lerp(dashImg.color, chargingSpriteColor, colorLerpSpeed * Time.deltaTime); // TODO set image fill float fillTarget = 1 - GameManager.dashChargePercNormalized(); dashImg.fillAmount = Mathf.Lerp(dashImg.fillAmount, fillTarget, fillLerpSpeed * Time.deltaTime); //dashImg.fillAmount = 1 - GameManager.dashChargePercNormalized(); charged = false; } /* * // Turn off dash image (make transparent) while dashing * if (GameManager.isPlayerDashing()) * { * dashImg.color = Color.Lerp(dashImg.color, Color.clear, 0.2f); * } * // If charged * else if (GameManager.dashIsCharged()) * { * dashImg.color = Color.Lerp(dashImg.color, Color.white, 0.2f); * } * // If charging * else * { * dashImg.color = Color.Lerp(dashImg.color, chargingSpriteColor, 0.2f); * * // TODO set image fill * } */ }
public static IEnumerator StartIntro() { //print("calling start intro co routine"); _introEnvironment.SetActive(true); yield return(new WaitForSeconds(_introSceneTimer)); PostProcessControl.OpeningFadeEffect(0, -10, .01f); GlobalAudio.GlobalAudioFadeOut(); yield return(new WaitForSeconds(3f)); _sceneToLoad.SetActive(true); //DeacivateIntro(); }
public void PlayTetherMenuInSound() { Debug.Log("Play tether menu in sound"); if (!GlobalAudio.ClipIsPlaying(AudioLibrary.inst.tetherMenuOpen)) { Debug.Log("Playing Open"); AudioLibrary.PlayTetherMenuOpen(); } if (GlobalAudio.ClipIsPlaying(AudioLibrary.inst.tetherMenuClose)) { Debug.Log("Stopping Close"); GlobalAudio.StopPlayingClip(AudioLibrary.inst.tetherMenuClose); } }
public override void perform(Controller c) { Player p = State.cast <Player> (c); Vector3 mousePos = Camera.main.ScreenToWorldPoint(new Vector3(Input.mousePosition.x, Input.mousePosition.y, 0)); //bool inSBBounds = LevelStateManager.StasisBubbleAtPos (mousePos); // Use Stasis Placement ablility if (PlayerControlManager.GetKeyDown(ControlInput.FIRE_STASIS)) { if (GameManager.inst.canUseStasis && //!inSBBounds && //!TetherManager.CursorIsOverATetherPoint () && CursorManager.CursorInGameplayState()) { p.setStasisShootAnim(); c.getSelf().getAbility(0).use(c.getSelf(), mousePos); } if (!LevelStateManager.canAddStasisBubble() && !GlobalAudio.ClipIsPlaying(AudioLibrary.inst.stasisError)) { AudioLibrary.PlayStasisErrorSound(); } } // Use Dash ability if (PlayerControlManager.GetKeyDown(ControlInput.DASH)) { if (GameManager.inst.canUseDash && CursorManager.CursorInGameplayState()) { if (c.getSelf().getAbility(1).isReady()) { AudioLibrary.PlayDashForwardSound(); } else { if (!GlobalAudio.ClipIsPlaying(AudioLibrary.inst.dashError)) { AudioLibrary.PlayDashErrorSound(); } }/// c.getSelf().getAbility(1).use(c.getSelf(), p.getJumpTargetPos()); } } p.move(); p.findTarget(); }
public static void PlayTetherMenuClose() { GlobalAudio.PlaySound(inst.tetherMenuClose, 128, 0.75f, 0.75f, UIManager.inst.mixer.FindMatchingGroups("SFX")[0]); }
public AudioClip laserDeathCollisiion; // -- done : Location - laser script // PROBLEM WITH COLLISION AND TETHERING public static void PlayLaserDeathCollisionSound() { GlobalAudio.PlaySound(inst.laserDeathCollisiion, UIManager.inst.mixer.FindMatchingGroups("SFX")[0]); }
public AudioClip dashRecharge; // -- done : Location - DashUIPanel script public static void PlayDashRechargeSound() { GlobalAudio.PlaySound(inst.dashRecharge, UIManager.inst.mixer.FindMatchingGroups("SFX")[0]); }
public AudioClip normalSwitch; // -- done : ButtonSwitch Script public static void PlayNormalSwitchSound() { GlobalAudio.PlaySound(inst.normalSwitch, UIManager.inst.mixer.FindMatchingGroups("SFX")[0]); }
public AudioClip codePickup; // -- done : Location - CodePickup script public static void PlayCodePickupSound() { GlobalAudio.PlaySound(inst.codePickup, UIManager.inst.mixer.FindMatchingGroups("SFX")[0]); }
public static void PlayStasisBubbleRemove() { GlobalAudio.PlaySound(inst.stasisRemoval, UIManager.inst.mixer.FindMatchingGroups("SFX")[0]); }
public AudioClip stasisError; // -- done : Location - LevelState Manager script public static void PlayStasisErrorSound() { GlobalAudio.PlaySound(inst.stasisError, UIManager.inst.mixer.FindMatchingGroups("SFX")[0]); }
public static void PlayTetherRemovalSound() { GlobalAudio.PlaySound(inst.tetherRemoval, UIManager.inst.mixer.FindMatchingGroups("SFX")[0]); }
public static void PlayAlarmLong() { GlobalAudio.PlaySound(inst.AlarmLong, UIManager.inst.mixer.FindMatchingGroups("SFX")[0]); }
public static void PlayPressurePlateOn() { GlobalAudio.PlaySound(inst.pressurePlateOn, UIManager.inst.mixer.FindMatchingGroups("SFX")[0]); }