Exemple #1
0
 void OnMouseOver()
 {
     if (!snake.isCoolingDown)
     {
         materialManager.ChangeLeavesMaterial(meshRenderer, MaterialManager.LeavesMaterial.Hovered);
     }
 }
Exemple #2
0
 void ChangeAllLeavesMaterial(MaterialManager.LeavesMaterial leavesMaterial)
 {
     foreach (var leaves in FindObjectsOfType <Leaves>())
     {
         materialManager.ChangeLeavesMaterial(leaves.GetComponent <MeshRenderer>(), leavesMaterial);
     }
 }