void Start() { body = gameObject.GetComponent <Rigidbody2D>(); animator = gameObject.GetComponent <FigureAnimationManager>(); rank = (int)(Mathf.Clamp((Random.Range(Reference.instance.player.rank - 5, Reference.instance.player.rank + 5)), 0, Mathf.Infinity)); SetHeadText(); animator.Walk = true; }
void Start() { body = GetComponent <Rigidbody2D>(); constraints = body.constraints; animator = GetComponent <FigureAnimationManager>(); startPosition = transform.position; SetHeadText(); }