コード例 #1
0
 // Switches the player's active color and updates necessary managers
 public void ToggleColor()
 {
     // Start the player moving on first screen tap
     if (!player.GetPlayerStarted())
     {
         player.PlayerStart();
     }
     materials[currIndex].SetColor("_BaseColor", colors[currIndex]);
     ++currIndex;
     if (currIndex >= colors.Length)
     {
         currIndex = 0;
     }
     materials[currIndex].SetColor("_BaseColor", colorsAlpha[currIndex]);
     player.UpdateColor(colors[currIndex]);
     Blocker.UpdateTransparentColor(colors[currIndex]);
 }