-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDemo.cs
More file actions
91 lines (82 loc) · 1.89 KB
/
Demo.cs
File metadata and controls
91 lines (82 loc) · 1.89 KB
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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
using UnityEngine;
using System.Collections;
public class Demo : MonoBehaviour
{
// Use this for initialization
void Start ()
{
}
// Update is called once per frame
void Update ()
{
// Right Buttons
if (ControllerManager.Instance.GetAButton (1))
{
Debug.Log ("A Button Pressed.");
}
if (ControllerManager.Instance.GetBButton(1))
{
Debug.Log ("B Button Pressed.");
}
if (ControllerManager.Instance.GetXButton(1))
{
Debug.Log ("X Button Pressed.");
}
if (ControllerManager.Instance.GetYButton(1))
{
Debug.Log ("Y Button Pressed.");
}
// Middle Buttons
if (ControllerManager.Instance.GetStartButton(1))
{
Debug.Log ("Start Button Pressed.");
}
if (ControllerManager.Instance.GetBackButton(1))
{
Debug.Log ("Back Button Pressed.");
}
// D-Pad Buttons
if (ControllerManager.Instance.GetDPadUp(1))
{
Debug.Log ("Up D-Pad Button Pressed.");
}
if (ControllerManager.Instance.GetDPadDown(1))
{
Debug.Log ("Down D-Pad Button Pressed.");
}
if (ControllerManager.Instance.GetDPadRight(1))
{
Debug.Log ("Right D-Pad Button Pressed.");
}
if (ControllerManager.Instance.GetDPadLeft(1))
{
Debug.Log ("Left D-Pad Button Pressed.");
}
// Bumpers and Triggers
if (ControllerManager.Instance.GetLeftBumper(1))
{
Debug.Log ("Left Bumper Pressed.");
}
if (ControllerManager.Instance.GetRightBumper(1))
{
Debug.Log ("Right Bumper Pressed.");
}
if (ControllerManager.Instance.GetLeftTrigger(1) > 0)
{
Debug.Log ("Left Trigger Pressed.");
}
if (ControllerManager.Instance.GetRightTrigger(1) > 0)
{
Debug.Log ("Right Trigger Pressed.");
}
// Josystick Clicks
if (ControllerManager.Instance.GetRightJoystickClick(1))
{
Debug.Log ("Right Joystick Clicked.");
}
if (ControllerManager.Instance.GetLeftJoystickClick(1))
{
Debug.Log ("Left Joystick Clicked.");
}
}
}