示例#1
0
 // Use this for initialization
 void Start()
 {
     focusVodget = focus_vodget;
     SetCursor();
     focus_vodget.Focus(this, true);
     focus_vodget.Button(this, ButtonType.Trigger, true);
 }
示例#2
0
        // This method is provided to allow buttons to be sent from outside components (See: Controller)
        public void SendButtonEvent(ButtonType button, bool state)
        {
            // Automatically forward all button events to the current focus vodget if not null.
            // Note: This was originally a virtual abstract method but when all selectors
            // implemented it exactly the same way it was migrated up to a non-virtual parent class method.
            if (focusVodget != null)
            {
                SetCursor();
                focusVodget.Button(this, button, state);
            }

            // Send all button events to any other remote clients that are not Vodgets (See: WorldGrabber).
            if (ButtonEvt != null)
            {
                ButtonEvt.Invoke(button, state);
            }
        }