private void TriggerPostStepEvent(float timeStep) { PostStepAction 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 after the PhysX update in order /// to process script movement and vehicle movement. /// </summary> /// <param name="timeStep">The amount of time that elapsed in the /// PhysX update</param> private void TriggerPostStepEvent(float timeStep) { // Get the action that needs to be called before PhysX updates PostStepAction actions = AfterStep; // Make sure there is a function to call before calling it if (actions != null) { // Go ahead and call the function actions(timeStep); } }