private void TriggerPreStepEvent(float timeStep) { PreStepAction actions = BeforeStep; if (actions != null) { actions(timeStep); } }
private void TriggerPostStepEvent(float timeStep) { PreStepAction actions = AfterStep; if (actions != null) { actions(timeStep); } }
public void Run() { PreStepAction.Invoke(this); //run the step action ActionToRun(); PostStepAction.Invoke(this); }
/// <summary> /// This method is called internally before the PhysX update in order /// to process script movement and vehicle movement. /// </summary> /// <param name="timeStep">The amount of time that will elapse in the /// next PhysX update</param> private void TriggerPreStepEvent(float timeStep) { // Get the action that needs to be called before PhysX updates PreStepAction actions = BeforeStep; // Make sure there is a function to call before calling the // function if (actions != null) { // Go ahead and call the function actions(timeStep); } }