Пример #1
0
            //TimedUpdate is called once every tick.
            public override void TimedUpdate()
            {
                #region EasyMode

                if (currentDifficulty == Difficulty.EASY)
                {
                    if (Tick == 1)
                    {
                        coinManager.SpawnCoinsEasy();
                        coinController = FindObjectsOfType <CoinController>();
                    }

                    if (Tick == 5)
                    {
                        enableInput = true;
                        for (int i = 0; i < coinController.Length; i++)
                        {
                            coinController[i].hideCoins = true;
                        }
                        carteManager.SpawnRandomCarteEasy();
                    }

                    if (Tick == 7)
                    {
                        //destroy hiddencoins
                    }

                    if (Tick == 8)
                    {
                        //le joueur n'a pas trouvé la bonne pièce à temps, il loose
                        if (playerWon)
                        {
                            Testing.Manager.Instance.Result(true);
                        }

                        if (playerLost)
                        {
                            Testing.Manager.Instance.Result(false);
                        }
                    }
                }
                #endregion

                #region MediumMode

                if (currentDifficulty == Difficulty.MEDIUM)
                {
                    if (Tick == 1)
                    {
                        coinManager.SpawnCoinsMedium();
                        coinController = FindObjectsOfType <CoinController>();
                    }

                    if (Tick == 5)
                    {
                        enableInput = true;
                        for (int i = 0; i < coinController.Length; i++)
                        {
                            coinController[i].hideCoins = true;
                        }
                        carteManager.SpawnRandomCarteMedium();
                    }

                    if (Tick == 7)
                    {
                        //destroy hiddencoins
                    }

                    if (Tick == 8)
                    {
                        //le joueur n'a pas trouvé la bonne pièce à temps, il loose
                        if (playerWon)
                        {
                            Testing.Manager.Instance.Result(true);
                        }

                        if (playerLost)
                        {
                            Testing.Manager.Instance.Result(false);
                        }
                    }
                }

                #endregion

                #region HardMode

                if (currentDifficulty == Difficulty.HARD)
                {
                    if (Tick == 1)
                    {
                        coinManager.SpawnCoinsHard();
                        coinController = FindObjectsOfType <CoinController>();
                    }

                    if (Tick == 5)
                    {
                        enableInput = true;
                        for (int i = 0; i < coinController.Length; i++)
                        {
                            coinController[i].hideCoins = true;
                        }
                        carteManager.SpawnRandomCarteHard();
                    }

                    if (Tick == 7)
                    {
                        //destroy hiddencoins
                    }

                    if (Tick == 8)
                    {
                        //le joueur n'a pas trouvé la bonne pièce à temps, il loose
                        if (playerWon)
                        {
                            Testing.Manager.Instance.Result(true);
                        }

                        if (playerLost)
                        {
                            Testing.Manager.Instance.Result(false);
                        }
                    }
                }

                #endregion
            }
            //TimedUpdate is called once every tick.
            public override void TimedUpdate()
            {
                #region EasyMode

                if (currentDifficulty == Difficulty.EASY)
                {
                    if (Tick == 5)
                    {
                        enableInput = true;
                        HideCoins();
                        carteManager.SpawnRandomCarteEasy();
                    }


                    if (Tick == 8)
                    {
                        soundManager.StopMusic();
                        //le joueur n'a pas trouvé la bonne pièce à temps, il loose
                        if (playerWon)
                        {
                            Manager.Instance.Result(true);
                        }

                        if (!playerWon)
                        {
                            Manager.Instance.Result(false);
                        }
                    }
                }
                #endregion

                #region MediumMode

                if (currentDifficulty == Difficulty.MEDIUM)
                {
                    if (Tick == 5)
                    {
                        enableInput = true;
                        HideCoins();
                        carteManager.SpawnRandomCarteMedium();
                    }


                    if (Tick == 8)
                    {
                        soundManager.StopMusic();
                        //le joueur n'a pas trouvé la bonne pièce à temps, il loose
                        if (playerWon)
                        {
                            Manager.Instance.Result(true);
                        }

                        if (!playerWon)
                        {
                            Manager.Instance.Result(false);
                        }
                    }
                }

                #endregion

                #region HardMode

                if (currentDifficulty == Difficulty.HARD)
                {
                    /* if (Tick == 0)
                     * {
                     *   coinManager.SpawnCoinsHard();
                     *   coinController = FindObjectsOfType<CoinController>();
                     * }*/

                    if (Tick == 5)
                    {
                        enableInput = true;
                        HideCoins();
                        carteManager.SpawnRandomCarteHard();
                    }


                    if (Tick == 8)
                    {
                        soundManager.StopMusic();
                        //le joueur n'a pas trouvé la bonne pièce à temps, il loose
                        if (playerWon)
                        {
                            Manager.Instance.Result(true);
                        }

                        if (!playerWon)
                        {
                            Manager.Instance.Result(false);
                        }
                    }
                }

                #endregion
            }