Exemplo n.º 1
0
 public bool CheckForMatch(GameObject legPiece, GameObject armPiece, GameObject headPiece)
 {
     for (int i = 0; i < totalNumberOfEntries; i++)
     {
         if (infoPanel[i].GetComponent <InformationPanel>().InUse)
         {
             InformationPanel informationPanel = infoPanel[i].GetComponent <InformationPanel>();
             if (informationPanel.GetBodyImageColorEnum() == armPiece.GetComponent <RobotPart>().GetColorEnum() &&
                 informationPanel.GetLegsImageColorEnum() == legPiece.GetComponent <RobotPart>().GetColorEnum() &&
                 informationPanel.GetHeadImageColorEnum() == headPiece.GetComponent <RobotPart>().GetColorEnum())
             {
                 informationPanel.GetComponent <CanvasGroup>().alpha = 0;
                 informationPanel.InUse = false;
                 RemoveEntries();
                 return(true);
             }
         }
     }
     return(false);
 }