Inheritance: MonoBehaviour
        private void DoAddTroops()
        {
            Waves waves = wb.GetWaves();

            troopMap.SpawnWave(waves.GetTroops(1));
            OnTurnBegin(PlayerSide.Blue);
        }
Beispiel #2
0
        public override void SetWave()
        {
            switch (Level)
            {
            case 1:
                //                                    12345678901234567890123456789012345678901234567890
                Waves.Add(new WaveLine("Catcher   ", "1111 111111 111111 111111 111111 111111 111111 111"));
                Waves.Add(new WaveLine("Faster    ", "    1      1      1      1      1      1      1   "));
                Waves.Add(new WaveLine("Dragonfly ", "        8          A          C          E        "));
                Waves.Add(new WaveLine("@Shrink   ", " ++          ++          ++          ++         ++"));
                break;

            case 2:
                //                                    12345678901234567890123456789012345678901234567890
                Waves.Add(new WaveLine("Frog      ", "1111 111111 111111 111111 111111 111111 111111 111"));
                Waves.Add(new WaveLine("Faster    ", "    1      1      1      1      1      1      1   "));
                Waves.Add(new WaveLine("Dragonfly ", "        8          A          C          E        "));
                Waves.Add(new WaveLine("Arrow     ", "     4                   5                  6     "));
                Waves.Add(new WaveLine("@Dark     ", "             ++                    ++             "));
                break;

            case 3:
                //                                    12345678901234567890123456789012345678901234567890
                Waves.Add(new WaveLine("Frog      ", "1111 111111 111111 111111 111111 111111 111111 111"));
                Waves.Add(new WaveLine("Faster    ", "    1      1      1      1      1      1      1   "));
                Waves.Add(new WaveLine("Dragonfly ", "                 8               9                "));
                Waves.Add(new WaveLine("Arrow     ", "         4               5                 6      "));
                Waves.Add(new WaveLine("WallA     ", "     2       2       2      2  2  2  2  2    22222"));
                break;

            case 4:
                //                                    12345678901234567890123456789012345678901234567890
                Waves.Add(new WaveLine("Frog      ", "1111 111111 111111 111111 111111 111111 111111 111"));
                Waves.Add(new WaveLine("Faster    ", "    1      1      1      1      1      1      1   "));
                Waves.Add(new WaveLine("Dragonfly ", "       3      4      5      6      7      8     9 "));
                Waves.Add(new WaveLine("Arrow     ", "   2      3      4      5      6      7      8    "));
                Waves.Add(new WaveLine("@Dark     ", "             ++                    ++             "));
                break;

            case 5:
                //                                    12345678901234567890123456789012345678901234567890
                Waves.Add(new WaveLine("Frog      ", "1111 111111 111111 111111 111111 111111 111111 111"));
                Waves.Add(new WaveLine("Faster    ", "    1      1      1      1      1      1      1   "));
                Waves.Add(new WaveLine("Dragonfly ", "  4   4   5   5   6   6   7   7   8   8   9   9555"));
                Waves.Add(new WaveLine("Arrow     ", "    1     1     1    1    1   1   1    1    1   1 "));
                break;

            case 6:
                //                                    12345678901234567890123456789012345678901234567890
                Waves.Add(new WaveLine("Frog      ", "1111 111111 111111 111111 111111 111111 111111 111"));
                Waves.Add(new WaveLine("Faster    ", "    1      1      1      1      1      1      1   "));
                Waves.Add(new WaveLine("Dragonfly ", "33333333333333333333333333333333333333333333333333"));
                Waves.Add(new WaveLine("Arrow     ", "11111111111111111111111111111111111111111111111111"));
                Waves.Add(new WaveLine("Arrow     ", "           111111111111111111111111111111111111111"));
                Waves.Add(new WaveLine("Arrow     ", "                      1111111111111111111111111111"));
                Waves.Add(new WaveLine("Arrow     ", "                                 11111111111111111"));
                Waves.Add(new WaveLine("Arrow     ", "                                            111111"));
                break;
            }
        }
