Otter
0.9.8.91
2d Game Development Framework based on SFML.Net
|
Component that controls a sine wave. Can be useful for special effects and such. More...
Inherits Otter.Component.
Public Member Functions | |
SineWave (float rate=1, float amp=1, float offset=0) | |
Create a new SineWave. More... | |
SineWave (float rate=1, float min=-1, float max=1, float offset=0) | |
Create a new SineWave. More... | |
Public Member Functions inherited from Otter.Component | |
T | GetEntity< T > () |
Get the Entity as a specific Type. More... | |
virtual void | Added () |
Called when the Component is added to the Entity. More... | |
virtual void | Removed () |
Called when the Component is removed from the Entity. More... | |
void | RemoveSelf () |
Removes the Component from its parent Entity. More... | |
virtual void | UpdateFirst () |
Called during the UpdateFirst on the parent Entity. More... | |
virtual void | Update () |
Called during the Update on the parent Entity. More... | |
virtual void | Render () |
Called during the Render on the parent Entity. More... | |
virtual void | UpdateLast () |
Called during the UpdateLast on the parent Entity. More... | |
T | GetComponent< T > () |
Gets the first Component of type T from this Component's Entity. More... | |
List< T > | GetComponents< T > () |
Gets a list of Components of type T from this Component's Entity. More... | |
Static Public Member Functions | |
static implicit | operator float (SineWave s) |
static implicit | operator int (SineWave s) |
Public Attributes | |
float | Rate |
The rate at which the sine wave moves. More... | |
float | Amplitude |
The amplitude of the sine wave. When not zero Min and Max are ignored. More... | |
float | Offset |
The offset of the value processed. More... | |
float | Min |
The minimum value of the wave. More... | |
float | Max |
The maximum value of the wave. More... | |
Public Attributes inherited from Otter.Component | |
Entity | Entity |
The parent Entity of the Component. More... | |
bool | RenderAfterEntity = true |
Determines if the Component should render after the Entity has rendered. More... | |
bool | Visible = true |
Determines if the Component will render. More... | |
float | Timer = 0 |
How long the Component has been alive (added to an Entity and updated.) More... | |
Properties | |
float | Value [get] |
The current value of the wave. More... | |
Properties inherited from Otter.Component | |
int | InstanceId [get, set] |
The Component's id for the Entity its attached to. More... | |
Scene | Scene [get] |
The Scene that the parent Entity is in. More... | |
Collider | Collider [get] |
The first Collider of the parent Entity. More... | |
Graphic | Graphic [get] |
The first Graphic of the parent Entity. More... | |
List< Graphic > | Graphics [get] |
The list of Graphics from the parent Entity. More... | |
List< Collider > | Colliders [get] |
The list of Colliders from the parent Entity. More... | |
Component that controls a sine wave. Can be useful for special effects and such.
Otter.SineWave.SineWave | ( | float | rate = 1 , |
float | amp = 1 , |
||
float | offset = 0 |
||
) |
Create a new SineWave.
rate | The rate of the wave. |
amp | The amplitude of the wave. |
offset | The offset of the value processed. |
Otter.SineWave.SineWave | ( | float | rate = 1 , |
float | min = -1 , |
||
float | max = 1 , |
||
float | offset = 0 |
||
) |
Create a new SineWave.
rate | The rate of the wave. |
min | The minimum value of the wave. |
max | The maximum value of the wave. |
offset | The offset of the value processed. |
float Otter.SineWave.Amplitude |
The amplitude of the sine wave. When not zero Min and Max are ignored.
float Otter.SineWave.Max |
The maximum value of the wave.
float Otter.SineWave.Min |
The minimum value of the wave.
float Otter.SineWave.Offset |
The offset of the value processed.
float Otter.SineWave.Rate |
The rate at which the sine wave moves.
|
get |
The current value of the wave.