示例#1
0
        void HandlePhysicsPreStep(PhysicsPreStepEvent e)
        {
            Object[] args = new Object[1] {
                e.TimeStep
            };

            foreach (var item in cscomponents)
            {
                var info = item.Key;

                var PhysicsPreStepMethod = info.PhysicsPreStepMethod;

                if (PhysicsPreStepMethod == null)
                {
                    continue;
                }

                foreach (var csc in item.Value)
                {
                    if (!csc.Started || !csc.IsEnabled())
                    {
                        continue;
                    }

                    PhysicsPreStepMethod.Invoke(csc, args);
                }
            }
        }
示例#2
0
        void HandlePhysicsPreStep(PhysicsPreStepEvent e)
        {
            Object[] args = new Object[1] { e.TimeStep };

            foreach (var item in cscomponents)
            {
                var info = item.Key;

                var PhysicsPreStepMethod = info.PhysicsPreStepMethod;

                if (PhysicsPreStepMethod == null)
                    continue;

                foreach (var csc in item.Value)
                {
                    if (!csc.Started || !csc.IsEnabled())
                        continue;

                    PhysicsPreStepMethod.Invoke(csc, args);
                }

            }
        }