Beispiel #3
0
    IEnumerator SpawnWave(Waves _wave)
    {
        state = SpawnerState.spawning;
        int   count;
        float rate;

        foreach (WaveBurst enemy in _wave.burst)
        {
            count = enemy.count;
            if (count == 0)
            {
                count = Random.Range(1, 10);
            }
            rate = enemy.rate;
            if (rate == 0)
            {
                rate = Random.Range(1, 5);
            }
            for (int i = 0; i < count; i++)
            {
                SpawnEnemy(enemy.enemyType);
                yield return(new WaitForSeconds(1f / rate));
            }
        }

        state = SpawnerState.waiting;

        yield break;
    }
Beispiel #4
0
    // Use this for initialization
    void Start()
    {
        announce("Press enter to begin");

        mana  = GetComponent <Mana>();
        waves = GetComponent <Waves>();
    }
Beispiel #5
0
        /// <summary>
        /// Releases unmanaged and - optionally - managed resources.
        /// </summary>
        /// <param name="alsoManaged"><c>true</c> to release both managed and unmanaged resources; <c>false</c> to release only unmanaged resources.</param>
        private void Dispose(bool alsoManaged)
        {
            lock (SyncLock)
            {
                if (_isDisposed)
                {
                    return;
                }
                _isDisposed = true;

                if (!alsoManaged || WaveId < 0)
                {
                    return;
                }

                // Wait for the wave to finish a cycle
                while (true)
                {
                    var currentWaveId = Board.Waves.CurrentWaveId;
                    if (currentWaveId >= 0 && currentWaveId == WaveId)
                    {
                        Board.Waves.StopCurrent();
                        Board.Timing.Sleep(15);
                    }
                    else
                    {
                        break;
                    }
                }

                Waves.GpioWaveDelete(Convert.ToUInt32(WaveId));
                WaveId = -1;
            }
        }
Beispiel #6
0
        public override bool Init()
        {
            if (!base.Init())
            {
                return(false);
            }

            _waves = new Waves();
            _waves.Init(160, 160, 1.0f, 0.03f, 5.0f, 0.3f);

            Effects.InitAll(Device);
            InputLayouts.InitAll(Device);
            RenderStates.InitAll(Device);

            _grassMapSRV = ShaderResourceView.FromFile(Device, "Textures/grass.dds");
            _wavesMapSRV = ShaderResourceView.FromFile(Device, "Textures/water2.dds");
            _boxMapSRV   = ShaderResourceView.FromFile(Device, "Textures/WireFence.dds");

            BuildLandGeometryBuffers();
            BuildWaveGeometryBuffers();
            BuildCrateGeometryBuffers();

            Window.KeyDown += SwitchRenderState;

            return(true);
        }
Beispiel #7
0
        public void Update(GameTime gameTime)
        {
            if (!Paused)
            {
                currentTimeBetweenWaves += (float)gameTime.ElapsedGameTime.Milliseconds / 1000f;

                if (Waves.Count > 0)
                {
                    if (currentTimeBetweenWaves >= Waves.Peek().WaveData.TimeUntilWave)
                    {
                        NewWave();
                    }
                }

                if (QueuedEnemies.Count > 0)
                {
                    currentTimeBetweenEnemySpawns += (float)gameTime.ElapsedGameTime.Milliseconds / 1000f;
                    if (currentTimeBetweenEnemySpawns >= CurrentWave.WaveData.TimeBetweenEnemySpawns)
                    {
                        currentEnemyInWave++;
                        GameplayScreen.AddEnemyShip(QueuedEnemies.Dequeue(), "Wave " + CurrentWaveNumber + " Enemy " + currentEnemyInWave);
                        currentTimeBetweenEnemySpawns = 0;
                    }
                }
            }
        }
        public SignalProcessingForm()
        {
            InitializeComponent();

            chartWaves.ChartAreas.ElementAt(0).AxisX.Title      = "Seconds";
            chartFFTOutputs.ChartAreas.ElementAt(0).AxisX.Title = "Hz";

            waveSettingsControl.Generate += (object sender, GenericEventArgs <WaveSetup> e) =>
            {
                var wave = Waves.Generate(e.Parameter);
                if (maxFreq < e.Parameter.Frequency)
                {
                    maxFreq = (int)e.Parameter.Frequency;
                }


                BindWaves(wave, e.Parameter);
                BindFFTOutput(wave, e.Parameter);
            };

            waveSettingsControl.Clear += (object sender, EventArgs e) =>
            {
                chartWaves.Series.Clear();
                chartFFTOutputs.Series.Clear();
                maxFreq = 0;
            };
        }
