Ejemplo n.º 1
0
    private void OnMouseDrag()
    {
        if (!MainGameLogic.IsMainGame())
        {
            return;
        }
        if (!manager.IsPerformingAction())
        {
            if (startCubeTile == null || startFace == null)
            {
                startCubeTile = manager.QueryFirstCubeTile();
                startFace     = manager.QueryMagicCubeFace();

                if (startCubeTile != null && startFace != null)
                {
                    Vector3 temp = manager.GetWorldPos();
                    if (temp != Vector3.positiveInfinity)
                    {
                        mouseDragStartPos = temp;
                    }
                }
            }

            if (startCubeTile != null && startFace != null)
            {
                Vector3 temp = manager.GetWorldPos();
                if (!float.IsInfinity(temp.x))
                {
                    currentDragPos = temp;
                }
            }
        }
    }
Ejemplo n.º 2
0
 private void OnApplicationQuit()
 {
     if (MainGameLogic.IsMainGame() || MainGameLogic.IsGameMenu())
     {
         if (manager != null && !manager.IsPerformingAction())
         {
             manager.Save();
         }
     }
 }