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() { if (instance == null && instance != this) { instance = this; } else { Destroy(gameObject); } }
void Start() { gameManager = GameObject.FindGameObjectWithTag("GameManager").GetComponent <KeepTheBroom>(); }
public override void Start() { base.Start(); playerKTB = (PlayerKTB)player; gameManager = GameObject.FindGameObjectWithTag("GameManager").GetComponent <KeepTheBroom>(); }