コード例 #1
0
    //淡出漫画UI,hideTime淡出时长
    public void Hide(int id, float hideTime = 0.5f)
    {
        transform.Find("Canvas").GetComponent <ShowAndHideUI>().Hide(hideTime, delegate() {
            if (id == 3)
            {
                GameObject newPanel;
                if (GameObject.Find("UI/收音机播放UI(Clone)") == null)
                {
                    newPanel = Instantiate(GameObject.Find("ItemsData").GetComponent <ItemsData>().GetItemByItemName("收音机").newPanelPrefab, GameObject.Find("UI").transform);
                }
                else
                {
                    newPanel = GameObject.Find("UI/收音机播放UI(Clone)").gameObject;
                }
                newPanel.gameObject.SetActive(true);
                GameObject.Find("UI").transform.Find("收音机播放UI(Clone)/Note").GetComponent <NoteUI>().Show("收音机");
            }
            if (id == 4) /*这里加获得日记的逻辑*/ } {
                if (id == 5)
                {
                    Show(6);
                }
                if (id == 6)
                {
                    EndUI.Play();
                }
});
コード例 #2
0
    private IEnumerator StartTraining()
    {
        EndUI _endUI = GameManager.Instance.CreateEndUI();

        _endUI.WhiteNoiseOn(0);
        yield return(new WaitForSeconds(0.7f));

        CustomSceneManager.Instance.LoadUIScene(CustomSceneManager.UIScenes.TrainingScene);
    }
コード例 #3
0
    void Start()
    {
        game = Game.instance;

        blueProgress = 0f;
        redProgress  = 0f;

        gameUI  = new GameUI(game);
        scrumUI = new ScrumUI(game);
        endUI   = new EndUI();        //game);
        touchUi = new TouchUI(game);

        currentState = UIState.NULL;
    }
コード例 #4
0
    public void StartEndSequence()
    {
        ambient.Stop();
        coins.Stop();
        coinsEmitter.Stop();
        moving.Stop();
        if (currentState == State.Contagious)
        {
            int aproxCalc = (int)Mathf.Pow(2, infectedPeople);
            infectedAproximation.text = aproxCalc.ToString();
            infectedAmount.text       = infectedPeople.ToString();
        }
        else
        {
            infectedAproximation.text = "0";
            infectedAmount.text       = "0";
        }

        if (total >= threshold_money)
        {
            endUITitle.text = "¡HAS SOBREVIVIDO EL DIA!";
            endParagraphGood.SetActive(true);
            endButtonText.text = "CONTINUAR";
            EndUIPanel.gameObject.GetComponent <Image>().color = Color.green;
            currentLevelInt = currentLevelInt + 1;
            EndUI.SetActive(true);
            if (currentLevelInt == 3)
            {
                EndUI.SetActive(false);
                ApocalypseUI.SetActive(true);
            }
        }
        else
        {
            endUITitle.text = "!NO HAS CONSEGUIDO EL DINERO SUFICIENTE!";
            endParagraphBad.SetActive(true);
            endButtonText.text = "REINTENTAR";
            EndUIPanel.gameObject.GetComponent <Image>().color = Color.red;
            currentLevelInt = 0;
            EndUI.SetActive(true);
        }
    }
コード例 #5
0
ファイル: UIManager.cs プロジェクト: sylafrs/rugby
    void Start()
    {
        game 				= Game.instance;

        blueProgress = 0f;
        redProgress  = 0f;

        gameUI 	= new GameUI(game);
        scrumUI = new ScrumUI(game);
        endUI 	= new EndUI();//game);
        touchUi = new TouchUI(game);

        currentState = UIState.NULL;
    }
コード例 #6
0
    public EndUI CreateEndUI()
    {
        EndUI _endUI = Instantiate(miniGameEndUI).GetComponent <EndUI>();

        return(_endUI);
    }
コード例 #7
0
    public void ClearGame(Result score) // 각 미니게임이 끝났을때 실행되어야 하는 함수
    {
        if (isGameStart)
        {
            isGameStart = false;
            previousResult.Add(score);
            accumulateGame += 1;

            previousDifficultyLevel = difficultyLevel;
            difficultyLevel        += (int)score;

            if (isHiddenStroy)
            {
                if (difficultyLevel > 15)
                {
                    difficultyLevel = 15;
                }
            }
            else
            {
                if (difficultyLevel > 10)
                {
                    difficultyLevel = 10;
                }
            }
            if (difficultyLevel < 1)
            {
                difficultyLevel = 1;
            }

            string scoreText = "";
            if (score == Result.A)
            {
                scoreText = "대성공";
            }
            else if (score == Result.B)
            {
                scoreText = "성공";
            }
            else if (score == Result.C)
            {
                scoreText = "실패";
            }
            else if (score == Result.D)
            {
                scoreText = "대실패";
            }

            EndUI _endUI = CreateEndUI();
            _endUI.GameOverPanelOn(scoreText);
            _endUI.WhiteNoiseOn(1f);

            if (IsEvaluationStart)
            {
                CustomSceneManager.Instance.LoadUIScene(CustomSceneManager.UIScenes.Evaluation, 1.5f);
            }
            else
            {
                CustomSceneManager.Instance.LoadUIScene(CustomSceneManager.UIScenes.TrainingScene, 1.5f);
            }
        }
    }
コード例 #8
0
 void Start()
 {
     _instance          = this;
     WinnerImage.sprite = NullSprite;
 }