예제 #1
0
 void OnMouseOver()
 {
     if (!snake.isCoolingDown)
     {
         materialManager.ChangeLeavesMaterial(meshRenderer, MaterialManager.LeavesMaterial.Hovered);
     }
 }
예제 #2
0
파일: Snake.cs 프로젝트: Umbracon/P2_Game
 void ChangeAllLeavesMaterial(MaterialManager.LeavesMaterial leavesMaterial)
 {
     foreach (var leaves in FindObjectsOfType <Leaves>())
     {
         materialManager.ChangeLeavesMaterial(leaves.GetComponent <MeshRenderer>(), leavesMaterial);
     }
 }