// Start is called before the first frame update void Start() { rgb2d = GetComponent <Rigidbody2D>(); GM = GameObject.Find("Game_maniger"); groundDetect = GetComponent <RayCastDetector>(); isActive = true; }
// Use this for initialization void Start() { rgb2d = GetComponent <Rigidbody2D>(); groundDetector = GetComponentInChildren <RayCastDetector>(); gameManager = GameObject.FindGameObjectWithTag("GameController").GetComponent <GameManager>(); GameManager.OnLevelChanged += Die; }
// Use this for initialization void Start() { player = GetComponentInParent <PlayerController>(); raycastDetector = GetComponentInParent <RayCastDetector>(); anim = GetComponent <Animator>(); }