void Update() { if (!mouseInput.SelectionButtonUp()) { return; } onPress?.Invoke(mouseInput.MousePosition()); }
public void InvokeMove(Vector2 v) { move.Invoke(v); if (CheckMove(v)) { moveUpdate.Invoke(v); print("move update"); } lastMove = v; }
//Calculate target point for bullet public void ResolveFire(Vector2 position) { RaycastHit hit; Ray ray = Camera.main.ScreenPointToRay(position); if (Physics.Raycast(ray, out hit)) { OnFire.Invoke(hit.point); } }
void Update() { var o = curve.Evaluate(reaktor.Output); if (optionType == OptionType.Bool) { boolTarget.Invoke(0.5f <= o); } else if (optionType == OptionType.Int) { intTarget.Invoke((int)o); } else if (optionType == OptionType.Vector) { vectorTarget.Invoke(origin + direction * o); } else { floatTarget.Invoke(o); } }