Ejemplo n.º 1
0
 private void Awake()
 {
     screenFreezer = FindObjectOfType <ScreeneFreezer>();
     rb            = GetComponent <Rigidbody2D>();
     sR            = GetComponent <SpriteRenderer>();
     anim          = GetComponent <Animator>();
     bC            = transform.Find("Colliders").GetComponent <BoxCollider2D>();
     cC            = GetComponentInChildren <CircleCollider2D>();
     cameraShake   = GameObject.Find("CameraShake").GetComponent <CameraShake>();;
     stats         = GetComponent <EnemyStats>();
 }
Ejemplo n.º 2
0
 void Awake()
 {
     stats         = GetComponent <EnemyStats> ();
     screenFreezer = FindObjectOfType <ScreeneFreezer> ();
     rb            = GetComponent <Rigidbody2D> ();
     if (anim == null)
     {
         anim = GetComponent <Animator> ();
     }
     if (sR == null)
     {
         sR = GetComponent <SpriteRenderer> ();
     }
 }
Ejemplo n.º 3
0
 void Awake()
 {
     stats         = GetComponent <EnemyStats>();
     screenFreezer = FindObjectOfType <ScreeneFreezer>();
     anim          = GetComponent <Animator>();
 }