Beispiel #1
0
 /// <summary>
 /// Initializes a new instance of the
 /// <see cref="Ereadian.RaspberryPi.Library.Hardware.Joysticks.JoystickEvent"/> class.
 /// </summary>
 /// <param name="eventTimestamp">Event timestamp.</param>
 /// <param name="value">Value.</param>
 /// <param name="eventType">Event type.</param>
 /// <param name="number">Number.</param>
 public JoystickEvent(uint eventTimestamp, int value, JoystickEventType eventType, int number)
 {
     this.EventTimestamp = eventTimestamp;
     this.Value          = value;
     this.EventType      = eventType;
     this.Number         = number;
 }
Beispiel #2
0
 void Echo(JoystickEventType type, Vector3 direction, Quaternion rotation)
 {
     if (OnJoystickEvent != null)
     {
         OnJoystickEvent(this, new LMWidgets.EventArg <JoystickEvent> (new JoystickEvent(type, direction, rotation)));
     }
 }
Beispiel #3
0
        /// <summary>
        /// Type constructor
        /// </summary>
        static JoystickEvent()
        {
            var enventNames = Enum.GetNames(typeof(JoystickEventType));
            var eventTypes  = new JoystickEventType[enventNames.Length];

            for (var i = 0; i < enventNames.Length; i++)
            {
                eventTypes[i] = (JoystickEventType)Enum.Parse(typeof(JoystickEventType), enventNames[i]);
            }

            AllJoystickEventTypes = eventTypes;
        }
				public Quaternion Rotation; // global coordinate rotation from reference to draggable

				public JoystickEvent (JoystickEventType type, Vector3 location, Quaternion rotation)
				{
						Type = type;
						Direction = location;
						Rotation = rotation;
				}
Beispiel #5
0
 void Echo(JoystickEventType type, Vector3 direction, Quaternion rotation)
 {
     if (OnJoystickEvent != null) {
                         OnJoystickEvent (this, new LMWidgets.EventArg<JoystickEvent> (new JoystickEvent (type, direction, rotation)));
                 }
 }
        public Quaternion        Rotation;                // global coordinate rotation from reference to draggable

        public JoystickEvent(JoystickEventType type, Vector3 location, Quaternion rotation)
        {
            Type      = type;
            Direction = location;
            Rotation  = rotation;
        }