-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathWiimoteState.cs
63 lines (58 loc) · 1.69 KB
/
WiimoteState.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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
using System;
using System.Collections.Generic;
using System.Text;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Input;
namespace TheraWii
{
class WiimoteState : WiiControllerState
{
public ButtonState home;
public ButtonState plus;
public ButtonState minus;
public ButtonState dUp;
public ButtonState dRight;
public ButtonState dDown;
public ButtonState dLeft;
public ButtonState one;
public ButtonState two;
public ButtonState a;
public ButtonState b;
public IRState ir;
public float roll;
public float pitch;
public Vector3 accel;
public WiimoteState()
{
ir = new IRState();
accel = Vector3.Zero;
}
public void Initialize()
{
home = ButtonState.Released;
plus = ButtonState.Released;
minus = ButtonState.Released;
dUp = ButtonState.Released;
dRight = ButtonState.Released;
dDown = ButtonState.Released;
dLeft = ButtonState.Released;
one = ButtonState.Released;
two = ButtonState.Released;
a = ButtonState.Released;
b = ButtonState.Released;
ir = new IRState();
connected = false;
}
public Boolean connected;
public Boolean isConnected()
{
return connected;
}
internal WiimoteState Copy()
{
WiimoteState r = (WiimoteState)this.MemberwiseClone();
r.ir = ir.Copy();
return r;
}
}
}