Class LogicTimer
Namespace: ValveResourceFormat.Renderer.Entities
Assembly: Renderer.dll
logic_timer. Fires OnTimer on a repeating interval, either fixed or drawn from a range. As an oscillator it alternates OnTimerLow and OnTimerHigh instead.
public sealed class LogicTimer : BaseEntityInheritance
object ← BaseEntity ← LogicTimer
Inherited Members
BaseEntity.Scene, BaseEntity.RootNode, BaseEntity.Transform, BaseEntity.RigidTransform, BaseEntity.LayerName, BaseEntity.EntitySystem, BaseEntity.Data, BaseEntity.SpawnData, BaseEntity.NameFixup, BaseEntity.Classname, BaseEntity.TargetName, BaseEntity.SpawnFlags, BaseEntity.SpawnTransform, BaseEntity.Owner, BaseEntity.MoveParent, BaseEntity.EntityScale, BaseEntity.ModelName, BaseEntity.Origin, BaseEntity.Angles, BaseEntity.WorldOrigin, BaseEntity.WorldAngles, BaseEntity.Velocity, BaseEntity.AngularVelocity, BaseEntity.NextThink, BaseEntity.MoveDoneTime, BaseEntity.IsRemoved, BaseEntity.Collider, BaseEntity.IsSolid, BaseEntity.IsTrigger, BaseEntity.IsDrawn, BaseEntity.IsCollidable, BaseEntity.TouchingEntities, BaseEntity.HasSpawnFlags<TSpawnFlags>(TSpawnFlags), BaseEntity.Spawn(), BaseEntity.Activate(), BaseEntity.Think(), BaseEntity.RoundStart(), BaseEntity.MoveDone(), BaseEntity.TryGetTouchBounds(out Vector3, out Vector3), BaseEntity.ObjectCaps, BaseEntity.Use(BaseEntity?), BaseEntity.Teleport(Vector3, Vector3?), BaseEntity.AcceptInput(string, EntityInputData), BaseEntity.SetNextThink(float), BaseEntity.SetMoveDoneTime(float), BaseEntity.GetSurfaceVelocity(Vector3), BaseEntity.AngleMod(float)
Constructors
LogicTimer(EntitySystem, EntitySpawnInfo)
Initializes a logic_timer from its keyvalues.
public LogicTimer(EntitySystem system, EntitySpawnInfo spawnInfo)Parameters
system EntitySystem
spawnInfo EntitySpawnInfo
Properties
IsEnabled
Gets whether the timer is running.
public bool IsEnabled { get; }Property Value
IsPaused
Gets whether the timer is paused, holding until it is unpaused.
public bool IsPaused { get; }Property Value
RefireTime
Gets the interval between firings in seconds. A randomised timer draws a new one each time it restarts and keeps it here.
public float RefireTime { get; }Property Value
RemainingTime
Gets the seconds left before the timer fires, as of the last time it was scheduled or paused.
public float RemainingTime { get; }Property Value
Methods
Activate()
Called once every entity in the map has spawned, for anything that needs to resolve other entities by name. Source's Activate.
public override void Activate()Spawn()
Sets up the entity: loads its model, reads class-specific keyvalues, and schedules its first think. Called by right after construction, before the entity enters the world.
public override void Spawn()Think()
Fires the timer and schedules the next one.
public override void Think()
