Example #1
0
    public void CloseMenu(WhichID whichID)
    {
        switch (whichID)
        {
        case WhichID.Right:
            godData.rightRadialMenu.transform.parent.GetComponent <Canvas>().enabled = false;
            switch (godData.RightControllerStuff.State)
            {
            case ControllerState.Display:
                godData.RightControllerStuff.State = godData.RightControllerStuff.PreviousState;
                break;
            }
            break;

        case WhichID.Left:
            godData.leftRadialMenu.transform.parent.GetComponent <Canvas>().enabled = false;
            switch (godData.LeftControllerStuff.State)
            {
            case ControllerState.Display:
                godData.LeftControllerStuff.State = godData.LeftControllerStuff.PreviousState;
                break;
            }
            break;
        }
    }
Example #2
0
    public void TriggerDown(WhichID whichID)
    {
        switch (whichID)
        {
        case WhichID.Right:

            switch (godData.RightControllerStuff.State)
            {
            case ControllerState.Empty:
                PickUp(godData.RightControllerStuff, godData.rightControllerAttach, godData.LeftControllerStuff);
                break;

            case ControllerState.Display:
                godData.rightRadialMenu.ExecuteSelectedButton();
                break;
            }

            break;

        case WhichID.Left:

            switch (godData.LeftControllerStuff.State)
            {
            case ControllerState.Empty:
                PickUp(godData.LeftControllerStuff, godData.leftControllerAttach, godData.RightControllerStuff);
                break;

            case ControllerState.Display:
                godData.leftRadialMenu.ExecuteSelectedButton();
                break;
            }

            break;
        }
    }
Example #3
0
    public void GripUp(WhichID whichID)
    {
        switch (whichID)
        {
        case WhichID.Right:
            if (!godData.LeftControllerStuff.Planning_To_Teleport)
            {
                if (godData.RightControllerStuff.Planning_To_Teleport)
                {
                    godData.RightControllerStuff.Planning_To_Teleport = false;
                    TeleportOnButtonUp(godData.rightControllerAttach);
                }
            }

            break;

        case WhichID.Left:
            if (!godData.RightControllerStuff.Planning_To_Teleport)
            {
                if (godData.LeftControllerStuff.Planning_To_Teleport)
                {
                    godData.LeftControllerStuff.Planning_To_Teleport = false;
                    TeleportOnButtonUp(godData.leftControllerAttach);
                }
            }

            break;
        }
    }
Example #4
0
    public void TrackPadClickDown(WhichID whichID)
    {
        switch (whichID)
        {
        case WhichID.Right:

            switch (godData.RightControllerStuff.State)
            {
            case ControllerState.Display:
                godData.rightRadialMenu.ExecuteSelectedButton();
                break;
            }

            break;

        case WhichID.Left:

            switch (godData.LeftControllerStuff.State)
            {
            case ControllerState.Display:
                godData.leftRadialMenu.ExecuteSelectedButton();
                break;
            }

            break;
        }
    }
Example #5
0
    public void TrackPadClickUp(WhichID whichID)
    {
        switch (whichID)
        {
        case WhichID.Right:

            switch (godData.RightControllerStuff.State)
            {
            case ControllerState.Display:


                break;
            }

            break;

        case WhichID.Left:

            switch (godData.LeftControllerStuff.State)
            {
            case ControllerState.Display:


                break;
            }

            break;
        }
    }
Example #6
0
    public void OpenMenu(WhichID whichID)
    {
        switch (whichID)
        {
        case WhichID.Right:
            godData.rightRadialMenu.transform.parent.GetComponent <Canvas>().enabled = true;
            godData.RightControllerStuff.State = ControllerState.Display;
            break;

        case WhichID.Left:
            godData.leftRadialMenu.transform.parent.GetComponent <Canvas>().enabled = true;
            godData.LeftControllerStuff.State = ControllerState.Display;
            break;
        }
    }
Example #7
0
    private void ExecuteActions(InputPacket[] inputPackets, BitArray outPut, WhichID hand)
    {
        for (int i = 0; i < inputPackets.Length; i++)
        {
            //Get the Index of the InputID & UpDownID
            int index = (int)inputPackets[i].InputID * 2 + (int)inputPackets[i].UpDownID;

            // Then run the action that RightInputPackets is holding if the Index is True;
            if (outPut[index])
            {
                //Check all registred ActionKVP for one that correspond to the action registerd in the Packet
                for (int j = 0; j < ActionDictionary.ActionKVPs.Length; j++)
                {
                    if (ActionDictionary.ActionKVPs[j].ActionID == inputPackets[i].ActionID)
                    {
                        ActionDictionary.ActionKVPs[j].ActionDelegate.Invoke(hand);
                    }
                }
            }
        }
    }
