Api BaseListener
class

BaseListener

public abstract class BaseListener

Allows creating a class that will exist for as long as a particle. The methods get called in the particle thread, which removes the need to run through the particle list again, but it has the danger and restrictions that come with threaded code.

Properties

Name Type Description
Source Component The component that created this listener. May be null.

Methods

virtual Void OnEnabled(Particle p)

Called in a thread. The particle is in its first position.

virtual Void OnUpdate(Particle p, Single dt)

Called in a thread, guarenteed to be called after OnEnabled

virtual Void OnDisabled(Particle p)

Called in a thread. OnUpdate won't be called again.

Assembly: Sandbox.Engine Declaring Type: Particle Full Name: Sandbox.Particle.BaseListener