new SnapshotNetworkObject2D(id, posX, posY)
Represents a simplified version of a network object.
To be converted to or from a snapshot.
Parameters:
Name | Type | Description |
---|---|---|
id |
number | string | Object unique identifier. |
posX |
number | The x coordinate, of the position. |
posY |
number | The y coordinate, of the position. |
Members
-
<private> id :number|string
-
Unique object id.
Type:
- number | string
-
<private> position :Grape2D.Vector
-
Object's position.
Type:
Methods
-
getId() → {number|string}
-
Gets object's id.
Returns:
Object id.- Type
- number | string
-
getPosition() → {Grape2D.Vector}
-
Gets object's position.
Returns:
Object position.- Type
- Grape2D.Vector
-
updateNetworkObject2D(param)
-
Updates the corresponding Grape2D.NetworkObject2D, with the data of this one.
Parameters:
Name Type Argument Description param
Object <optional>
An arbitrary object.