Ejemplo n.º 1
0
 public void AddStateChangeMonitorTimeout(InputControl control, IInputStateChangeMonitor monitor, double time, long monitorIndex, int timerIndex)
 {
     m_StateChangeMonitorTimeouts.Append(
         new StateChangeMonitorTimeout
     {
         control      = control,
         time         = time,
         monitor      = monitor,
         monitorIndex = monitorIndex,
         timerIndex   = timerIndex,
     });
 }
Ejemplo n.º 2
0
        private static InputDevice CreateOnScreenDevice(string layout, OnScreenControl onScreenControl)
        {
            var           device = InputSystem.AddDevice(layout);
            InputEventPtr eventPtr;
            var           buffer = StateEvent.From(device, out eventPtr, Allocator.Persistent);

            OnScreenDeviceEventInfo deviceEventInfo;

            deviceEventInfo.eventPtr     = eventPtr;
            deviceEventInfo.buffer       = buffer;
            deviceEventInfo.device       = device;
            deviceEventInfo.firstControl = onScreenControl;

            s_DeviceEventInfoArray.Append(deviceEventInfo);

            return(device);
        }
Ejemplo n.º 3
0
    public void Utilities_InlinedArray_CanRemoveElementAtIndex(int count, int removeAt)
    {
        var comparisonList = new List <string>();
        var array          = new InlinedArray <string>();

        for (var i = 0; i < count; ++i)
        {
            comparisonList.Add(i.ToString());
            array.Append(i.ToString());
        }

        Assert.That(array.length, Is.EqualTo(comparisonList.Count));

        array.RemoveAt(removeAt);
        comparisonList.RemoveAt(removeAt);

        Assert.That(array, Is.EquivalentTo(comparisonList));
    }