-
Notifications
You must be signed in to change notification settings - Fork 7
/
ControllerPair.cs
39 lines (32 loc) · 1.16 KB
/
ControllerPair.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace TTMulti
{
/// <summary>
/// A pair of controllers. One or more of these can exist in a group.
/// </summary>
class ControllerPair
{
public int PairNumber { get; }
internal ToontownController LeftController { get; }
internal ToontownController RightController { get; }
internal IEnumerable<ToontownController> AllControllers { get; }
public ControllerPair(int groupNumber, int pairNumber)
{
PairNumber = pairNumber;
LeftController = new ToontownController(groupNumber, pairNumber, ControllerType.Left);
RightController = new ToontownController(groupNumber, pairNumber, ControllerType.Right);
AllControllers = new[] { LeftController, RightController };
}
/// <summary>
/// Shut down both controllers in this pair. Must be called when the controllers are no longer needed.
/// </summary>
public void Shutdown()
{
LeftController.Shutdown();
RightController.Shutdown();
}
}
}