private void Start() { playerStateDownScr = GameObject.Find("Player").GetComponent <PlayerStateDown>(); rb = GetComponent <Rigidbody2D>(); anim = GetComponent <Animator>(); player = GameObject.Find("Player").transform; randomIdle1Speed = Random.Range(1f, 1.5f); direction = Mathf.RoundToInt(transform.localScale.x); Idle(); }
private void Start() { playerStateDownScr = GameObject.Find("Player").GetComponent <PlayerStateDown>(); }