Module Common
Donxon Common module.
This module contains the functionality for scripts running on both the client and server.
It can be used in script files registered in both "game" and "ui" array of project.json.
Tables
| COLOR | Available colors. |
Fields
| maxPlayer | Maximum supported player slots. |
| vecZero | Zero vector (0, 0, 0). |
| emptyFunc | Empty function. |
Classes
| Color | Color class. |
| Vector2D | 2D Vector class. |
| Vector | 3D Vector class. |
| NetMessage | Network Message Builder class. |
| TextMenu | Common Text Menu class. |
| ScreenFade | Common ScreenFade class. |
Tables
Fields
- maxPlayer
-
Maximum supported player slots.
- maxPlayer number (default 24)
- vecZero
-
Zero vector (0, 0, 0).
- vecZero Common.Vector (default "x = 0 y = 0 z = 0")
- emptyFunc
-
Empty function.
An empty function used for internal stuffs.
- emptyFunc function
Classes
- Color
-
Color class.
Shared functions and properties for color manipulations.
- Color Common.Color
- Vector2D
-
2D Vector class.
Used for many pathfinding and many other operations that are treated as planar rather than 3d.
- Vector2D Common.Vector2D
- Vector
-
3D Vector class.
- Vector Common.Vector
- NetMessage
-
Network Message Builder class.
Used to builds network messages that will be sent from server to client(s).
- NetMessage Common.NetMessage
- TextMenu
-
Common Text Menu class.
Shared functions and properties for text menu classes.
- TextMenu Common.TextMenu
- ScreenFade
-
Common ScreenFade class.
Shared functions and properties for screen fade classes.
- ScreenFade Common.ScreenFade