UnitSim Module
Unit movement simulation.
Types
| Type | Description |
|
Internal state for a moving unit. |
Functions and values
| Function or value |
Description
|
Full Usage:
create unit speed mapWidth mapHeight seed
Parameters:
TrackedUnit
speed : float32
mapWidth : float32
mapHeight : float32
seed : int
Returns: MovingUnit
|
Create a MovingUnit with a random target within map bounds.
|
Full Usage:
step mu mapWidth mapHeight frame
Parameters:
MovingUnit
mapWidth : float32
mapHeight : float32
frame : int
Returns: MovingUnit
|
Advance one frame. Moves toward target; picks new target when reached. Returns updated MovingUnit.
|
FSBarV1_Archived