Пример #1
0
 public WandEvent(CAVE2PlayerIdentity id, int wand, Button b, InteractionType t)
 {
     playerID        = id;
     wandID          = wand;
     button          = b;
     interactionType = t;
 }
    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);
        }
    }
Пример #3
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);
    }
 // Use this for initialization
 void Start()
 {
     playerID = GetComponentInParent <CAVE2PlayerIdentity>();
 }
Пример #5
0
 public ButtonInfo(CAVE2PlayerIdentity id, int wand, Button b)
 {
     playerID = id;
     wandID   = wand;
     button   = b;
 }