Beispiel #9
0
    public IEnumerator SpawnWave(Waves wave)
    {
        int longestWave = wave.numberOfEnemies[0];

        float spawnRateOne = wave.queuedPatterns[0].spawnRate;
        float spawnRateTwo = 0.0f; float spawnRateThree = 0.0f;
        int   spawnCounterOne = 0;
        int   spawnCounterTwo = 0; int spawnCounterThree = 0;
        bool  completedOne = false; bool completedTwo = false; bool completedThree = false;
        float nextSpawnOne = 0.0f; float nextSpawnTwo = 0.0f; float nextSpawnThree = 0.0f;

        if (wave.queuedPatterns.Length > 1)
        {
            longestWave  = Mathf.Max(wave.numberOfEnemies[0], wave.numberOfEnemies[1]);
            spawnRateTwo = wave.queuedPatterns[1].spawnRate;
        }
        if (wave.queuedPatterns.Length > 2)
        {
            longestWave    = Mathf.Max(longestWave, wave.numberOfEnemies[2]);
            spawnRateThree = wave.queuedPatterns[2].spawnRate;
        }

        while (!completedOne || !completedTwo || !completedThree)
        {
            if (spawnCounterOne >= wave.numberOfEnemies[0])
            {
                completedOne = true;
            }
            if (Time.time > nextSpawnOne && !completedOne)
            {
                nextSpawnOne = Time.time + spawnRateOne;
                GameManager.Instance.poolManager.ReuseObject(enemies[((wave.enemiesToSpawn[0] / (int)Mathf.Pow(10, spawnCounterOne)) % 10) - 1], spawnpoints[0].position, Quaternion.identity, wave.queuedPatterns[0], spawnCounterOne);
                spawnCounterOne++;
            }

            if (wave.queuedPatterns.Length < 2 || spawnCounterTwo >= wave.numberOfEnemies[1])
            {
                completedTwo = true;
            }
            if (Time.time > nextSpawnTwo && !completedTwo)
            {
                nextSpawnTwo = Time.time + spawnRateTwo;
                GameManager.Instance.poolManager.ReuseObject(enemies[((wave.enemiesToSpawn[1] / (int)Mathf.Pow(10, spawnCounterTwo)) % 10) - 1], spawnpoints[wave.spawnPoints[1] - 1].position, Quaternion.identity, wave.queuedPatterns[1], spawnCounterTwo);
                spawnCounterTwo++;
            }

            if (wave.queuedPatterns.Length < 3 || spawnCounterThree >= wave.numberOfEnemies[2])
            {
                completedThree = true;
            }
            if (Time.time > nextSpawnThree && !completedThree)
            {
                nextSpawnThree = Time.time + spawnRateThree;
                GameManager.Instance.poolManager.ReuseObject(enemies[((wave.enemiesToSpawn[2] / (int)Mathf.Pow(10, spawnCounterThree)) % 10) - 1], spawnpoints[wave.spawnPoints[2] - 1].position, Quaternion.identity, wave.queuedPatterns[2], spawnCounterTwo);
                spawnCounterThree++;
            }

            yield return(null);
        }
    }
