void Start() { birdGenerator = GameObject.Find("egg2").GetComponent <BirdGenerator>(); birdGenerator.automaticBirdSetting(false); GameController.inPlay = true; otterSpawned = false; }
// Use this for initialization void Start() { GameController.isTutorial = true; print("LTIH_Tut Tutorial Set"); GameController.missionDiff = "Tutorial"; GameController.missionInitials = "LITH"; tutorialState = 0; spawningBirds = false; lastSpawn = 0f; GameObject.Find("UAVs Needed").GetComponent <Text>().text = Difficulty.objectiveNeeded.ToString(); birdGenerator = GameObject.Find("Bird Generator").GetComponent <BirdGenerator>(); birdGenerator.automaticBirdSetting(false); Instantiate(Resources.Load <GameObject>("UIPrefabs/LITHTutorial")); GameController.challenge = "Learn how to catch!"; tutorialScript = GameObject.Find("LITHTutorial(Clone)").GetComponent <TutorialController>(); tutorialScript.automaticTutorialSetting(false); batteryPanel = GameController.buildGameObject("UIPrefabs/BatteryPanel", new Vector2(-25f, -35f), new Vector2(25f, 35f)); batteryPanel.GetComponent <RectTransform>().anchoredPosition = new Vector2(-25f, -35f); batteryPanel.transform.SetAsFirstSibling(); landingCircle = new GameObject(); SpriteRenderer renderer = landingCircle.AddComponent <SpriteRenderer>(); renderer.sprite = Resources.Load <Sprite>("Sprites/white-dotted-circle"); renderer.sortingLayerName = "Foreground"; renderer.sortingOrder = 10; renderer.color = new Vector4(0f / 255f, 197f / 255f, 58f / 255f, 1f); renderer.transform.parent = GameObject.Find("Hand").transform; landingCircle.transform.localPosition = new Vector2(0f, 0f); landingCircle.transform.localScale = new Vector2(2f, 2f); landingCircle.name = "landingCircle"; }
// Update is called once per frame void Start() { soundManager = GameObject.FindWithTag("MusicManager"); makeSound = soundManager.GetComponent <MakeSound> (); audioSource = GetComponent <AudioSource> (); sounds = new AudioClip[makeSound.audioclips.Length]; for (int a = 0; a < makeSound.audioclips.Length; a++) { sounds [a] = makeSound.audioclips [a]; } GameObject birdGenObj = GameObject.FindWithTag("BirdGenerator"); birdGenerator = birdGenObj.GetComponent <BirdGenerator> (); birdKeys = birdGenerator.birdKeys; allowedToPlay = true; happyParticles = transform.Find("BirdHappyParticles").GetComponent <ParticleSystem> (); confusedParticles = transform.Find("BirdConfusedParticles").GetComponent <ParticleSystem> (); playingParticles = transform.Find("BirdPlayingParticles").GetComponent <ParticleSystem> (); birdRenderer = transform.Find("pCube8").GetComponent <Renderer> (); callUI = GameObject.FindWithTag("MainCamera").GetComponent <Call_UI> (); playingParticles.startColor = particleColor; confusedParticles.startColor = particleColor; birdRenderer.material = birdMaterial; confusedParticles.transform.GetComponent <ParticleSystemRenderer> ().material = confusedMaterial; playingParticles.transform.GetComponent <ParticleSystemRenderer> ().material = playingMaterial; }
// Use this for initialization void Start() { for (int f = 0; f < birdUIfills.Length; f++) { birdUIfills [f].fillAmount = 0f; } song = GetComponent <Songlist> (); characterani = GameObject.FindWithTag("PlayerCharacter").GetComponent <Animator> (); endBk = GameObject.FindWithTag("SunriseCanvas").GetComponent <Animator> (); treeLight = GameObject.FindWithTag("Tree").GetComponent <Animator> (); birdGenerator = birdGeneratorObj.GetComponent <BirdGenerator> (); playerParticles = player.GetComponentInChildren <ParticleSystem> (); callUI = mainCamera.GetComponent <Call_UI> (); audios = new List <GameObject> (); currentlyPlayingAudio = new bool[10]; currentlyFadingOut = new bool[10]; for (int i = 0; i < 10; i++) { currentlyPlayingAudio [i] = false; currentlyFadingOut [i] = false; } keyPressed = false; keyPressedThisFrame = false; UpperBodyTurn = GameObject.FindWithTag("UpperBodyTurn"); audioSource = GetComponent <AudioSource> (); note = 0; ifFinish = false; birdsPresent = false; matrixSize = 10; transitionMatrix = new int[matrixSize, matrixSize]; tripletList = new List <int[]> (); ParseTransitionMatrix(); currentActiveTripletIndex = 0; currentActiveNoteIndex = 0; currentMaxTripletIndex = 0; prevIndex = 0; }
void Activate() { birdGenerator = transform.root.GetComponent <BirdGenerator>(); gun = GameObject.FindWithTag("Gun").GetComponent <GunControl>(); activated = true; }