Skip to main content

ProjectileComponent

An abstract class in Root.Township, the global namespace.

Base for components on a Projectile that react when it collides.

Constructors​

MemberWhat it is
protected ProjectileComponent()Unity makes components itself; use AddComponent or spawn a prefab instead of new.

Fields​

1 private and internal field
MemberWhat it is
private Projectile projectileBacking field for Projectile.

Properties​

MemberWhat it is
Projectile Projectile { get; }The projectile on this object.

Methods​

MemberWhat it is
protected virtual void Awake()Hooks the projectile's Collided event.
protected abstract void ProjectileCollided(Projectile projectile)Runs when the projectile hits something.