Beispiel #10
0
    public float getHeight(Vector3 position)
    {
        Waves currentWaves = findWavesAtPoint(position);

        //get position in the current waves
        return(currentWaves.GetHeight(position));
    }
 public void StartWave()
 {
     if (player.CurrentTurret != null)
     {
         player.DeSelectTurret();
     }
     if (AutoWaves)
     {
         waves[0].waveProgression(CurrentWave);
     }
     if (player.DroneBought)
     {
         player.DronePoints.SetActive(false);
     }
     wave             = waves[WaveIndex];
     RemainingEnemies = waves[WaveIndex].TotalEnemies();
     UpdateREnemies();
     WaveButton.interactable = false;
     WaveButton.GetComponent <Image>().sprite = player.GameSpeed2;//gamespeed just because it happens to be the image I want.
     Lvl1Spawned = false;
     Lvl2Spawned = false;
     Lvl3Spawned = false;
     Lvl4Spawned = false;
     Lvl5Spawned = false;
     Lvl6Spawned = false;
     Lvl7Spawned = false;
     Lvl8Spawned = false;
     WaveStarted = true;
     for (int i = 0; i < camoSpawnedAmount.Length; i++)
     {
         camoSpawnedAmount[i] = 0;
     }
 }
Beispiel #12
0
 // Start is called before the first frame update
 void Start()
 {
     waves          = FindObjectOfType <Waves>();
     boatController = FindObjectOfType <WaterBoat>();
     sunParticle.Play();
     rainParticle.Stop();
 }
Beispiel #13
0
        public override bool Init()
        {
            if (!base.Init())
            {
                return(false);
            }

            _waves = new Waves();
            _waves.Init(160, 160, 1.0f, 0.03f, 5.0f, 0.3f);

            Effects.InitAll(Device);
            InputLayouts.InitAll(Device);
            RenderStates.InitAll(Device);

            _grassMapSRV = ShaderResourceView.FromFile(Device, "Textures/grass.dds");
            _wavesMapSRV = ShaderResourceView.FromFile(Device, "Textures/water2.dds");
            _boxMapSRV   = ShaderResourceView.FromFile(Device, "Textures/WireFence.dds");

            var filenames = new [] { "Textures/tree0.dds", "Textures/tree1.dds", "Textures/tree2.dds", "Textures/tree3.dds" };

            _treeTextureMapArraySRV = Util.CreateTexture2DArraySRV(Device, ImmediateContext, filenames, Format.R8G8B8A8_UNorm);

            BuildLandGeometryBuffers();
            BuildWaveGeometryBuffers();
            BuildCrateGeometryBuffers();
            BuildTreeSpritesBuffers();

            Window.KeyDown += SwitchRenderState;

            return(true);
        }
Beispiel #14
0
 public void nextTurn()
 {
     if (spawn.canStart() && !this.turnActive)
     {
         Debug.Log("chegou");
         Waves w = waveList[this.actualTurn];
         StartCoroutine(showTextFuntion(w.quantity, w.type));
         this.actualTurn++;
         room.hideSpots();
         this.turnActive = true;
         this.pause      = false;
     }
     else if (this.turnActive && !this.pause)
     {
         gamePause.SetActive(true);
         playPause.GetComponent <Image>().sprite = playImage;
         Time.timeScale = 0;
         this.pause     = true;
     }
     else if (this.turnActive && this.pause)
     {
         Debug.Log("Despausando");
         Time.timeScale = 1;
         this.pause     = false;
         gamePause.SetActive(false);
     }
     else if (!spawn.canStart())
     {
         blocked.SetActive(true);
     }
 }
Beispiel #15
0
    public void startWaveSequence(int seqID)//called from GameControl to determine what order waves should appear in
    {
        alertText   = GameObject.FindGameObjectWithTag("alert").GetComponent <Text>();
        wavesScript = gameObject.AddComponent <Waves>();
        switch (seqID)
        {
        case 0:    //Case 0 used for score attack, all else used for defined sequences of waves
            StartCoroutine(randomWaves());
            break;

        case 1:
            sequence.Add(4);
            StartCoroutine(waveSequence(true));
            break;

        case 2:
            for (int i = 1; i < wavesScript.wavesCount; i++)
            {
                sequence.Add(i);
            }
            sequence.Add(0);
            StartCoroutine(waveSequence(true));
            break;

        default:
            print("Sequence not found");
            break;
        }
    }
