void OnValidate() { if (!attachedPlayer) { attachedPlayer = FindObjectOfType <StickyJumper>(); } }
void OnValidate() { if (!attachedPlayer) { attachedPlayer = FindObjectOfType <StickyJumper>(); } float[] rotations = new float[4] { 0, -90, 180, 90 }; transform.localEulerAngles = new Vector3(0, 0, rotations[direction]); }