-
Notifications
You must be signed in to change notification settings - Fork 0
/
Engine.cs
56 lines (50 loc) · 1.57 KB
/
Engine.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
using System.Threading;
using System.Threading.Tasks;
using System.Diagnostics;
namespace Provolver_HalfLifeAlyx
{
public class Engine
{
public bool menuOpen;
private int grenadeLauncherState;
public async Task initSyncAsync()
{
await ForceTubeVRInterface.InitAsync(true);
Thread.Sleep(10000);
}
public void PlayerShoot(string weapon)
{
switch (weapon)
{
case "hlvr_weapon_energygun":
ForceTubeVRInterface.Kick(210, ForceTubeVRChannel.all);
break;
case "hlvr_weapon_rapidfire":
ForceTubeVRInterface.Kick(255, ForceTubeVRChannel.all);
break;
case "hlvr_weapon_shotgun":
ForceTubeVRInterface.Shoot(210, 255, 65f, ForceTubeVRChannel.all);
break;
default:
ForceTubeVRInterface.Kick(210, ForceTubeVRChannel.all);
break;
}
}
public void ClipInserted()
{
ForceTubeVRInterface.Rumble(85, 20f, ForceTubeVRChannel.all);
}
public void ChamberedRound()
{
ForceTubeVRInterface.Rumble(85, 20f, ForceTubeVRChannel.all);
}
public void GrenadeLauncherStateChange(int newState)
{
if (this.grenadeLauncherState == 2 && newState == 0)
{
ForceTubeVRInterface.Shoot(180, 126, 50f, ForceTubeVRChannel.all);
}
this.grenadeLauncherState = newState;
}
}
}