API ReferenceSandbox
Curveclass
Describes a curve, which can have multiple key frames.
object→Curve
Constructors4
Showing 4 constructors
No results match this filter.
Methods16
Showing 16 methods
public bool AddOrReplacePoint(Sandbox.Curve.Frame keyframe)
Add given keyframe to this curve.
| Parameter | Type | Description |
|---|---|---|
| keyframe | Frame | — |
Returns:
boolTrue if we added a new point. False if we just edited an existing point.public void Fix()
If the curve is broken in some way, we can fix it here. Ensures correct time and value ranges, and that the curve has at least one point.
Returns:
void—public void RemoveAtTime(float time, float within)
Remove all of the frames at the current time
| Parameter | Type | Description |
|---|---|---|
| time | float | — |
| within | float | — |
Returns:
void—public Sandbox.Curve Reverse()
Make a copy of this curve that is reversed (If input eases from 0 to 1 then output will ease from 1 to 0)
public void Sort()
Make sure we're all sorted by time
Returns:
void—public void UpdateTimeRange(Vector2 newRange, bool retainTimes)
| Parameter | Type | Description |
|---|---|---|
| newRange | Vector2 | — |
| retainTimes | bool | — |
Returns:
void—public void UpdateValueRange(Vector2 newRange, bool retainValues)
| Parameter | Type | Description |
|---|---|---|
| newRange | Vector2 | — |
| retainValues | bool | — |
Returns:
void—No results match this filter.
Properties4
Showing 4 properties
public int Sandbox.Curve.Length { get; set; }
Amount of key frames or points on the curve.
Returns:
int—No results match this filter.