Ejemplo n.º 1
0
    void CheckIfBoxPlacedOnSphere()
    {
        Box    box    = ObjectToMove.GetBox();
        Sphere sphere = null;

        if (GetUIObjectAtMousePos() != null)
        {
            sphere = GetUIObjectAtMousePos().GetSphere();
        }

        // THIS NEEDS TO BE FIXED
        if (box != null && box.IsMoveable && sphere != null && sphere.character != null)
        {
            MoveObjectBack = false;
            GameManager.Instance.BoxGivenToCharacter(box, sphere);
        }
    }