Class WorldSpaceBackgroundUIHandler
Controls the background grid (with the grid coordinates).
Inheritance
object
WorldSpaceBackgroundUIHandler
Namespace: AS2.UI
Assembly: .dll
Syntax
public class WorldSpaceBackgroundUIHandler : MonoBehaviour
Constructors
| Edit this page View SourceWorldSpaceBackgroundUIHandler()
Declaration
public WorldSpaceBackgroundUIHandler()
Fields
| Edit this page View SourceactiveCameraRotation
Declaration
private float activeCameraRotation
Field Value
Type | Description |
---|---|
float |
activeRect
Declaration
private CellRect activeRect
Field Value
Type | Description |
---|---|
CellRect |
go_worldSpaceBackgroundUI
Declaration
public GameObject go_worldSpaceBackgroundUI
Field Value
Type | Description |
---|---|
GameObject |
instance
Declaration
public static WorldSpaceBackgroundUIHandler instance
Field Value
Type | Description |
---|---|
WorldSpaceBackgroundUIHandler |
isActive
Declaration
private bool isActive
Field Value
Type | Description |
---|---|
bool |
uiElements
Declaration
private List<GameObject> uiElements
Field Value
Type | Description |
---|---|
List<GameObject> |
uiElementsActive
Declaration
private bool uiElementsActive
Field Value
Type | Description |
---|---|
bool |
Methods
| Edit this page View SourceIsActive()
Checks if the grid is active.
Declaration
public bool IsActive()
Returns
Type | Description |
---|---|
bool |
|
SetCameraRotation(float)
Updates the background grid camera rotation.
Declaration
public void SetCameraRotation(float rotationDegrees)
Parameters
Type | Name | Description |
---|---|---|
float | rotationDegrees | The camera rotation in degrees. |
ToggleBackgroundGrid()
Toggles the background grid on/off. Camera movements are disabled while the grid is toggled on.
Declaration
public void ToggleBackgroundGrid()
Update()
Declaration
public void Update()
UpdateSystem()
Updates the background grid. Call this once per frame. Note: This method only takes a lot of time if the system is displayed and the camera changes, so everything is regenerated. Recommendation: Disable camera movement if this is active.
Declaration
public void UpdateSystem()