Exemple #1
0
    protected override void spawnEnemies()
    {
//		TweenProperties enterPath = new SingleTween ("8_enter", enterDuration);
        TweenProperties cruisePath    = new SingleTween("8_cruise", cruiseDuration, cruiseDelay);
        TweenProperties cruisePathRev = cruisePath.Clone().Reverse();

        for (int i = 0; i < enemiesToSpawn; i++)
        {
            float yOffset = -i * enemyDistance;

            int             enterPathIndex = ((i % 3) + 1);
            float           enterDelay     = enterMaxDelay * Random.value;
            TweenProperties preEnterDelay  = new DelayTween(enterDelay);
            TweenProperties enter          = new SingleTween("8_enter" + enterPathIndex, enterDuration).OffsetByY(yOffset);
            TweenProperties postEnterDelay = new DelayTween(enterMaxDelay - enterDelay);

            TweenProperties preCruiseDelay = new DelayTween((enemiesToSpawn - i) * cruiseDuration);
            TweenProperties postCruiseDlay = new DelayTween(cruiseDuration * i);

            TweenProperties cruise    = cruisePath.Clone().OffsetByY(yOffset);
            TweenProperties cruiseRev = cruisePathRev.Clone().OffsetByY(yOffset);

            TweenProperties loop = new LoopTween(preCruiseDelay, cruise, postCruiseDlay, postCruiseDlay, cruiseRev, preCruiseDelay);
            spawnEnemy(EnemyObjectPool.type_enemy2, preEnterDelay, enter, postEnterDelay, loop);
        }
    }
Exemple #2
0
    override protected void spawnEnemies()
    {
        TweenProperties enter = new SingleTween("simpleEnter", enterDuration);


        spawnEnemy(EnemyObjectPool.type_enemy1, enter.Clone().OffsetByY(enemyOffset));
        spawnEnemy(EnemyObjectPool.type_enemy1, enter.Clone().OffsetByY(-enemyOffset));
    }
Exemple #3
0
    override protected void spawnEnemies()
    {
        TweenProperties enter    = new SingleTween("simpleEnter", enterDuration);
        TweenProperties moveUp   = new LoopTween(LoopTween.Loop.reverse, new SingleTween("2_up", flyDuration, flyDelay));
        TweenProperties moveDown = new LoopTween(LoopTween.Loop.reverse, new SingleTween("2_down", flyDuration, flyDelay));

        spawnEnemy(EnemyObjectPool.type_enemy2, enter.Clone().OffsetByY(enemyOffset), moveUp);
        spawnEnemy(EnemyObjectPool.type_enemy2, enter);
        spawnEnemy(EnemyObjectPool.type_enemy2, enter.Clone().OffsetByY(-enemyOffset), moveDown);
    }
Exemple #4
0
    override protected void spawnEnemies()
    {
        TweenProperties enter          = new SingleTween("9_enter", enterDuration);
        TweenProperties postEnterDelay = new DelayTween(loopDelay);

        TweenProperties goDown        = new SingleTween("9_changeSide", changeSideDuration);
        TweenProperties goUp          = goDown.Clone().Reverse();
        TweenProperties attackUp      = new SingleTween("9_attackUp", attackDuration);
        TweenProperties attackUpRev   = attackUp.Clone().Reverse();
        TweenProperties attackDown    = new SingleTween("9_attackDown", attackDuration);
        TweenProperties attackDownRev = attackDown.Clone().Reverse();

        TweenProperties loop = new LoopTween(attackUp, attackUpRev, goDown, attackDown, attackDownRev, goUp);

        spawnEnemy(EnemyObjectPool.type_boss, enter, postEnterDelay, loop);
    }