A class in Root.Township, the global namespace.
Client-side pooled trigger target for a TargetBasedSkill: when the player's tool touches it, the skill hit is checked and run.
Constructors
| Member | What it is |
|---|
SkillHitTarget() | Unity makes components itself; use AddComponent or spawn a prefab instead of new. |
Fields
5 private and internal fields
| Member | What it is |
|---|
private Quaternion baseRotation | Rotation from world up to this target's up, used to orient the hit direction. |
private TargetBasedSkill skill | The skill that validates and runs the hit. |
private ImpactTool targetTool | Impact tool on the target entity. Only its rigidbody counts. |
private uint toolIdentifier | Network identifier of the tool entity, passed to the skill. |
private Collider trigger | Trigger collider used for the contact. |
Methods
| Member | What it is |
|---|
void InitializeTarget(NetworkEntity target, TargetBasedSkill skill) | Sets the tool entity and skill this target belongs to and stores its base rotation. |
2 private and internal methods
| Member | What it is |
|---|
private void OnTriggerEnter(Collider other) | If the target tool enters, builds a hit and, when the skill accepts it, calls the skill's ExecuteOnClient. |
private void OnValidate() | Editor: finds the first trigger collider in children if trigger is empty. |