コード例 #1
0
ファイル: BoardCreator.cs プロジェクト: kfilyk/Cryptonaut
        public void setNumRoomsMax()
        {
            if (numRoomsMax < 40)
            {
                numRoomsMax++;
            }
            else
            {
                numRoomsMax = 1;
            }
            if (numRoomsMax < numRoomsMin)
            {
                numRoomsMin = numRoomsMax;
            }
            GameObject  DGMinR = GameObject.Find("dunGenMinRooms");
            ButtonStuff bs     = DGMinR.GetComponent <ButtonStuff> ();

            bs.buttonString = "Min Rooms: " + numRoomsMin;

            GameObject DGMaxR = GameObject.Find("dunGenMaxRooms");

            bs = DGMaxR.GetComponent <ButtonStuff> ();
            bs.buttonString = "<Max Rooms: " + numRoomsMax + ">";

            numRooms = new IntRange(numRoomsMin, numRoomsMax);
        }
コード例 #2
0
ファイル: dunGenScript.cs プロジェクト: HildaHay/Resistjam
 void Update()
 {
     for (var i = 0; i < 4; i++)
     {
         ButtonStuff bs = dunGenList [i].GetComponent <ButtonStuff> ();
         Text        t  = dunGenList[i].GetComponent <Text> ();
         t.text = bs.buttonString;
     }
 }