Skip to main content

AttackTest

A class in Root.Township, the global namespace.

Debug component that sets the animator's Attack bool while a key is held.

Constructors​

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

Fields​

2 private and internal fields
MemberWhat it is
private Animator animatorThe animator on this object.
private KeyCode keyKey that drives the attack (Space by default).

Methods​

2 private and internal methods
MemberWhat it is
private void Awake()Gets the animator on the same object.
private void Update()Sets Attack to whether the key is held.