Class NPCSmoking
Wraps the smoking action for an NPC. Use to start or stop the smoking animation and cigarette visual.
public sealed class NPCSmoking
- Inheritance
-
NPCSmoking
- Inherited Members
- Extension Methods
Remarks
Requires the smoking behaviour to be configured on the prefab via EnsureSmokeBreak(string?, bool?). If not present, Begin() and End() are no-ops.
Properties
IsActive
Whether the smoking action is currently active (cigarette visible, animation playing).
public bool IsActive { get; }
Property Value
Methods
Begin()
Begins the smoking action: shows the cigarette and plays the smoking animation.
public void Begin()
Remarks
No-op if the smoking component is not on the prefab. Call EnsureSmokeBreak(string?, bool?) during ConfigurePrefab to add it.
End()
Ends the smoking action: removes the cigarette and stops the animation.
public void End()