ShootArguments
A struct in Root.Township, the global namespace.
Network payload for a shot from a bow or Shooter: the projectile entity, where it was released and how hard. Sent with a MethodSyncStruct in both directions.
- Listed in Global namespace: S
Constructors
| Member | What it is |
|---|---|
ShootArguments(NetworkEntity shot, float strength) | Creates a ShootArguments from shot and strength. |
Fields
| Member | What it is |
|---|---|
Chunk chunk | Chunk the position is relative to. The server uses the projectile's chunk, a client the chunk the local player is in. |
Vector3 position | World position of the projectile when it was shot. |
Quaternion rotation | Rotation of the projectile, compressed. The constructor also applies the compressed value to the projectile so both sides match. |
float strength | Shot strength from 0 to 1, sent with 0.001 precision. |
uint target | Entity id of the projectile being shot. |
Methods
| Member | What it is |
|---|---|
void Serialize(IPlayer player, Stream stream) | Writes or reads the target id, chunk and position, compressed rotation and strength (0 to 1). |
Used in
Members of other types that take, return or hold a ShootArguments: