private void TriggerPreStepEvent(float timeStep)
        {
            PreStepAction actions = BeforeStep;

            if (actions != null)
            {
                actions(timeStep);
            }
        }
Exemple #2
0
        private void TriggerPostStepEvent(float timeStep)
        {
            PreStepAction actions = AfterStep;

            if (actions != null)
            {
                actions(timeStep);
            }
        }
Exemple #3
0
        public void Run()
        {
            PreStepAction.Invoke(this);

            //run the step action
            ActionToRun();

            PostStepAction.Invoke(this);
        }
Exemple #4
0
        /// <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);
            }
        }