Beispiel #16
0
    /// <summary>Moves onto the next stage, and deletes the old stage elements</summary>
    /// <param name="sender">The object that sent this request</param>
    public void UpdateStage(Waves sender)
    {
        // Remove the previous waves object so it cant spawn more waves.
        Destroy(sender);

        // Update the stage number:
        currentStage++;

        // Is the player currently playing normal(sequential) stages?
        if (inNormalStages)
        {
            // Ran out of normal stages?
            if (currentStage > normalStages.Count() - 1)
            {
                // Transition into endless mode.
                inNormalStages = false;
                // Start the first endless stage.
                Waves newWaves = endlessStages[0].AddComponent <Waves>();
            }
            else
            {
                // Start the waves of the next normal stage.
                Waves newWaves = normalStages[currentStage].AddComponent <Waves>();
            }
        }
        else
        {
            // Choose a random stage from the pool of endliss stages.
            int randomIndex = Random.Range(0, endlessStages.Count);

            // Load the waves of this endless stage.
            Waves newWaves = endlessStages[randomIndex].AddComponent <Waves>();
        }
    }
Beispiel #17
0
    private void UpdateLevelType()
    {
        levelType = LevelManager.levelToLoad;

        if (levelType == null)
        {
            levelType = LevelManager.GetLevelType(0);
        }

        hazardSpawnRateIncrease = levelType.hazardSpawnRateIncrease;
        spawnables = new SpawnInfo[levelType.spawnables.Length];
        levelType.spawnables.CopyTo(spawnables, 0);
        RenderSettings.skybox = levelType.skyBoxMaterial;

        Waves        ocean         = FindObjectOfType <Waves>();
        MeshRenderer oceanRenderer = ocean.GetComponent <MeshRenderer>();

        if (oceanRenderer != null)
        {
            oceanRenderer.material = levelType.oceanMaterial;
        }

        for (int i = 0; i < spawnables.Length; i++)
        {
            spawnables[i].spawnTime = 1f / spawnables[i].spawnRate;
        }
    }
Beispiel #18
0
        /// <summary>
        /// Writes the specified buffer to the transmit pin as a free-form wave.
        /// </summary>
        /// <param name="buffer">The buffer.</param>
        public void Write(byte[] buffer)
        {
            Waves.GpioWaveClear();
            BoardException.ValidateResult(
                Waves.GpioWaveAddSerial(
                    (UserGpio)_transmitPin.PinNumber,
                    Convert.ToUInt32(BaudRate),
                    Convert.ToUInt32(DataBits),
                    Convert.ToUInt32(StopBits),
                    0,
                    Convert.ToUInt32(buffer.Length),
                    buffer));

            var waveId = BoardException.ValidateResult(
                Waves.GpioWaveCreate());

            Waves.GpioWaveTxSend(Convert.ToUInt32(waveId), WaveMode.OneShotSync);

            // Wait for the wave to finish sending
            while (Waves.GpioWaveTxBusy() > 0)
            {
                Board.Timing.Sleep(1);
            }

            Waves.GpioWaveDelete(Convert.ToUInt32(waveId));
        }
Beispiel #19
0
        /// <summary>
        /// 重設場景
        /// </summary>
        public void Reset()
        {
            IsStart     = false;
            IsEnding    = false;
            PlayingInfo = new ScenePlayingInfo(SceneInfo.SceneID, Level, SceneInfo.GetPlayingTimeLimit(Level));
            SceneSlow   = 1F;
            GameObjects.Clear();
            EffectObjects.Clear();
            Waves.Clear();
            SetWave();

            int maxWave = 0;

            foreach (WaveLine wave in Waves)
            {
                maxWave = Math.Max(maxWave, wave.Length);
            }
            WaveNo.Limit              = maxWave;
            WaveNo.Value              = 0;
            WaveCounter.Value         = 0;
            MenuCooldownCounter.Value = MenuCooldownCounter.Limit;

            Padding padding = Global.DefaultMainRectanglePadding;

            MainRectangle = new Rectangle(padding.Left, padding.Top, Width - padding.Horizontal, Height - padding.Vertical);
        }
        public Database()
        {
            MYSQL = new MySQLHandler();
            try
            {
                if (MYSQL.Connection.State != ConnectionState.Open)
                {
                    MYSQL.Connection.Open();
                }
            }
            catch (Exception ex)
            {
                Console.WriteLine("MSG_FATAL", "Can't connect to database. " + ex.ToString());
                return;
            }

            Console.WriteLine("MSG_STARTUP", "Connected to MYSQL.");

            skills = new Skills(MYSQL);
            Console.WriteLine("MSG_LOAD", "Skill database loaded with [" + skills.SkillList.Count + "] skills");
            ItemDatabase = new Items(MYSQL);
            Console.WriteLine("MSG_LOAD", "Item database loaded with [" + ItemDatabase.ItemList.Count + "] items");
            monsters = new Monsters(MYSQL);
            Console.WriteLine("MSG_LOAD", "Monster database loaded with [" + monsters.MonsterListDB.Count + "] monsters");
            waves = new Waves(MYSQL, new Monsters(MYSQL));
            Console.WriteLine("MSG_LOAD", "Waves database loaded with [" + waves.WaveList.Count + "] waves");
            NPCsDatabase = new NPCs(MYSQL, ItemDatabase);
            Console.WriteLine("MSG_LOAD", "NPC database loaded with [" + NPCsDatabase.NPCsList.Count + "] NPCs!");
            Maps = new maps();
        }
