![]() |
Gondwana Game Engine Development (master) - 2.6.1
Gondwana is a cross-platform 2.5D game and rendering engine written in C#/.NET 8. It provides fine-grained control over rendering, timing, and scene composition, with built-in support for parallax, z-ordering, pixel overhang, collision detection, and particle effects. Gondwana targets desktop and web platforms using SkiaSharp for graphics and pluggable audio backends for desktop and browser targets.
|
Represents the state and parameters of a scripted movement operation applied to an object. Supports two movement modes: tween-based interpolation (MovementScriptType.TweenTo) and continuous directional movement (MovementScriptType.Toward). More...
Public Attributes | |
| MovementScriptType | Type |
| The type of movement script currently active. Determines which fields are relevant and how the movement is calculated. See MovementScriptType for available movement modes. | |
| Vector2 | Origin |
| The starting position captured when the movement script was initiated. Used primarily by MovementScriptType.TweenTo to calculate interpolation between the origin and target over the specified duration. | |
| Vector2 | Target |
| The target position or destination for the movement. For MovementScriptType.TweenTo, this is the final position after interpolation completes. For MovementScriptType.Toward, this is the position the object continuously moves toward. | |
| float | DurationSec |
| The total duration of the movement in seconds. Only used by MovementScriptType.TweenTo to determine the interpolation timeframe. The tween completes when ElapsedSec reaches this value, regardless of distance traveled. | |
| float | ElapsedSec |
| The elapsed time in seconds since the movement script started. Only used by MovementScriptType.TweenTo to track progress through the tween. Normalized to [0,1] as (ElapsedSec / DurationSec) before applying the easing function. | |
| float | SpeedPerSec |
| The movement speed in units per second. Only used by MovementScriptType.Toward for continuous directional movement. Determines how quickly the object moves toward the target position each frame. | |
| float | SnapEpsilon |
| The distance threshold for snapping to the target position. When the object is within this epsilon distance from the target, it snaps exactly to the target and the movement is considered complete. Prevents endless micro-adjustments and floating-point precision issues. Used by both MovementScriptType.TweenTo and MovementScriptType.Toward. | |
| Func< float, float >? | Easing |
| Optional easing function applied to the normalized time value during interpolation. Only used by MovementScriptType.TweenTo to control the acceleration curve. If null, linear interpolation is used. See Gondwana.Physics.Movement.Easing.EasingFunctions for available easing curves. The function should accept a value in [0,1] and return a smoothed value in [0,1]. | |
Represents the state and parameters of a scripted movement operation applied to an object. Supports two movement modes: tween-based interpolation (MovementScriptType.TweenTo) and continuous directional movement (MovementScriptType.Toward).
Definition at line 10 of file ScriptedMovement.cs.
| float Gondwana.Physics.Movement.Scripted.ScriptedMovement.DurationSec |
The total duration of the movement in seconds. Only used by MovementScriptType.TweenTo to determine the interpolation timeframe. The tween completes when ElapsedSec reaches this value, regardless of distance traveled.
Definition at line 38 of file ScriptedMovement.cs.
| Func<float, float>? Gondwana.Physics.Movement.Scripted.ScriptedMovement.Easing |
Optional easing function applied to the normalized time value during interpolation. Only used by MovementScriptType.TweenTo to control the acceleration curve. If null, linear interpolation is used. See Gondwana.Physics.Movement.Easing.EasingFunctions for available easing curves. The function should accept a value in [0,1] and return a smoothed value in [0,1].
Definition at line 68 of file ScriptedMovement.cs.
| float Gondwana.Physics.Movement.Scripted.ScriptedMovement.ElapsedSec |
The elapsed time in seconds since the movement script started. Only used by MovementScriptType.TweenTo to track progress through the tween. Normalized to [0,1] as (ElapsedSec / DurationSec) before applying the easing function.
Definition at line 45 of file ScriptedMovement.cs.
| Vector2 Gondwana.Physics.Movement.Scripted.ScriptedMovement.Origin |
The starting position captured when the movement script was initiated. Used primarily by MovementScriptType.TweenTo to calculate interpolation between the origin and target over the specified duration.
Definition at line 24 of file ScriptedMovement.cs.
| float Gondwana.Physics.Movement.Scripted.ScriptedMovement.SnapEpsilon |
The distance threshold for snapping to the target position. When the object is within this epsilon distance from the target, it snaps exactly to the target and the movement is considered complete. Prevents endless micro-adjustments and floating-point precision issues. Used by both MovementScriptType.TweenTo and MovementScriptType.Toward.
Definition at line 60 of file ScriptedMovement.cs.
| float Gondwana.Physics.Movement.Scripted.ScriptedMovement.SpeedPerSec |
The movement speed in units per second. Only used by MovementScriptType.Toward for continuous directional movement. Determines how quickly the object moves toward the target position each frame.
Definition at line 52 of file ScriptedMovement.cs.
| Vector2 Gondwana.Physics.Movement.Scripted.ScriptedMovement.Target |
The target position or destination for the movement. For MovementScriptType.TweenTo, this is the final position after interpolation completes. For MovementScriptType.Toward, this is the position the object continuously moves toward.
Definition at line 31 of file ScriptedMovement.cs.
| MovementScriptType Gondwana.Physics.Movement.Scripted.ScriptedMovement.Type |
The type of movement script currently active. Determines which fields are relevant and how the movement is calculated. See MovementScriptType for available movement modes.
Definition at line 17 of file ScriptedMovement.cs.