on trigger btn toggle menu
This commit is contained in:
parent
ab53957e80
commit
9fa2884bfe
3 changed files with 26 additions and 2 deletions
14
src/Arts.cs
14
src/Arts.cs
|
@ -59,6 +59,20 @@ static class Arts
|
|||
if (Mono.menu)
|
||||
{
|
||||
meshes["Tape"].Draw(mat_mono, Matrix.Identity);
|
||||
meshes["uiPlay"].Draw(
|
||||
mat_unlit,
|
||||
Matrix.TR(
|
||||
V.XYZ(0, 0, Mono.SD_Z + 0.5f + 0.1f),
|
||||
Quat.FromAngles(90, 0, 0)
|
||||
)
|
||||
);
|
||||
meshes["uiCursor"].Draw(
|
||||
mat_unlit,
|
||||
Matrix.TR(
|
||||
V.XYZ(0, 0, Mono.SD_Z + 0.5f + 0.2f),
|
||||
Quat.FromAngles(90, 0, 0)
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
// snake
|
||||
|
|
|
@ -42,10 +42,15 @@ static class Mono
|
|||
|
||||
public static void Frame()
|
||||
{
|
||||
if (Rig.btn_trigger.delta == +1)
|
||||
{
|
||||
menu = !menu;
|
||||
}
|
||||
|
||||
// flatscreen dev controls
|
||||
if (Device.Name == "Simulator")
|
||||
{
|
||||
if (Input.Key(Key.MouseLeft).IsActive())
|
||||
if (Input.Key(Key.MouseCenter).IsActive())
|
||||
{
|
||||
float sx = Maths.s_scalar(Input.Mouse.pos.x / 640);
|
||||
float ssx = Maths.smooth_start(sx);
|
||||
|
|
|
@ -6,6 +6,8 @@ static class Rig
|
|||
{
|
||||
public static Pose head = Pose.Identity;
|
||||
|
||||
public static DeltaBool btn_trigger = new(false);
|
||||
|
||||
public static Vec3 fullstick = Vec3.Up;
|
||||
public static Pose r_con_stick = Pose.Identity;
|
||||
|
||||
|
@ -23,19 +25,22 @@ static class Rig
|
|||
// flatscreen dev controls
|
||||
if (Device.Name == "Simulator")
|
||||
{
|
||||
btn_trigger.Step(Input.Key(Key.MouseLeft).IsActive());
|
||||
|
||||
if (Input.Key(Key.A).IsJustActive()) new_dir = new(-1, 0, 0);
|
||||
if (Input.Key(Key.S).IsJustActive()) new_dir = new(+1, 0, 0);
|
||||
if (Input.Key(Key.W).IsJustActive()) new_dir = new(0, 0, -1);
|
||||
if (Input.Key(Key.R).IsJustActive()) new_dir = new(0, 0, +1);
|
||||
if (Input.Key(Key.Shift).IsJustActive()) new_dir = new(0, -1, 0);
|
||||
if (Input.Key(Key.Space).IsJustActive()) new_dir = new(0, +1, 0);
|
||||
|
||||
fullstick = new_dir.ToVec3;
|
||||
}
|
||||
else
|
||||
{
|
||||
Hand r_hand = Input.Hand(Handed.Right);
|
||||
Controller r_con = Input.Controller(Handed.Right);
|
||||
btn_trigger.Step(r_con.trigger > 0.5f);
|
||||
|
||||
bool con_tracked = r_con.trackedPos > TrackState.Lost;
|
||||
Input.HandVisible(Handed.Max, !con_tracked);
|
||||
if (con_tracked)
|
||||
|
|
Loading…
Add table
Reference in a new issue