Beispiel #21
0
 void Start()
 {
     // Settings
     reboot_time = 0f;
     controller  = GetComponent <CharacterController>();
     animator    = GetComponent <Animator>();
     wavescript  = FindObjectOfType(typeof(Waves)) as Waves;
 }
Beispiel #22
0
 // unity awake
 void Awake()
 {
     // create the components
     m_waves         = gameObject.AddComponent <Waves>();
     m_headache      = gameObject.AddComponent <Headache>();
     m_coloredRays   = gameObject.AddComponent <ColoredRays>();
     m_lowResolution = gameObject.AddComponent <LowResolution>();
 }
Beispiel #23
0
    // Use this for initialization
    void Start()
    {
        waves        = GetComponent <Waves>();
        mana         = GetComponent <Mana>();
        enemyCounter = GetComponent <EnemyCounter>();

        StartCoroutine("tutorial");
    }
Beispiel #24
0
    void Start()
    {
        mana    = GetComponent <Mana>();
        waves   = GetComponent <Waves>();
        enemies = GetComponent <EnemyCounter>();

        waves.StartCoroutine("spawnWaves");
    }
        private void CreateGameController(Waves waves, int xMax, int yMax)
        {
            IBattleResolver battles = new AlwaysDamageBattles();
            Board           board   = new Board(xMax, yMax);

            gc = new GameController(battles, board, waves);
            gc.BeginGame();
        }
    public static void CreateWavesAssetFile()
    {
        Waves asset = CustomAssetUtility.CreateAsset <Waves>();

        asset.SheetName     = "gogtowerdefence";
        asset.WorksheetName = "Waves";
        EditorUtility.SetDirty(asset);
    }
Beispiel #27
0
 public GameController(IBattleResolver battleResolver, Board board, Waves waves)
 {
     this.battleResolver = battleResolver;
     this.waves          = waves;
     this.board          = board;
     troopMap            = new TroopMap(board);
     validator           = new MoveValidator(troopMap, board, activePlayer);
     troopAi             = new TroopAi(troopMap, board);
 }
Beispiel #28
0
 public HuC6280PSG()
 {
     MaxVolume = short.MaxValue;
     Waves.InitWaves();
     for (int i = 0; i < 8; i++)
     {
         Channels[i] = new PSGChannel();
     }
 }
Beispiel #29
0
 public void LoadContent()
 {
     foreach (string waveDataAsset in GameplayScreen.GameplayScreenData.WaveNames)
     {
         Wave <T> wave = new Wave <T>(waveDataAsset);
         wave.LoadContent();
         Waves.Enqueue(wave);
     }
 }
Beispiel #30
0
 public HuC6280PSG(int spf)
 {
     _spf = spf;
     Waves.InitWaves();
     for (int i = 0; i < 8; i++)
     {
         Channels[i] = new PSGChannel();
     }
 }
Beispiel #31
0
 // 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> ();
 }
    void Start()
    {
        // initiate timer
        isWaveEnded = true;

        waves = GetComponent<Waves>();
        currentWaveCol = 0;
        updateCurrentWave();
    }