Esempio n. 1
0
 private void OnMouseOver()
 {
     if (Input.GetMouseButtonDown(0))
     {
         if (mapElementFactory.DeleteMode)
         {
             designerManager.DeleteMapElement(Row, Column);
         }
         if (mapElementFactory.chosedMapElement == MapElement.Null)
         {
             return;
         }
         if ((mapElementFactory.chosedMapElement == MapElement.LaserGate || mapElementFactory.chosedMapElement == MapElement.Door) && (edgeMapElementPlace || !designerManager.ThreePlace(Row, Column)))
         {
             return;
         }
         if (ElementOnIt && (mapElementFactory.chosedMapElement != MapElement.Box && mapElementFactory.chosedMapElement != MapElement.Joe))
         {
             return;
         }
         ElementOnIt = designerManager.BuildMapElement(Row, Column);
         Color color = meshRenderer.material.color;
         color.a = 0f;
         meshRenderer.material.color = color;
     }
     else if (Input.GetMouseButtonDown(1))
     {
         designerManager.DeleteMapElement(Row, Column);
     }
 }
Esempio n. 2
0
 private void OnMouseOver()
 {
     if (Input.GetMouseButtonDown(0))
     {
         if (mapElementFactory.DeleteMode)
         {
             designerManager.DeleteMapElement(Row, Column);
         }
         else if (mapElementFactory.chosedMapElement == MapElement.Box || mapElementFactory.chosedMapElement == MapElement.Joe)
         {
             designerManager.BuildMapElement(Row, Column);
         }
     }
     else if (Input.GetMouseButtonDown(1))
     {
         designerManager.DeleteMapElement(Row, Column);
     }
 }