コード例 #1
0
    private void ShowGhost(StageTable stage)
    {
        GameObject obj = GameObject.Find(ghostName + nowDoorNum.ToString());

        SpriteRenderer[] ghost = obj.GetComponentsInChildren <SpriteRenderer>();

        /* [0]:ghost [1]:digit1 [2]:digit2*/
        if (stage.GetHasClear())
        {
            ghost[0].sprite = ghostSprite;
            ghost[1].sprite = stage.GetGhost1Sprite();
            ghost[2].sprite = stage.GetGhost2Sprite();
        }
        else
        {
            foreach (SpriteRenderer s in ghost)
            {
                s.sprite = null;
            }
        }
    }
コード例 #2
0
    private void SetStageTable()
    {
        StageTable stage = stageDataBase.GetStageList()[nowStageNum - 1];

        star1.sprite = stage.GetStar1();
        star2.sprite = stage.GetStar2();
        star3.sprite = stage.GetStar3();

        stageDigit1.sprite = stage.GetStageDigit1();
        stageDigit2.sprite = stage.GetStageDigit2();

        ChangeIta(stage);
        ShowGhost(stage);

        if (stage.GetHasClear())
        {
            clear.SetActive(true);
        }
        else
        {
            clear.SetActive(false);
        }
    }