// Start is called before the first frame update void Awake() { // show or hide flower depending on type UpdateFlower(); // Reset pollen counter pollenCounter = 0; //Connect to score manager manager = GameObject.FindGameObjectWithTag("Manager").GetComponent <ScoreManager>(); addToScore.AddListener(manager.AddPollen); //Connect to player player = GameObject.FindGameObjectWithTag("Player").GetComponent <BeevonMovement>(); player.AddShakeListener(this.gameObject); //Get audio Source audioSource = GetComponent <AudioSource>(); //Get Canvas canvas = GameObject.FindGameObjectWithTag("Canvas"); //Get TargetPose GameObject icon = GameObject.FindGameObjectWithTag("PollenNumber"); target_pos = icon.transform.position; }
// Start is called before the first frame update void Start() { //Get manager manager = GameObject.FindGameObjectWithTag("Manager").GetComponent <ScoreManager>(); //Connect to player player = GameObject.FindGameObjectWithTag("Player").GetComponent <BeevonMovement>(); //Get audio Source audioSource = GetComponent <AudioSource>(); }
// Start is called before the first frame update void Start() { lightBeam.SetActive(false); //Connect to score manager manager = GameObject.FindGameObjectWithTag("Manager").GetComponent <ScoreManager>(); convertToScore.AddListener(manager.AddHoney); //Connect to player player = GameObject.FindGameObjectWithTag("Player").GetComponent <BeevonMovement>(); //Get audio Source audioSource = GetComponent <AudioSource>(); }