public void LoadNextScene()
 {
     Initiate.Fade(nextScene, fadeColor, fadeMultiplier);
 }
Пример #2
0
 public void SceneTrans()
 {
     Initiate.Fade(SceneName, Color.black, TransSpeed);
 }
Пример #3
0
 // Update is called once per frame
 void OnMouseDown()
 {
     Initiate.Fade("Classic_screen", Color.black, 10f);
 }
Пример #4
0
 void Die()
 {
     Initiate.Fade("dieScreen", Color.black, 2f);
 }
Пример #5
0
    IEnumerator FadeDelayer()
    {
        yield return(new WaitForSeconds(0.1f));

        Initiate.Fade(nextSceneName, Color.black, 1f);
    }
Пример #6
0
    private void OnTriggerEnter2D(Collider2D col)
    {
        if (col.gameObject.tag == "Player_Hand")
        {
            var hand = FindObjectOfType <PlayerHandMovement>();
            var arm  = FindObjectOfType <PlayerArmMovement>();

            if (hand != null)
            {
                hand.enabled = false;
                var handAnimator = hand.GetComponent <Animator>();
                handAnimator.SetBool("Jumping", false);
                handAnimator.SetFloat("HandWalking", 0);
                handAnimator.Play("Hand_Faded");
                Destroy(hand.gameObject, 1f);
                handInDoor = true;
            }
            else
            {
                arm.GetComponent <Rigidbody2D>().velocity = new Vector2(0, 0);
                arm.enabled = false;
                var armAnimator = arm.GetComponent <Animator>();
                armAnimator.SetFloat("ArmWalking", 0);
                armAnimator.Play("Arm_Faded");
                Destroy(arm.gameObject, 1f);
                handInDoor = true;
            }
        }

        if (col.gameObject.tag == "Player_Foot")
        {
            var foot = FindObjectOfType <PlayerFootMovement>();
            var leg  = FindObjectOfType <LegMovement>();

            if (foot != null)
            {
                foot.enabled = false;
                var footAnimator = foot.GetComponent <Animator>();
                footAnimator.SetBool("Jumping", false);
                footAnimator.SetFloat("FootWalking", 0);
                footAnimator.Play("Foot_Faded");
                Destroy(foot.gameObject, 1f);
                footInDoor = true;
            }

            else
            {
                leg.GetComponent <Rigidbody2D>().velocity = new Vector2(0, 0);
                leg.enabled = false;
                var legAnimator = leg.GetComponent <Animator>();
                legAnimator.SetBool("LegJumping", false);
                legAnimator.SetFloat("LegWalking", 0);
                legAnimator.Play("Leg_Faded");
                Destroy(leg.gameObject, 1f);
                footInDoor = true;
            }
        }

        if (footInDoor && handInDoor)
        {
            Initiate.Fade(sceneNames[nextScene], Color.black, 2f);
        }
    }
 protected override void OnArrival()
 {
     Initiate.Fade("Studio", Color.black, 1.2f);
 }
Пример #8
0
 public void PurpleScene()
 {
     Initiate.Fade("_Purple", Color.blue, 1.0f);
     //SceneManager.LoadScene(6);
 }
Пример #9
0
 public void GoToScene(string sceneName)
 {
     Initiate.Fade(sceneName, Color.black, 2.0f);
 }
Пример #10
0
 public void GreenScene()
 {
     Initiate.Fade("_Green", Color.yellow, 1.0f);
     //SceneManager.LoadScene(4);
 }
Пример #11
0
 public void BlueScene()
 {
     Initiate.Fade("_Blue", Color.green, 1.0f);
     //SceneManager.LoadScene(5);
 }
Пример #12
0
 public void OrangeScene()
 {
     Initiate.Fade("_Orange", Color.red, 1.0f);
     //SceneManager.LoadScene(2);
 }
Пример #13
0
 public void RedScene()
 {
     Initiate.Fade("_Red", Color.black, 1.0f);
     //SceneManager.LoadScene(1);
 }
Пример #14
0
 public void StartGame()
 {
     Initiate.Fade("Level1", Color.black, 2f);
 }
Пример #15
0
 public void GameReset()
 {
     Time.timeScale = 1;
     Initiate.Fade(s_game, Color.grey, 1);
 }
Пример #16
0
 public void RestartSceneTestOptometrico()
 {
     Initiate.Fade("TestOptometrico", Color.black, 0.7f);
     //SceneManager.LoadScene("TestOptometrico");
 }
Пример #17
0
 public void MenuPlayDesdePausa()
 {
     Time.timeScale = 1;
     Initiate.Fade(s_menuplay, Color.black, 1);
 }
Пример #18
0
 public void RestartSceneMainMenu()
 {
     //SceneManager.LoadScene("TestDaltonismo");
     Initiate.Fade("MainMenu", Color.black, 0.7f);
 }
Пример #19
0
    public void OnTouchExitButton(Button a_oSender)
    {
        Color oColorBlack = Color.black;

        Initiate.Fade("WaitScene", oColorBlack, 0.2f);
    }
Пример #20
0
 public void PerderAGaraje()
 {
     Time.timeScale = 1;
     Initiate.Fade(s_menugaraje, Color.gray, 1);
 }
