Esempio n. 1
0
 void OnMucusFieldInputLockChange(MucusGatherInputField input)
 {
     if (input.isLocked)
     {
         SetPointerActive(false);
         SetPointerDisplayActive(false);
     }
 }
Esempio n. 2
0
    void OnMucusFieldInputDrag(MucusGatherInputField input)
    {
        var origin = input.originPosition;
        var pos    = input.currentPosition;

        bool pointerActive = IsValidLaunch(input);// !mucusGather.Contains(pos) && input.currentAreaType == MucusGatherInputField.AreaType.Top;

        if (pointerActive)
        {
            pointer.position = new Vector3(pos.x, pos.y, pointer.position.z);
        }

        SetPointerDisplayActive(pointerActive);
    }
Esempio n. 3
0
    bool IsValidLaunch(MucusGatherInputField input)
    {
        if (Vector2.Angle(Vector2.up, input.dir) > launchAngleLimit)
        {
            return(false);
        }

        if (input.curLength < input.currentLaunchInput.radius)
        {
            return(false);
        }

        return(true);
    }
Esempio n. 4
0
    void OnMucusFieldInputUp(MucusGatherInputField input)
    {
        SetPointerActive(false);
        SetPointerDisplayActive(false);

        Vector2 pos = input.currentPosition;

        bool pointerActive = IsValidLaunch(input);

        if (pointerActive)
        {
            input.Launch(mucusFormBounds);
        }
        else
        {
            input.Cancel();
        }
    }
Esempio n. 5
0
    void OnMucusFieldInputDown(MucusGatherInputField input)
    {
        pointerAttach.target = input.currentLaunchInput.transform;

        SetPointerActive(true);
    }