BtEngine Operations

Table of contents

1. Start engine
2. Start engine with a forest XML file name
3. Update engine
4. Shutdown engine
5. Determine whether engine is on

1. Start engine
Signature:
static bool BtEngine.Start()
Description:
Starts the engine with the forest xml file name that was previously set. Effective only when the engine is off. The default forest file name is AForest.xml. The engine should be started before loading any forest or tree. Once the engine was started, the forest xml file name cannot be changed.
Return Value:
True if the engine was started; false otherwise.
Complexity:
O(1).
2. Start engine with a forest XML file name
Signature:
static bool BtEngine.Start(string ForestFile)
Description:
Starts the engine with the specified forest xml file name. Effective only when the engine is off. The engine should be started before loading any forest or tree. Once the engine was started, the forest xml file name cannot be changed.
Parameters:
ForestFile The name of the forest xml file to start with.
Return Value:
True if the engine was started with the specified forest file name; false otherwise.
Complexity:
O(1).
3. Update engine
Signature:
static void BtEngine.Update()
Description:
Updates the engine. This function needs to be invoked once in every frame.
4. Shut down engine
Signature:
static bool BtEngine.Shutdown()
Description:
Shuts down the engine. Effective only when the engine is on. This function needs to be invoked before quitting the Unity application.
Return Value:
True if the engine was shut down; false otherwise.
5. Determine whether engine is on
Signature:
static bool BtEngine.IsOn()
Description:
Determines whether the engine is on.
Return Value:
True if the engine is on; false otherwise.
Complexity:
O(1).