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