Game.Prefabs.CitizenChirpPrefab
Assembly: Assembly-CSharp (game) or your mod assembly if you recompile the class
Namespace: Game.Prefabs
Type: public class
Base: ChirpPrefab
Summary:
A concrete, empty subclass of ChirpPrefab used by the game to represent a citizen chirp prefab. The class itself does not declare any members or override behavior — it primarily exists as a specific prefab type (and is annotated with a ComponentMenu attribute so it appears under "Triggers/" in the Unity Add Component menu). Any functionality comes from the ChirpPrefab base class; extend or override members of ChirpPrefab here to add custom behavior for citizen chirps.
Fields
- (none declared in this file)
This class does not define any fields. It inherits any fields defined on ChirpPrefab.
Properties
- (none declared in this file)
Any properties to use are declared on the ChirpPrefab base class.
Constructors
public CitizenChirpPrefab()
The default parameterless constructor is provided implicitly. If you need initialization logic, add an explicit constructor or override appropriate lifecycle methods from the base class.
Methods
- (none declared in this file)
No methods are declared or overridden here. Implement or override methods from ChirpPrefab to customize behavior for citizen chirps.
Attributes
[ComponentMenu("Triggers/", new Type[] { })]
This attribute places the component in Unity's "Add Component" menu under the "Triggers/" submenu. It is primarily an editor convenience so designers can add this prefab type from the Unity inspector.
Usage Example
// This file is equivalent to the original source:
// a simple subclass used to represent a citizen chirp prefab.
[ComponentMenu("Triggers/", new Type[] { })]
public class CitizenChirpPrefab : ChirpPrefab
{
}
// Example of adding the component to a GameObject (editor/runtime usage):
var go = new GameObject("CitizenChirp");
go.AddComponent<Game.Prefabs.CitizenChirpPrefab>();
// To extend behavior, override or add members:
[ComponentMenu("Triggers/")]
public class CustomCitizenChirpPrefab : Game.Prefabs.CitizenChirpPrefab
{
// override base functionality here (if ChirpPrefab exposes virtual methods)
}
Notes: - Because the class contains no custom members, modders typically either use it as-is (so the game recognizes this specific prefab type) or create their own subclass that overrides behavior defined on ChirpPrefab. - Ensure you compile the class into the correct assembly or include it in your mod package so the game can load the prefab type at runtime.