Skip to content

Beam Comps

SmArtKar edited this page Jan 8, 2023 · 2 revisions

Athena Beams can also have comps:

    public class BeamComp : ThingComp
    {
        public Beam Beam => parent as Beam;

        public virtual void PostTextureSetup() { }

        public virtual void PreDestroy() { }

        public virtual void MaxRangeCut() { }
    }

PostTextureSetup is called after beam was created and it's fields and textures were loaded PreDestroy is called when the beam is about to be destroyed MaxRangeCut is called when the beam is about to destroy itself due to one the connected points going out of range. Called before PreDestroyBeam

Clone this wiki locally