示例#1
0
    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");
        }
    }
示例#2
0
    public static IEnumerator GameFadeIn()
    {
        GlobalAudio.GlobalAudioFadeIn();

        yield return(new WaitForSeconds(.05f));

        //DeacivateIntro();
        PostProcessControl.OpeningFadeEffect(-10, 0, .02f);
    }
示例#3
0
        void ProfitStart(int[] comboTypes)
        {
            if (comboTypes == null)
            {
                return;
            }

            ProfitFX(comboTypes);
            GlobalAudio.PlayPreLoadedClipByID("Profit");
        }
示例#4
0
    public static IEnumerator StartLogo()
    {
        yield return(new WaitForSeconds(_logoSceneTimer));

        PostProcessControl.OpeningFadeEffect(0, -10f, .025f);
        GlobalAudio.GlobalAudioFadeOut();
        yield return(new WaitForSeconds(2f));

        _sceneToLoad.SetActive(true);
    }
示例#5
0
    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);
    }
示例#6
0
 IEnumerator <float> Tick()
 {
     while (countDown > 0)
     {
         GlobalAudio.PlayPreLoadedClipByID("Tick");
         countDown -= 1;
         Context.countDownText.text = countDown.ToString();
         yield return(MEC.Timing.WaitForSeconds(1));
     }
     CountdownEnd();
 }
示例#7
0
    // 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
         * }
         */
    }
示例#8
0
    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();
    }
示例#9
0
 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);
     }
 }
示例#10
0
    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();
    }
示例#11
0
 public static void PlayTetherMenuClose()
 {
     GlobalAudio.PlaySound(inst.tetherMenuClose, 128, 0.75f, 0.75f, UIManager.inst.mixer.FindMatchingGroups("SFX")[0]);
 }
示例#12
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]);
    }
示例#13
0
    public AudioClip dashRecharge; // -- done : Location - DashUIPanel script

    public static void PlayDashRechargeSound()
    {
        GlobalAudio.PlaySound(inst.dashRecharge, UIManager.inst.mixer.FindMatchingGroups("SFX")[0]);
    }
示例#14
0
    public AudioClip normalSwitch; // -- done : ButtonSwitch Script

    public static void PlayNormalSwitchSound()
    {
        GlobalAudio.PlaySound(inst.normalSwitch, UIManager.inst.mixer.FindMatchingGroups("SFX")[0]);
    }
示例#15
0
    public AudioClip codePickup; // -- done : Location - CodePickup script

    public static void PlayCodePickupSound()
    {
        GlobalAudio.PlaySound(inst.codePickup, UIManager.inst.mixer.FindMatchingGroups("SFX")[0]);
    }
示例#16
0
 public static void PlayStasisBubbleRemove()
 {
     GlobalAudio.PlaySound(inst.stasisRemoval, UIManager.inst.mixer.FindMatchingGroups("SFX")[0]);
 }
示例#17
0
    public AudioClip stasisError; // -- done : Location - LevelState Manager script

    public static void PlayStasisErrorSound()
    {
        GlobalAudio.PlaySound(inst.stasisError, UIManager.inst.mixer.FindMatchingGroups("SFX")[0]);
    }
示例#18
0
 public static void PlayTetherRemovalSound()
 {
     GlobalAudio.PlaySound(inst.tetherRemoval, UIManager.inst.mixer.FindMatchingGroups("SFX")[0]);
 }
示例#19
0
 public static void PlayAlarmLong()
 {
     GlobalAudio.PlaySound(inst.AlarmLong, UIManager.inst.mixer.FindMatchingGroups("SFX")[0]);
 }
示例#20
0
 public static void PlayPressurePlateOn()
 {
     GlobalAudio.PlaySound(inst.pressurePlateOn, UIManager.inst.mixer.FindMatchingGroups("SFX")[0]);
 }