/// <summary> /// Called when [world position changed]. /// </summary> /// <param name="source">The source object that caused this event.</param> public override void OnWorldPositionChanged(object source) { Debug.Assert(source != this && (Container.Entity == null || source != Container.Entity), "Recursion detected!"); ProfilerShort.Begin("Volume"); UpdateWorldVolume(); ProfilerShort.BeginNextBlock("Prunning.Move"); MyGamePruningStructure.Move(Container.Entity as MyEntity); ProfilerShort.BeginNextBlock("Children"); UpdateChildren(source); ProfilerShort.BeginNextBlock("Raise"); RaiseOnPositionChanged(this); ProfilerShort.BeginNextBlock("Action"); if (WorldPositionChanged != null) { WorldPositionChanged(source); } ProfilerShort.End(); }