Пример #21
0
 public void Restart()
 {
     Initiate.Fade("SampleScene", Color.black, 1f);
 }
Пример #22
0
    IEnumerator Pausa1(float tt)
    {
        yield return(new WaitForSeconds(tt));

        Initiate.Fade(s_menugaraje, Color.black, 1);
    }
Пример #23
0
 public void OnDisconnectedBackButtonClicked()
 {
     GameInfo.gameType = 'N';
     Initiate.Fade("UserPreferences", Color.black, 4.0f);
 }
Пример #24
0
 public void MenuGaraje()
 {
     Time.timeScale = 1;
     Initiate.Fade(s_menugaraje, Color.black, 1);
 }
Пример #25
0
 public void loadScene(string sceneName)
 {
     Initiate.Fade(sceneName, loadToColor, 1.0f);
 }
Пример #26
0
 public void Cargando1()
 {
     Time.timeScale = 1;
     Initiate.Fade(s_cargando1, Color.black, 1);
 }
Пример #27
0
 public void goBack()
 {
     Initiate.Fade("menu", Color.black, 3.5f);
 }
Пример #28
0
 public void Exit()
 {
     Time.timeScale = 1;
     Initiate.Fade(s_exit, Color.white, 50);
 }
Пример #29
0
    void FixedUpdate()
    {
        if (isClosing && uiState == "punish")
        {
            foreach (GameObject player in players)
            {
            }

            uiState = "endgame";
        }

        if (uiState == "gameplay")
        {
            foreach (GameObject player in players)
            {
                RaycastHit hit;

                if (Physics.Raycast(player.transform.position, (player.transform.forward * -1), out hit, 1))
                {
                    if (hit.transform.gameObject.tag == "Player" && playerBehind[player.GetComponent <PlayerController>().playerNum - 1] && player.GetComponent <PlayerController>().isActive)
                    {
                        if (hit.transform.gameObject.GetComponent <PlayerController>().prevState.Buttons.A == ButtonState.Released && hit.transform.gameObject.GetComponent <PlayerController>().state.Buttons.A == ButtonState.Pressed)
                        {
                            sounds[1].PlayOneShot(stab);
                            hit.transform.gameObject.GetComponent <PlayerController>().isActive = false;
                            player.GetComponent <PlayerController>().punishPlayer();
                            player.GetComponent <PlayerController>().enabled = false;
                            player.GetComponent <Rigidbody>().isKinematic    = true;
                            player.transform.Translate(0, -95, 0);
                            player.transform.GetChild(0).transform.localPosition = new Vector3(0, 100, 0);
                            player.transform.GetChild(0).GetComponent <Rigidbody>().useGravity = true;
                        }
                    }
                }
            }
        }

        if (uiState == "gameplay")
        {
            foreach (GameObject player in players)
            {
                RaycastHit hit;

                if (Physics.Raycast(player.transform.position, (player.transform.forward * -1), out hit, 1))
                {
                    if (hit.transform.gameObject.tag == "Player" && Vector3.Dot(hit.transform.forward, player.transform.forward) > 0.5)
                    {
                        playerBehind[player.GetComponent <PlayerController>().playerNum - 1] = true;
                    }
                }
                else
                {
                    playerBehind[player.GetComponent <PlayerController>().playerNum - 1] = false;
                }
            }
        }


        if (isCutscene)
        {
            if (openTimer > 3)
            {
                foreach (GameObject player in players)
                {
                    player.transform.Translate(Vector3.forward * Time.deltaTime * 2.5f);
                }
            }


            openTimer -= Time.deltaTime;

            //if (openTimer < 8 && uiState == "begin")
            //{
            //    uiState = "text1";
            //    UIcanvas.setInstructions("Stab your peers' back to steal some gold.");

            //}

            if (openTimer < 3 && uiState == "begin")
            {
                uiState = "text2";
                UIcanvas.setInstructions("Watch your back...");
                sounds[1].Stop();
            }

            else if (openTimer < 0 && uiState == "text2")
            {
                isCutscene = false;
                foreach (GameObject player in players)
                {
                    //player.GetComponent<PlayerController>().lightning.enabled = false;
                    player.GetComponent <PlayerController>().enabled = true;
                }
                UIcanvas.startTimer(30f);
                uiState = "gameplay";
                sounds[0].Play();
            }
        }

        if (UIcanvas.uiTimer <= 0 && !isClosing && uiState == "gameplay")
        {
            isClosing = true;
            uiState   = "punish";
            sounds[0].Stop();
        }

        if (isClosing)
        {
            closingTimer -= Time.deltaTime;
        }

        if (closingTimer < 0 && isClosing)
        {
            uiState   = "nextLevel";
            isClosing = false;
            ScoreBehavior.levels.RemoveAt(0);
            if (ScoreBehavior.levels.Count == 0)
            {
                Initiate.Fade("End Level", Color.black, 2f);
            }
            else
            {
                string nextLevel = ScoreBehavior.levels[0];
                Initiate.Fade(nextLevel, Color.black, 2f);
            }
        }
    }
Пример #30
0
 /**
  * OnClick listener for START button in the Main menu
  */
 public void StartOnClickButton()
 {
     Initiate.Fade("MainMenuFilePicker", AnimUtils.AnimationColor, AnimUtils.AnimationLength);
 }