// Use this for initialization void Awake() { health = 1; wavesScript = GameObject.Find("WorldBounds").GetComponent <Waves> (); summonTheCrowsScript = GameObject.Find("WorldBounds").GetComponent <SummonTheCrows> (); gutSplosionParentString = "Prefabs/Birds/GutSplosionParent"; gutSplosions = new string[] { "Prefabs/GutSplosions/GutSplosion1a", //small birds //0 "Prefabs/GutSplosions/GutSplosion2a", //medium birds //1 "Prefabs/GutSplosions/GutSplosion2b", //1 "Prefabs/GutSplosions/GutSplosion2c", //2 "Prefabs/GutSplosions/GutSplosion2d", //3 "Prefabs/GutSplosions/GutSplosion2e", //4 "Prefabs/GutSplosions/GutSplosion3a", //big birds //5 "Prefabs/GutSplosions/GutSplosion3b", //6 }; if (GetComponent <BabyCrow> ()) { birdType = 5; gutValue = 3; summonCrows = true; } if (GetComponent <Pigeon>()) { birdType = 0; gutValue = 3; } else if (GetComponent <Duck> ()) { birdType = 1; gutValue = 5; } else if (GetComponent <Crow>()) { birdType = 2; health = 1; gutValue = 7; } else if (GetComponent <Eagle>()) { birdType = 3; health = 2; gutValue = 9; } else if (GetComponent <Albatross>()) { birdType = 4; health = 7; gutValue = 11; } balloonBasketScript = GameObject.Find("BalloonBasket").GetComponent <BalloonBasket> (); }
// Use this for initialization void Awake() { health = 1; wavesScript = GameObject.Find ("WorldBounds").GetComponent<Waves> (); summonTheCrowsScript = GameObject.Find ("WorldBounds").GetComponent<SummonTheCrows> (); gutSplosionParentString = "Prefabs/Birds/GutSplosionParent"; gutSplosions = new string[]{ "Prefabs/GutSplosions/GutSplosion1a", //small birds //0 "Prefabs/GutSplosions/GutSplosion2a", //medium birds //1 "Prefabs/GutSplosions/GutSplosion2b", //1 "Prefabs/GutSplosions/GutSplosion2c", //2 "Prefabs/GutSplosions/GutSplosion2d", //3 "Prefabs/GutSplosions/GutSplosion2e", //4 "Prefabs/GutSplosions/GutSplosion3a", //big birds //5 "Prefabs/GutSplosions/GutSplosion3b", //6 }; if (GetComponent<BabyCrow> ()) { birdType = 5; gutValue = 3; summonCrows = true; } if (GetComponent<Pigeon>()){ birdType = 0; gutValue = 3; } else if (GetComponent<Duck> ()) { birdType = 1; gutValue = 5; } else if (GetComponent<Crow>()){ birdType = 2; health = 1; gutValue = 7; } else if (GetComponent<Eagle>()){ birdType = 3; health = 2; gutValue = 9; } else if (GetComponent<Albatross>()){ birdType = 4; health = 7; gutValue = 11; } balloonBasketScript = GameObject.Find ("BalloonBasket").GetComponent<BalloonBasket> (); }