public override void UpdateBeforeSimulation() { if (Entity == null) { FrameCaller.RmComponent(this); return; } if (!block_initialized) { InitLate(); } if (view_locked) { UpdateView(playing_shot /* may be null! */); } else { Entity.SetLocalMatrix(OriginalLocalMatrix); } if (playing_shot == null) { return; } frame++; if (playing_shot.IsLastFrame(frame)) { Pause(); return; } }
public override void Init(Sandbox.Common.ObjectBuilders.MyObjectBuilder_EntityBase objectBuilder) { Entity.NeedsUpdate |= MyEntityUpdateEnum.EACH_FRAME; this.objectBuilder = objectBuilder; FrameCaller.AddComponent(this); }