target - eisclimber/ExPresS-XR GitHub Wiki

Target

Class in ExPresSXR.Minigames.Archery.TargetSpawner

Inherits from UnityEngine.MonoBehaviour

Summary

A base class for an archery target supporting pooling, being hit and scoring.

public class Target : MonoBehaviour, IPoolObject

Fields

Name Description
OnHit Emitted on hit with the points of this target and if it was good or bad.

Methods

Name Description
ApplyForce(Vector3) Impulse force to be applied to the target.
HandlePoolRetrieved() Gets automatically executed when the object is retrieved from a pool.
HandlePoolReturned() Gets automatically executed when the object is returned to a pool.
Hit() Called when the target is hit.

Properties

Name Description
ArrowAttach Transform used to attach arrows to. All children will be removed when this target is returned to a pool.
Defaults to itt's own transform if none is provided.
ScoreManagers Score Managers that will be notified upon hitting this target.
⚠️ **GitHub.com Fallback** ⚠️