![]() |
Skyline Lua API
Version 1.0 RC1
Lua Script Reference for Skyline Game Engine.
|
#include <LUA_API_Screen.h>
Public Member Functions | |
| int | getWidth () |
| This function returns the width of the screen. More... | |
| int | getHeight () |
| This function returns the height of the screen. More... | |
| int | getMouseX () |
| This function returns the mouse x screen coordinate. More... | |
| int | getMouseY () |
| This function returns the mouse y screen coordinate. More... | |
| void | getMouseDelta () |
| This function returns you the X and Y mouse move deltas calculated within the engine. More... | |
| screen | worldPosToScreenPos (x, y, z) |
| World Position to screen position. More... | |
| screen | worldPosToAbsScreenPos (x, y, z) |
| World Position to absolute screen position. More... | |
| screen | worldPosInFrustum (x, y, z) |
| World Position Frustum. More... | |
| screen | worldPosInFront (x, y, z) |
| World Position in front. More... | |
Functions to help when working with the main screen.
Use as screen.function()
For more information on how these functions can be used please visit the User Manual - http://www.chi-ad.com/Skyline/SDN/
| int screen::getHeight | ( | ) |
This function returns the height of the screen.
The following is a Small Example on how to use this function:
function onInit(objID)
height = screen.getHeight();
end
| void screen::getMouseDelta | ( | ) |
This function returns you the X and Y mouse move deltas calculated within the engine.
The following is a Small Example on how to use this function:
function onMouseMove( ms_pos_x, ms_pos_y )
mouseDelta = newType.vec2(screen.getMouseDelta());
sky.print("mouseDelta X: "..mouseDelta.x.."</br>mouseDelta Y : "..mouseDelta.y, 1);
end
| int screen::getMouseX | ( | ) |
This function returns the mouse x screen coordinate.
The following is a Small Example on how to use this function:
function onInit(objID)
msx = screen.getMouseX();
end
| int screen::getMouseY | ( | ) |
This function returns the mouse y screen coordinate.
The following is a Small Example on how to use this function:
function onInit(objID)
msy = screen.getMouseY();
end
| int screen::getWidth | ( | ) |
This function returns the width of the screen.
The following is a Small Example on how to use this function:
function onInit(objID)
width = screen.getWidth();
end
| screen screen::worldPosInFront | ( | x | , |
| y | , | ||
| z | |||
| ) |
World Position in front.
| X | : value of x axis |
| Y | : value of y axis |
| Z | : value of z axis |
The following is a Small Example on how to use this function:
function onMouseMove( ms_pos_x, ms_pos_y )
Example coming soon
end
| screen screen::worldPosInFrustum | ( | x | , |
| y | , | ||
| z | |||
| ) |
World Position Frustum.
| X | : value of x axis |
| Y | : value of y axis |
| Z | : value of z axis |
The following is a Small Example on how to use this function:
function onMouseMove( ms_pos_x, ms_pos_y )
Example coming soon
end
| screen screen::worldPosToAbsScreenPos | ( | x | , |
| y | , | ||
| z | |||
| ) |
World Position to absolute screen position.
| X | : value of x axis |
| Y | : value of y axis |
| Z | : value of z axis |
The following is a Small Example on how to use this function:
function onMouseMove( ms_pos_x, ms_pos_y )
Example coming soon
end
| screen screen::worldPosToScreenPos | ( | x | , |
| y | , | ||
| z | |||
| ) |
World Position to screen position.
| X | : value of x axis |
| Y | : value of y axis |
| Z | : value of z axis |
The following is a Small Example on how to use this function:
function onMouseMove( ms_pos_x, ms_pos_y )
Example coming soon
end