コード例 #1
0
 /* Called when hovering over or pointing at block */
 void OnHover()
 {
     if (IsDisabled() || dragging)
     {
         return;
     }
     if (currentBlock != null && currentBlock != gameObject)
     {
         Drag lastDrag = currentBlock.GetComponent <Drag>();
         if (lastDrag.dragging)
         {
             return;
         }
         currentBlock = gameObject;
         lastDrag.OnHoverExit();
     }
     r.material.SetColor("_Color", highlightColor);
     currentBlock = gameObject;
 }