public override void PlayerControl(Input input) { if (input.BtnClicked(InputButtons.RightTrigger_Mouse1)) { RandomizeSymmetry(); } else if (input.BtnClicked(InputButtons.RightBumper_E)) { if (links.Count != 0) { DestroyLink(links.Dequeue()); } } else if (input.BtnClicked(InputButtons.LeftBumper_Q)) { int count = links.Count; for (int i = 0; i < count; i++) { DestroyLink(links.Dequeue()); } } }
public override void PlayerControl(Input input) { if (fireMode == mode.SingleFire) { if (input.BtnDown(InputButtons.RightTrigger_Mouse1)) { if (!input.oldInputState.IsButtonDown(InputButtons.RightTrigger_Mouse1)) { FireNode(input.GetRightStick()); } else if (steerNode && lastFired != null) { lastFired.body.velocity = VMath.VectorRotateLerp(lastFired.body.velocity, input.GetRightStick(), 0.02f); } } } else if (fireMode == mode.AutoFire) { if (input.BtnDown(InputButtons.RightTrigger_Mouse1)) { if (shootingDelayCount++ % shootingDelay == 0) { FireNode(input.GetRightStick()); } } } if (input.BtnClicked(InputButtons.RightBumper_E)) { if (room.groups.general.childGroups.Values.Count < 2) return; bool next = false; var tempGroup = room.groups.general.childGroups; for (int i = 0; i < tempGroup.Values.Count; i++) { Group g = tempGroup.Values.ElementAt(i); if (next) { currentGroup = g; break; } if (g == currentGroup) { if (i == tempGroup.Values.Count - 1) { currentGroup = tempGroup.Values.ElementAt(0); break; } next = true; } } } }
public override void PlayerControl(Input input) { stick = input.GetRightStick(); if (input.BtnDown(InputButtons.RightTrigger_Mouse1)) { if (!beamNode.active) beamNode.active = true; if (currentlyColliding.Count != 0) { if (goThrough) { int count = currentlyColliding.Count; for (int i = 0; i < count; i++) { ApplyEffect(currentlyColliding.Dequeue()); } ResizeBeam(maxLength); } else { int count = currentlyColliding.Count; float closest = float.MaxValue; Node closestNode = null; for (int i = 0; i < count; i++) { Node n = currentlyColliding.Dequeue(); float dist = (n.body.pos - parent.body.pos).Length(); if (dist < closest) { closest = dist; closestNode = n; } } currentLength = closest - closestNode.body.radius * 0.9f; //only support for circles for now if (currentLength > maxLength) currentLength = maxLength; ResizeBeam(currentLength); ApplyEffect(closestNode); } } else { if (growing) { currentLength = Math.Min(maxLength, currentLength + growthRate); ResizeBeam(currentLength); } else { ResizeBeam(maxLength); } } } else { if (beamNode.active) beamNode.active = false; currentLength = minLength; } }
public virtual void PlayerControl(Input input) { }
public override void PlayerControl(Input input) { if (input.BtnClicked(InputButtons.RightTrigger_Mouse1)) { RandomizeSpinningLines(); } else if (input.BtnClicked(InputButtons.RightBumper_E)) { if (spinningLines.Count != 0) { spinningLines.Dequeue(); } } else if (input.BtnClicked(InputButtons.LeftBumper_Q)) { int count2 = spinningLines.Count; for (int i = 0; i < count2; i++) { spinningLines.Dequeue(); } } if (spinningLines.Count > 0) { Color c = ColorChanger.getColorFromHSV(input.newInputState.RightStick_Mouse.AsDegrees); foreach (var line in spinningLines) { line.UpdateLines(); line.DrawLines(this, c); } } }