public void Click(IUser user, Vector3 clickPoint) { var app = App; if (app == null) { return; } _clickAction.StartAction(user, new ButtonData() { targetedPoints = new PointData[1] { PointData.CreateFromGodotVector3(clickPoint, Behavior.Actor.Node3D as Spatial, app.SceneRoot) } }); }
public void EndHover(IUser user, Vector3 hoverPoint) { var app = App; if (app == null) { return; } _hoverAction.StopAction(user, new ButtonData() { targetedPoints = new PointData[1] { PointData.CreateFromGodotVector3(hoverPoint, Behavior.Actor.Node3D as Spatial, app.SceneRoot) } }); }
public void EndButton(IUser user, Vector3 buttonEndPoint) { var app = App; if (app == null) { return; } _buttonAction.StopAction(user, new ButtonData() { targetedPoints = new PointData[1] { PointData.CreateFromGodotVector3(buttonEndPoint, Behavior.Actor.Node3D as Spatial, app.SceneRoot) } }); IsPressed = false; }
public void EndTargeting(IUser user, Vector3 targetPoint) { var app = App; if (app == null || Behavior == null) { return; } var targetData = new TargetData() { targetedPoints = new PointData[1] { PointData.CreateFromGodotVector3(targetPoint, Behavior.Actor.Node3D as Spatial, app.SceneRoot) } }; TargetAction.StopAction(user, targetData); }
internal override void SynchronizeBehavior() { base.SynchronizeBehavior(); var app = App; if (app == null) { return; } if (_hoverPoints.Any()) { _hoverAction.PerformActionUpdate(new ButtonData() { targetedPoints = _hoverPoints.Select((point) => { return(PointData.CreateFromGodotVector3(point, Behavior.Actor.Node3D as Spatial, app.SceneRoot)); }).ToArray() }); _hoverPoints.Clear(); } if (_buttonPressedPoints.Any()) { _buttonAction.PerformActionUpdate(new ButtonData() { targetedPoints = _buttonPressedPoints.Select((point) => { return(PointData.CreateFromGodotVector3(point, Behavior.Actor.Node3D as Spatial, app.SceneRoot)); }).ToArray() }); _buttonPressedPoints.Clear(); } }