Beispiel #1
0
 public void StartGame()
 {
     CancelInvoke("ChangeScene");
     Invoke("ChangeScene", 1.1f);
     dimmer.FadeIn(1f);
     AudioManager.Instance.PlayEffectAt(28, Vector3.zero, 2f);
     AudioManager.Instance.Lowpass(true);
     cam.Chromate(0.25f * 4f, 0.1f * 4f);
 }
Beispiel #2
0
 // Update is called once per frame
 void Update()
 {
     if (canGo && Input.anyKeyDown)
     {
         CancelInvoke("ChangeScene");
         Invoke("ChangeScene", 1.1f);
         dimmer.FadeIn(1f);
         AudioManager.Instance.PlayEffectAt(28, Vector3.zero, 2f);
         cam.Chromate(0.25f * 4f, 0.1f * 4f);
     }
 }
Beispiel #3
0
    void EndLevel()
    {
        EveryoneEmote(Face.Emotion.Happy);

        Invoke("NextLevel", 2.5f);
        Invoke("LevelEnds", 1f);

        cam.Chromate(0.25f * 4f, 0.1f * 4f);

        AudioManager.Instance.Lowpass(true);
        AudioManager.Instance.PlayEffectAt(28, Vector3.zero, 2f);
    }
Beispiel #4
0
    // Update is called once per frame
    void Update()
    {
        if (tracking)
        {
            transform.Rotate(new Vector3(0, 0, -rotationSpeed * Time.deltaTime));

            var pos = Camera.main.ScreenToWorldPoint(Input.mousePosition);
            transform.position = new Vector3(pos.x, pos.y, transform.position.z);

            if (Input.GetMouseButtonDown(0))
            {
                Cursor.visible = false;
                AudioManager.Instance.targetPitch = 0.8f;
                SetAiming(true);
            }

            if (Input.GetMouseButton(0))
            {
                rotationSpeed = Mathf.MoveTowards(rotationSpeed, 50f, 500f * Time.deltaTime);

                slowTime += Time.deltaTime;

                cam.Chromate(slowTime, 0.05f);
            }

            if (Input.GetMouseButtonUp(0))
            {
                AudioManager.Instance.targetPitch = 1f;
                Shoot();
            }

            var hits = Physics2D.OverlapCircleAll(transform.position, 0.5f, currentMask);

            if (hits.Length > 0)
            {
                foreach (var h in hits)
                {
                    if (h.gameObject != coll)
                    {
                        DieAndReset();
                    }
                }
            }
        }
    }
Beispiel #5
0
    void DelayedDisplayText()
    {
        buttonToShow.ChangeVisibility(true);
        infoDimmerAnim.Show();
        infoTextAnim.Show();

        cam.Shake(0.15f, 0.15f);
        cam.Chromate(0.75f, 0.1f);

        if (currentTurn == 1)
        {
            AudioManager.Instance.PlayEffectAt(15, Vector3.zero, 0.5f);
        }
        else
        {
            AudioManager.Instance.PlayEffectAt(8, Vector3.zero, 0.5f);
        }

        quitButton.ChangeVisibility(true);
    }
Beispiel #6
0
 void Glitch()
 {
     cam.Chromate(0.3f, 1f);
     Invoke("Glitch", 1f);
 }