Table View
Functions to manage camera and game view.
Functions
GetAspectRatio() | Get the display resolution's aspect ratio. |
FadeIn(speed) | Do a full-screen fade-in from black. |
FadeOut(speed) | Do a full-screen fade-to-black. |
SetCineBars(height, speed) | Move black cinematic bars in from the top and bottom of the game window. |
SetFOV(angle) | Set field of view. |
GetCameraType() | Shows the mode of the game camera. |
PlayFlyBy(flyby) | Enable FlyBy with specific ID |
ResetObjCamera() | Reset object camera back to Lara and deactivate object camera. |
FlashScreen(color, speed) | Flash screen. |
Functions
- GetAspectRatio()
-
Get the display resolution's aspect ratio.
Returns:
-
float
Display resolution's aspect ratio.
- FadeIn(speed)
-
Do a full-screen fade-in from black.
Parameters:
- speed float (default 1.0). Speed in "amount" per second. A value of 1 will make the fade take one second.
- FadeOut(speed)
-
Do a full-screen fade-to-black. The screen will remain black until a call to FadeIn.
Parameters:
- speed float (default 1.0). Speed in "amount" per second. A value of 1 will make the fade take one second.
- SetCineBars(height, speed)
-
Move black cinematic bars in from the top and bottom of the game window.
Parameters:
- height float (default 30) Percentage of the screen to be covered
- speed float (default 30) Coverage percent per second
- SetFOV(angle)
-
Set field of view.
Parameters:
- angle float in degrees (clamped to [10, 170])
- GetCameraType()
-
Shows the mode of the game camera.
Returns:
-
CameraType
value used by the Main Camera.
Usage:
LevelFuncs.OnControlPhase = function() if (View.GetCameraType() == CameraType.Combat) then --Do your Actions here. end end
- PlayFlyBy(flyby)
-
Enable FlyBy with specific ID
Parameters:
- flyby short (ID of flyby)
- ResetObjCamera()
- Reset object camera back to Lara and deactivate object camera.
- FlashScreen(color, speed)
-
Flash screen.
Parameters:
- color Color (default Color(255, 255, 255))
- speed float (default 1.0). Speed in "amount" per second. Value of 1 will make flash take one second. Clamped to [0.005, 1.0].