void Start() { player = GetComponentInParent <KTB_Player>(); inputs = GetComponentInParent <KTB_PlayerInput>(); area = GetComponent <CircleCollider2D>(); gameManager = GameObject.FindGameObjectWithTag("GameManager").GetComponent <KeepTheBroom>(); crosshair = GetComponent <SpriteRenderer>(); rb = GetComponentInParent <Rigidbody2D>(); }
void Awake() { //Time.timeScale = .2f; rb = GetComponent <Rigidbody2D>(); inputs = GetComponent <KTB_PlayerInput>(); //collid = GetComponentInChildren<Collider2D>(); collisions = GetComponent <CollisionCheck>(); melee = GetComponentInChildren <KTB_MeleeAttack>(); Physics2D.gravity = gravity; airJumpCount = maxAirJumpCount; }