void OnWandButtonDown(CAVE2.Button clickButton)
 {
     if (clickButton == dropButton)
     {
         Drop();
     }
 }
Exemple #2
0
 public OmicronController.ButtonState GetButtonState(int wandID, CAVE2.Button button)
 {
     if (wandControllers != null && wandControllers.ContainsKey(wandID))
     {
         OmicronController wandController = (OmicronController)wandControllers[wandID];
         return(wandController.GetButtonState(button));
     }
     return(OmicronController.ButtonState.Idle);
 }
Exemple #3
0
 public bool GetButtonUp(int wandID, CAVE2.Button button)
 {
     if (wandControllers.ContainsKey(wandID))
     {
         OmicronController wandController = (OmicronController)wandControllers[wandID];
         return(wandController.GetButtonState(button) == OmicronController.ButtonState.Up);
     }
     return(false);
 }
Exemple #4
0
 void OnWandButtonHoldTrigger(CAVE2.Button button)
 {
     if (explosionEffect)
     {
         GameObject explodie = Instantiate(explosionEffect, transform.position, transform.rotation) as GameObject;
         Destroy(explodie, 3);
     }
     Destroy(gameObject);
 }
    new public void OnWandButtonDown(CAVE2.WandEvent evt)
    {
        CAVE2PlayerIdentity playerID = (CAVE2PlayerIdentity)evt.playerID;
        int wandID = (int)evt.wandID;

        CAVE2.Button button = (CAVE2.Button)evt.button;

        if (wandID == this.wandID && button == this.button)
        {
            CAVE2.LoadScene(sceneName);
        }
    }
Exemple #6
0
    public void OnWandButtonDown(CAVE2.WandEvent evt)
    {
        CAVE2PlayerIdentity playerID = evt.playerID;
        int wandID = evt.wandID;

        CAVE2.Button          button          = evt.button;
        CAVE2.InteractionType interactionType = evt.interactionType;


        Debug.Log("OnWandButtonDown: " + playerID.name + " " + wandID + " " + button);

        if (button == triggerButton && Vector3.Distance(player.transform.position, transform.position) < 10)
        {
            isOn = !isOn;

            UpdateItems();
        }


        //Debug.Log("OnWandButtonDown: ");
        //Debug.Log(evt);
    }
    public ButtonState GetButtonState(CAVE2.Button button)
    {
        switch (button)
        {
        case CAVE2.Button.Button1: return(Button1);

        case CAVE2.Button.Button2: return(Button2);

        case CAVE2.Button.Button3: return(Button3);

        case CAVE2.Button.Button4: return(Button4);

        case CAVE2.Button.Button5: return(Button5);

        case CAVE2.Button.Button6: return(Button6);

        case CAVE2.Button.Button7: return(Button7);

        case CAVE2.Button.Button8: return(Button8);

        case CAVE2.Button.Button9: return(Button9);

        case CAVE2.Button.SpecialButton1: return(SpecialButton1);

        case CAVE2.Button.SpecialButton2: return(SpecialButton2);

        case CAVE2.Button.SpecialButton3: return(SpecialButton3);

        case CAVE2.Button.ButtonUp: return(ButtonUp);

        case CAVE2.Button.ButtonDown: return(ButtonDown);

        case CAVE2.Button.ButtonLeft: return(ButtonLeft);

        case CAVE2.Button.ButtonRight: return(ButtonRight);
        }
        return(ButtonState.Idle);
    }
Exemple #8
0
    public static string CAVE2ToGetReal3DButton(CAVE2.Button name)
    {
        switch (name)
        {
        case CAVE2.Button.Button3: return("WandButton");

        case CAVE2.Button.Button2: return("ChangeWand");

        case CAVE2.Button.Button8: return("Reset");

        case CAVE2.Button.Button1: return("Jump");

        case CAVE2.Button.Button5: return("WandLook");

        case CAVE2.Button.Button4: return("NavSpeed");

        case CAVE2.Button.Button7: return("WandDrive");

        case CAVE2.Button.SpecialButton3: return("RT");

        case CAVE2.Button.Button6: return("L3");

        case CAVE2.Button.Button9: return("R3");

        case CAVE2.Button.SpecialButton1: return("Back");

        case CAVE2.Button.SpecialButton2: return("Start");

        case CAVE2.Button.ButtonUp: return("DPadUD");

        case CAVE2.Button.ButtonDown: return("DPadUD");

        case CAVE2.Button.ButtonLeft: return("DPadLR");

        case CAVE2.Button.ButtonRight: return("DPadLR");
        }
        return("");
    }
Exemple #9
0
    void OnWandButtonClick(CAVE2.Button button)
    {
        if (hideGUI)
        {
            return;
        }

        if (button == CAVE2.Button.ButtonDown)
        {
            currentRow++;
        }
        if (button == CAVE2.Button.ButtonUp)
        {
            currentRow--;
        }

        if (currentRow >= textLines.Length)
        {
            currentRow = textLines.Length - 1;
        }
        if (currentRow < 0)
        {
            currentRow = 0;
        }

        if (button == CAVE2.Button.ButtonLeft)
        {
        }
        else if (button == CAVE2.Button.ButtonRight)
        {
        }
        else if (button == CAVE2.Button.Button3)
        {
            jumper.WarpTo(currentRow);
        }
    }
Exemple #10
0
 public static OmicronController.ButtonState GetButtonState(int wandID, CAVE2.Button button)
 {
     return(CAVE2Manager.GetButtonState(wandID, button));
 }
Exemple #11
0
 public static bool GetButtonUp(int wandID, CAVE2.Button button)
 {
     return(CAVE2Manager.GetButtonUp(wandID, button));
 }
Exemple #12
0
 public static bool GetButtonDown(int wandID, CAVE2.Button button)
 {
     return(CAVE2.Input.GetButtonDown(wandID, button));
 }
Exemple #13
0
 public static string CAVE2ToGetReal3DButton(CAVE2.Button name)
 {
     return(CAVE2Manager.CAVE2ToGetReal3DButton(name));
 }
Exemple #14
0
 void OnWandButtonHold(CAVE2.Button button)
 {
     SendMessageUpwards("OnWandButtonHoldTrigger", button);
 }
Exemple #15
0
 public void OnWandButtonUp(CAVE2.Button button)
 {
     // Deprecated - Legacy Support Only
 }