Otter  0.9.8.91
2d Game Development Framework based on SFML.Net
 All Classes Namespaces Functions Variables Enumerations Properties
Otter.Speed Class Reference

Class used for tracking an X and Y speed of an object. Speed also has an XMax and YMax that can be used to clamp the X and Y values automatically. More...

Public Member Functions

 Speed (float x, float y, float maxX, float maxY, bool hardClamp)
 Create a new Speed object. More...
 
 Speed (float x, float y, float maxX, float maxY)
 Create a new Speed object. More...
 
 Speed (float maxX, float maxY)
 Create a new Speed object. More...
 
 Speed (float maxX, float maxY, bool hardClamp)
 Create a new Speed object. More...
 
 Speed (float max, bool hardClamp)
 Create a new Speed object. More...
 
 Speed (float max)
 Create a new Speed object. More...
 
override string ToString ()
 Returns a String that represents this instance. More...
 

Public Attributes

float MaxX
 The maximum X speed. More...
 
float MaxY
 The maximum Y speed. More...
 
bool HardClamp
 Determines if the maximum values will be hard clamped. If true, values will never exceed the maximums. More...
 

Properties

float X [get, set]
 The current X value of the speed. More...
 
float Y [get, set]
 The current Y value of the speed. More...
 
float Max [set]
 Shortcut to set both MaxX and MaxY. More...
 
float Length [get]
 The length of the speed object. More...
 

Detailed Description

Class used for tracking an X and Y speed of an object. Speed also has an XMax and YMax that can be used to clamp the X and Y values automatically.

Constructor & Destructor Documentation

Otter.Speed.Speed ( float  x,
float  y,
float  maxX,
float  maxY,
bool  hardClamp 
)

Create a new Speed object.

Parameters
xThe initial X value.
yThe initial Y value.
maxXThe maximum X value.
maxYThe maximum Y value.
hardClampDetermines if the value can exceed the maximum.
Otter.Speed.Speed ( float  x,
float  y,
float  maxX,
float  maxY 
)

Create a new Speed object.

Parameters
xThe initial X value.
yThe initial Y value.
maxXThe maximum X value.
maxYThe maximum Y value.
Otter.Speed.Speed ( float  maxX,
float  maxY 
)

Create a new Speed object.

Parameters
maxXThe maximum X value.
maxYThe maximum Y value.
Otter.Speed.Speed ( float  maxX,
float  maxY,
bool  hardClamp 
)

Create a new Speed object.

Parameters
maxXThe maximum X value.
maxYThe maximum Y value.
hardClampDetermines if the value can exceed the maximum.
Otter.Speed.Speed ( float  max,
bool  hardClamp 
)

Create a new Speed object.

Parameters
maxThe maximum X and Y values.
hardClampDetermines if the value can exceed the maximum.
Otter.Speed.Speed ( float  max)

Create a new Speed object.

Parameters
maxThe maximum X and Y values.

Member Function Documentation

override string Otter.Speed.ToString ( )

Returns a String that represents this instance.

Returns
A String that represents this instance.

Member Data Documentation

bool Otter.Speed.HardClamp

Determines if the maximum values will be hard clamped. If true, values will never exceed the maximums.

float Otter.Speed.MaxX

The maximum X speed.

float Otter.Speed.MaxY

The maximum Y speed.

Property Documentation

float Otter.Speed.Length
get

The length of the speed object.

float Otter.Speed.Max
set

Shortcut to set both MaxX and MaxY.

float Otter.Speed.X
getset

The current X value of the speed.

float Otter.Speed.Y
getset

The current Y value of the speed.


The documentation for this class was generated from the following file: