Example #1
0
 void Start()
 {
     anim           = GetComponent <Animator>();
     body           = GetComponent <Rigidbody2D>();
     level          = GameObject.Find("Level").GetComponent <Level>();
     playerGun      = level.GetCurrentHero().transform.FindChild("playerGun").GetComponent <Transform>();
     playerControls = level.GetCurrentHero().GetComponent <ControlsHero>();
 }
Example #2
0
 void Start()
 {
     playerBody     = GameObject.FindGameObjectWithTag("Player").GetComponent <Rigidbody2D>();
     playerControls = GameObject.FindGameObjectWithTag("Player").GetComponent <ControlsHero>();
 }