void Awake() { levelGenerator = GameObject.Find(Tags.LEVEL_GENERATOR).GetComponent <LevelScript>(); levelGeneratorPooling = GameObject.Find(Tags.LEVEL_GENERATOR).GetComponent <LevelGeneratorPooling>(); shootBtn = GameObject.Find(Tags.SHOOT_BTN).GetComponent <Button>(); shootBtn.onClick.AddListener(() => Fire()); }
void Awake() { levelGenerator = GameObject.Find(Tags.LevelGenerator_ObjTag).GetComponent <LevelGenerator> (); levelGenerator_pooling = GameObject.Find(Tags.LevelGenerator_ObjTag).GetComponent <LevelGeneratorPooling>(); shootBtn = GameObject.Find(Tags.Shoot_Button_Obj).GetComponent <Button>(); shootBtn.onClick.AddListener(() => Shoot());//Same as dragging and dropping that we use normally }
void Awake() { levelGenerator = GameObject.Find(Tags.LEVEL_GENERATOR_OBJ).GetComponent <LevelGenerator> (); levelGenerator_pooling = GameObject.Find(Tags.LEVEL_GENERATOR_OBJ).GetComponent <LevelGeneratorPooling> (); shootBtn = GameObject.Find(Tags.SHOOT_BUTTON_OBJ).GetComponent <Button> (); shootBtn.onClick.AddListener(() => Shoot()); }
void Awake() { levelGenerator = GameObject.Find(Tags.LEVEL_GENERATOR_OBJ).GetComponent <LevelGenerator>(); levelGeneratorPooling = GameObject.Find(Tags.LEVEL_GENERATOR_OBJ).GetComponent <LevelGeneratorPooling>(); }