Example #8
0
    public void GripDown(WhichID whichID)
    {
        switch (whichID)
        {
        case WhichID.Right:
            if (!godData.LeftControllerStuff.Planning_To_Teleport)
            {
                TeleportOnButtonDown(godData.rightControllerAttach);
                godData.RightControllerStuff.Planning_To_Teleport = true;
            }
            break;

        case WhichID.Left:

            if (!godData.RightControllerStuff.Planning_To_Teleport)
            {
                TeleportOnButtonDown(godData.leftControllerAttach);
                godData.LeftControllerStuff.Planning_To_Teleport = true;
            }
            break;
        }
    }
Example #9
0
    public void MenuSelection(WhichID whichID, float horizontal, float vertical)
    {
        switch (whichID)
        {
        case WhichID.Right:
            if (godData.rightRadialMenu.gameObject.activeInHierarchy)
            {
                godData.rightRadialMenu.CheckSelection(horizontal, vertical);
            }
            break;

        case WhichID.Left:
            if (godData.leftRadialMenu.gameObject.activeInHierarchy)
            {
                godData.leftRadialMenu.CheckSelection(horizontal, vertical);
            }
            break;

        default:
            break;
        }
    }
Example #10
0
    public void TriggerUp(WhichID whichID)
    {
        switch (whichID)
        {
        case WhichID.Right:

            switch (godData.RightControllerStuff.State)
            {
            case ControllerState.Holding:

                if (!Place(godData.RightControllerStuff, godData.rightControllerAttach.position))
                {
                    Throw(godData.RightControllerStuff, godData.rightControllerPoint);
                }

                break;
            }

            break;

        case WhichID.Left:

            switch (godData.LeftControllerStuff.State)
            {
            case ControllerState.Holding:

                if (!Place(godData.LeftControllerStuff, godData.leftControllerAttach.position))
                {
                    Throw(godData.LeftControllerStuff, godData.leftControllerPoint);
                }

                break;
            }

            break;
        }
    }
Example #11
0
 public void TrackPadClickUp(WhichID id)
 {
     controller.TrackPadClickUp(id);
 }
Example #12
0
 public void TrackPadClickDown(WhichID id)
 {
     controller.TrackPadClickDown(id);
 }
Example #13
0
 public void ReceiveTrackPadPositions(WhichID hand, float horizontal, float vertical)
 {
     gameController.ReceiveTrackPadPosition(hand, horizontal, vertical);
 }
Example #14
0
 internal void ReceiveTrackPadPosition(WhichID whichID, float horizontal, float vertical)
 {
     // Update the position for the radial menu for the hand.
     //UnityEngine.Debug.Log(whichID + " Trackpad Position");
     ServiceLocator.GodMasterService.SendTrackPadPosition(whichID, horizontal, vertical);
 }
Example #15
0
 public void TeleportMove(WhichID whichID)
 {
     ServiceLocator.GodMasterService.GripClickUp(whichID);
 }
Example #16
0
 public void GripClickDown(WhichID id)
 {
     controller.GripDown(id);
 }
Example #17
0
 public void TriggerClickUp(WhichID id)
 {
     controller.TriggerUp(id);
 }
Example #18
0
 public void TriggerClickDown(WhichID id)
 {
     controller.TriggerDown(id);
 }
Example #19
0
 public void ReceiveTrackPadPositions(WhichID hand, float horizontal, float vertical)
 {
 }
Example #20
0
 public void TriggerUp(WhichID id)
 {
 }
Example #21
0
 public void TriggerDown(WhichID id)
 {
 }
Example #22
0
 public void CloseMenu(WhichID whichID)
 {
     ServiceLocator.GodMasterService.CloseControllerMenu(whichID);
 }
Example #23
0
 public void OpenMenu(WhichID whichID)
 {
     ServiceLocator.GodMasterService.OpenControllerMenu(whichID);
 }
Example #24
0
 // Needs new Name
 public void Goodbye(WhichID whichID)
 {
     ServiceLocator.GodMasterService.TriggerClickUp(whichID);
 }
Example #25
0
 public void OpenControllerMenu(WhichID id)
 {
     controller.OpenMenu(id);
 }
Example #26
0
 public void CloseControllerMenu(WhichID id)
 {
     controller.CloseMenu(id);
 }
Example #27
0
 public void TeleportAim(WhichID whichID)
 {
     ServiceLocator.GodMasterService.GripClickDown(whichID);
 }
Example #28
0
 public void SendTrackPadPosition(WhichID id, float horizontal, float vertical)
 {
     controller.MenuSelection(id, horizontal, vertical);
 }
Example #29
0
 public void GripClickUp(WhichID id)
 {
     controller.GripUp(id);
 }
Example #30
0
 public void TrackPadClickDown(WhichID whichID)
 {
     ServiceLocator.GodMasterService.TrackPadClickDown(whichID);
 }