Class DemoUtils
Inheritance
System.Object
DemoUtils
Syntax
Fields
entityManager
Declaration
public static EntityManager entityManager
Field Value
Type |
Description |
EntityManager |
|
tinyEnv
Declaration
public static TinyEnvironment tinyEnv
Field Value
world
Declaration
public static World world
Field Value
Methods
Declaration
public static void AddRectTransform(Entity e)
Parameters
Type |
Name |
Description |
Entity |
e |
|
CreateCamera(Int32, Color, Single, Single, Single, Single, Single)
Declaration
public static Entity CreateCamera(int h, Color backgroundColor, float depth = 0F, float rectX = 0F, float rectY = 0F, float rectW = 1F, float rectH = 1F)
Parameters
Type |
Name |
Description |
System.Int32 |
h |
|
Color |
backgroundColor |
|
System.Single |
depth |
|
System.Single |
rectX |
|
System.Single |
rectY |
|
System.Single |
rectW |
|
System.Single |
rectH |
|
Returns
CreateImage2D(String, Boolean, Boolean, Boolean)
Declaration
public static Entity CreateImage2D(string file, bool disableSmoothing = true, bool hasAlpha = true, bool bitmask = false)
Parameters
Type |
Name |
Description |
System.String |
file |
|
System.Boolean |
disableSmoothing |
|
System.Boolean |
hasAlpha |
|
System.Boolean |
bitmask |
|
Returns
CreateRect(Single, Single, Single, Single)
Declaration
public static Rect CreateRect(float x, float y, float width, float height)
Parameters
Type |
Name |
Description |
System.Single |
x |
|
System.Single |
y |
|
System.Single |
width |
|
System.Single |
height |
|
Returns
CreateRenderer(Entity)
Declaration
public static Entity CreateRenderer(Entity sprite)
Parameters
Type |
Name |
Description |
Entity |
sprite |
|
Returns
CreateSprite(Entity, Int32, Int32, Int32, Int32, Int32, Int32, Single)
Declaration
public static Entity CreateSprite(Entity image, int x0 = -1, int y0 = -1, int x1 = -1, int y1 = -1, int w = -1, int h = -1, float pixelToWorldUnits = 1F)
Parameters
Type |
Name |
Description |
Entity |
image |
|
System.Int32 |
x0 |
|
System.Int32 |
y0 |
|
System.Int32 |
x1 |
|
System.Int32 |
y1 |
|
System.Int32 |
w |
|
System.Int32 |
h |
|
System.Single |
pixelToWorldUnits |
|
Returns
CreateSpriteRect(Entity, Color, Int32, Int32, Int32, Int32, Int32, Int32, Single)
Declaration
public static Entity CreateSpriteRect(Entity image, Color color, int x0 = -1, int y0 = -1, int x1 = -1, int y1 = -1, int w = -1, int h = -1, float pixelsToWorldUnits = 1F)
Parameters
Type |
Name |
Description |
Entity |
image |
|
Color |
color |
|
System.Int32 |
x0 |
|
System.Int32 |
y0 |
|
System.Int32 |
x1 |
|
System.Int32 |
y1 |
|
System.Int32 |
w |
|
System.Int32 |
h |
|
System.Single |
pixelsToWorldUnits |
|
Returns
CreateSquare(Entity, Color, Single, Single, Single, Single, Single, Single)
Declaration
public static Entity CreateSquare(Entity image, Color color, float cx = 0F, float cy = 0F, float cz = 0F, float w = 1F, float h = 1F, float pixelsToWorldUnits = 1F)
Parameters
Type |
Name |
Description |
Entity |
image |
|
Color |
color |
|
System.Single |
cx |
|
System.Single |
cy |
|
System.Single |
cz |
|
System.Single |
w |
|
System.Single |
h |
|
System.Single |
pixelsToWorldUnits |
|
Returns
CreateUICanvas()
Declaration
public static Entity CreateUICanvas()
Returns
Initialize(Int32, Int32, RenderMode, Boolean)
Declaration
public static void Initialize(int width, int height, RenderMode renderMode = RenderMode.Auto, bool DisableSwitchRenderingSystem = false)
Parameters
Type |
Name |
Description |
System.Int32 |
width |
|
System.Int32 |
height |
|
RenderMode |
renderMode |
|
System.Boolean |
DisableSwitchRenderingSystem |
|
MainLoop()
Declaration
public static bool MainLoop()
Returns
Type |
Description |
System.Boolean |
|
PixelRect(Int32, Int32, Int32, Int32, Int32, Int32)
Declaration
public static Rect PixelRect(int x0, int y0, int x1, int y1, int w, int h)
Parameters
Type |
Name |
Description |
System.Int32 |
x0 |
|
System.Int32 |
y0 |
|
System.Int32 |
x1 |
|
System.Int32 |
y1 |
|
System.Int32 |
w |
|
System.Int32 |
h |
|
Returns
RunWindow()
Declaration
public static void RunWindow()
SetDisplaySize(Int32, Int32, RenderMode)
Declaration
public static void SetDisplaySize(int width, int height, RenderMode renderMode = RenderMode.Auto)
Parameters
Type |
Name |
Description |
System.Int32 |
width |
|
System.Int32 |
height |
|
RenderMode |
renderMode |
|