示例#1
0
        public string Info()
        {
            foreach (Square square in BoardList)
            {
                finalString += square.Info();
            }
            foreach (Square YellowSquare in BoardListYellow)
            {
                finalString += YellowSquare.Info();
            }

            foreach (Square RedSquare in BoardListRed)
            {
                finalString += RedSquare.Info();
            }
            foreach (Square GreenSquare in BoardListGreen)
            {
                finalString += GreenSquare.Info();
            }
            foreach (Square BlueSquare in BoardListBlue)
            {
                finalString += BlueSquare.Info();
            }
            return(finalString);
        }
示例#2
0
 void Update()
 {
     if (Input.GetKeyDown(KeyCode.Space) || Input.GetKeyDown(KeyCode.W) || Input.GetKeyDown(KeyCode.UpArrow))
     {
         if (characterselect == 1)
         {
             characterselect = 2;
         }
         else if (characterselect == 2)
         {
             characterselect = 1;
         }
     }
     if (characterselect == 1)
     {
         RedSquare.SetActive(true);
         BlueSquare.SetActive(false);
     }
     else if (characterselect == 2)
     {
         RedSquare.SetActive(false);
         BlueSquare.SetActive(true);
     }
 }