Class that keeps track of the costs, so you can request how much a block of commands did cost in total. More...
Public Member Functions | |
| AIAccounting () | |
| Creating instance of this class starts counting the costs of commands from zero. | |
| ~AIAccounting () | |
| Destroying this instance reset the costs to the value it was in when the instance was created. | |
| Money | GetCosts () |
| Get the current value of the costs. | |
| void | ResetCosts () |
| Reset the costs to zero. | |
Class that keeps track of the costs, so you can request how much a block of commands did cost in total.
Works in both Execute as in Test mode. Example: { local costs = AIAccounting(); BuildRoad(from_here, to_here); BuildRoad(from_there, to_there); print("Costs for route is: " + costs.GetCosts()); }
| AIAccounting::AIAccounting | ( | ) |
Creating instance of this class starts counting the costs of commands from zero.
| Money AIAccounting::GetCosts | ( | ) |
Get the current value of the costs.
1.6.1