Esempio n. 1
0
 private void Start()
 {
     a = MyNum.GetOrigin();
     GameOverCv.enabled  = false;
     Clearimg.enabled    = false;
     GameOverimg.enabled = false;
     ClearButton.enabled = false;
     turncv.enabled      = false;
 }
Esempio n. 2
0
 private void Update()
 {
     if (MyNum.GetOrigin() < 9)
     {
         BGP[0].SetActive(true);
     }
     else if (MyNum.GetOrigin() > 8 && MyNum.GetOrigin() < 17)
     {
         BGP[1].SetActive(true);
     }
     else if (MyNum.GetOrigin() > 16 && MyNum.GetOrigin() < 25)
     {
         BGP[2].SetActive(true);
     }
 }
Esempio n. 3
0
    void Start()
    {
        //Debug.Log(flg[20]);
        //Debug.Log(MyNum.GetOrigin());
        switch (MyNum.GetOrigin() /*stageNum*/)//stageを判別、ステージ番と同じコードのStringをStageCopyにコピペする。
        {
        case 1:
            stageCopy = stage1;
            break;

        case 2:
            stageCopy = stage2;
            break;

        case 3:
            stageCopy = stage3;
            break;

        case 4:
            stageCopy = stage4;
            break;

        case 5:
            stageCopy = stage5;
            break;

        case 6:
            stageCopy = stage6;
            break;

        case 7:
            stageCopy = stage7;
            break;

        case 8:
            stageCopy = stage8;
            break;

        case 9:
            stageCopy = stage9;
            break;

        case 10:
            stageCopy = stage10;
            break;

        case 11:
            stageCopy = stage11;
            break;

        case 12:
            stageCopy = stage12;

            break;

        case 13:
            stageCopy = stage13;
            break;

        case 14:
            stageCopy = stage14;
            break;

        case 15:
            stageCopy = stage15;
            break;

        case 16:
            stageCopy = stage16;
            break;

        case 17:
            stageCopy = stage17;
            break;

        case 18:
            stageCopy = stage18;
            break;

        case 19:
            stageCopy = stage19;
            break;

        case 20:
            stageCopy = stage20;
            break;

        case 21:
            stageCopy = stage21;
            break;

        case 22:
            stageCopy = stage22;
            break;

        case 23:
            stageCopy = stage23;
            break;

        case 24:
            stageCopy = stage24;
            break;
        }

        for (int i = 0; i < stageCopy.GetLength(0); i++)  //stageCopyの文字数をカウントしその分だけ回す
        {
            for (int j = 0; j < stageCopy[i].Length; j++) //横?
            {
                switch (stageCopy[i].Substring(j, 1))
                {
                case "b":       //唯のブロック
                    Instantiate(block, new Vector3(startX + j * massWidth,
                                                   startY - i * massHeighth, 0.0f), Quaternion.identity);
                    break;

                case "B":       //壊れる床
                    Instantiate(BB, new Vector3(startX + j * massWidth,
                                                startY - i * massHeighth, 0.0f), Quaternion.identity);
                    break;

                case "c":       //クリアするブロック
                    Instantiate(ClearZone, new Vector3(startX + j * massWidth,
                                                       startY - i * massHeighth, 0.0f), Quaternion.identity);
                    break;

                case "d":       //死ぬブロック
                    Instantiate(deathzone, new Vector3(startX + j * massWidth,
                                                       startY - i * massHeighth, 0.0f), Quaternion.identity);
                    break;

                case "w":       //ワープイン
                    var iw = Instantiate(warpin, new Vector3(startX + j * massWidth,
                                                             startY - i * massHeighth, 0.0f), Quaternion.identity) as GameObject;
                    iw.name = warpin.name + warpincount;
                    warpincount++;
                    break;

                case "W":       //ワープアウト
                    var ow = Instantiate(warpout, new Vector3(startX + j * massWidth,
                                                              startY - i * massHeighth, 0.0f), Quaternion.identity) as GameObject;
                    ow.name = warpout.name + warpin.name + warpoutcount;
                    warpoutcount++;
                    break;

                case "E":       //バジリスク
                    var baji = Instantiate(bajilisk, new Vector3(startX + j * massWidth,
                                                                 startY - i * massHeighth, 0.0f), Quaternion.identity);
                    baji.name = "" + bajicount;
                    bajicount++;
                    break;
                }
            }
        }
    }
Esempio n. 4
0
 int Stagenum;               //今なんステージ?
 private void Start()
 {
     Stagenum = MyNum.GetOrigin();
     // Debug.Log(Stagenum);
 }