示例#1
0
    private void SpawnCircleStaying_Type_A(Transform spawnTr)
    {
        EnemyCore enemyCore = m_EnemyManager.SpawnEnemy(EnemyType.Circle, spawnTr.position, Quaternion.identity);

        Transform[] enemyFireTransforms = enemyCore.GetEnemyFireTransforms();

        int              bulletDamage     = 10;
        float            bulletSpeed      = 30.0f;
        EntityBulletType EntityBulletType = EntityBulletType.MediumBean;

        enemyCore
        .EventCore()
        .Sequence()
        .AppendActionMoveBy(new Vector3(0, -20), 5.0f)
        .Wait(12.0f)
        .AppendActionMoveBy(new Vector3(0, 50), 12.5f)
        .Run();

        enemyCore
        .EventCore()
        .Sequence()
        .AppendAttackTornadoShot(enemyFireTransforms[0], bulletDamage, bulletSpeed, EntityBulletType, 30, 0.1f, true, AllyFlag.Enemy, Vector3.down, EventAttack.TornadoShot.Direction.ClockWise)
        .Loop(true)
        .Run();
    }
示例#2
0
    private void SpawnPentagonMoveUpAndDown_Type_B(Transform spawnTr, Transform targetTr)
    {
        EnemyCore enemyCore = m_EnemyManager.SpawnEnemy(EnemyType.Pentagon, spawnTr.position, Quaternion.identity);

        Transform[] enemyFireTransforms = enemyCore.GetEnemyFireTransforms();


        int              bulletDamage     = 10;
        float            bulletSpeed      = 50.0f;
        EntityBulletType EntityBulletType = EntityBulletType.SmallVulcan;

        enemyCore
        .SetInvincible(false)
        .SetPenetrable(false)
        .EventCore()
        .Sequence()
        .AppendActionMoveTo(targetTr.position, 20.0f)
        .Run();

        enemyCore
        .EventCore()
        .Sequence()
        .Wait(0.5f)
        .AppendAttackCornShot(enemyFireTransforms[0], bulletDamage, bulletSpeed, EntityBulletType, 0, 1)
        .Wait(0.5f)
        .AppendAttackCornShot(enemyFireTransforms[0], bulletDamage, bulletSpeed, EntityBulletType, 0, 1)
        .Wait(0.5f)
        .AppendAttackCornShot(enemyFireTransforms[0], bulletDamage, bulletSpeed, EntityBulletType, 0, 1)
        .Wait(1.0f)
        .Loop(true)
        .Run();
    }
示例#3
0
    private void SpawnPentagonMoveUpAndDown_Type_A(Transform spawnTr, Transform targetTr)
    {
        EnemyCore enemyCore = m_EnemyManager.SpawnEnemy(EnemyType.Pentagon, spawnTr.position, Quaternion.identity);

        Transform[] enemyFireTransforms = enemyCore.GetEnemyFireTransforms();


        int              bulletDamage     = 10;
        float            bulletSpeed      = 60.0f;
        EntityBulletType EntityBulletType = EntityBulletType.SmallVulcan;

        enemyCore
        .SetInvincible(false)
        .SetPenetrable(false)
        .EventCore()
        .Sequence()
        .AppendActionMoveTo(targetTr.position, 20.0f)
        .Run();

        enemyCore
        .EventCore()
        .Sequence()
        .Wait(1.0f)
        .AppendAttackCornShot(enemyFireTransforms[0], bulletDamage, bulletSpeed, EntityBulletType, 60.0f, 5)
        .Wait(1.0f)
        .AppendAttackCornShot(enemyFireTransforms[0], bulletDamage, bulletSpeed, EntityBulletType, 60.0f, 5)
        .Wait(1.0f)
        .AppendAttackTornadoShot(enemyFireTransforms[0], bulletDamage, 50.0f, EntityBulletType, 25, 0.1f, true, AllyFlag.Enemy, Vector3.down, EventAttack.TornadoShot.Direction.ClockWise)
        .AppendAttackTornadoShot(enemyFireTransforms[0], bulletDamage, 50.0f, EntityBulletType, 25, 0.1f, true, AllyFlag.Enemy, Vector3.down, EventAttack.TornadoShot.Direction.CounterClockWise)
        .Loop(true)
        .Run();
    }
示例#4
0
    private void SpawnCircleUpLoopFollowing()
    {
        EnemyCore enemyCore = m_EnemyManager.SpawnEnemy(EnemyType.Circle, m_PathHolderList[0][0].position, Quaternion.identity);

        Transform[] enemyFireTransforms = enemyCore.GetEnemyFireTransforms();

        EntityBulletType EntityBulletType = EntityBulletType.MediumBean;
        int   bulletDamage = 10;
        float bulletSpeed  = 50.0f;

        List <Vector3> vectorList = new List <Vector3>();

        for (int i = 0; i < m_PathHolderList[0].Count; i++)
        {
            vectorList.Add(m_PathHolderList[0][i].position);
        }

        enemyCore
        .EventCore()
        .Sequence()
        .AppendActionMovePaths(vectorList.ToArray(), 15.0f)
        .Run();

        enemyCore
        .EventCore()
        .Sequence()
        .Wait(1.5f)
        .AppendAttackCornShot(enemyFireTransforms[1], bulletDamage, bulletSpeed, EntityBulletType, 0f, 1)
        .AppendAttackCornShot(enemyFireTransforms[2], bulletDamage, bulletSpeed, EntityBulletType, 0f, 1)
        .AppendAttackCornShot(enemyFireTransforms[3], bulletDamage, bulletSpeed, EntityBulletType, 0f, 1)
        .AppendAttackCornShot(enemyFireTransforms[4], bulletDamage, bulletSpeed, EntityBulletType, 0f, 1)
        .Wait(1.0f)
        .AppendAttackTornadoShot(enemyFireTransforms[0], bulletDamage, bulletSpeed, EntityBulletType, 10, 0.1f, true, AllyFlag.Enemy, Vector3.down, EventAttack.TornadoShot.Direction.ClockWise)
        .Loop(true)
        .Run();
    }
示例#5
0
    private void SpawnBoss()
    {
        EnemyCore enemyCore = m_EnemyManager.SpawnEnemy(EnemyType.BossHexagon, new Vector3(30.0f, 107.5f, -5.0f), Quaternion.identity);

        Transform[] enemyFireTransforms = enemyCore.GetEnemyFireTransforms();

        int              bulletDamage     = 10;
        float            bulletSpeed      = 50.0f;
        EntityBulletType EntityBulletType = EntityBulletType.BigBean;

        enemyCore
        .OnDestroyCallBack(() => RemoveTargetedEntity("BOSS"))
        .EventCore()
        .Spawn()
        .AppendActionMovePaths(new Vector3[]
        {
            new Vector3(30.0f, 80.0f, -5.0f),
            new Vector3(20.0f, 70.0f, -5.0f),
            new Vector3(40.0f, 65.0f, -5.0f),
            new Vector3(30.0f, 80.0f, -5.0f),
        }, 20.0f)
        .AppendCallBack(() =>
        {
            enemyCore.EventCore()
            .Wait(1.0f)
            .AppendAttackCornShot(enemyFireTransforms[0], bulletDamage, bulletSpeed, EntityBulletType, 360.0f, 10)
            .Wait(1.0f)
            .AppendAttackCornShot(enemyFireTransforms[1], bulletDamage, bulletSpeed, EntityBulletType, 360.0f, 10)
            .Wait(1.0f)
            .AppendAttackCornShot(enemyFireTransforms[0], bulletDamage, bulletSpeed, EntityBulletType, 360.0f, 10)
            .Wait(1.0f)
            .AppendAttackCornShot(enemyFireTransforms[1], bulletDamage, bulletSpeed, EntityBulletType, 360.0f, 10)
            .Wait(1.0f)
            .AppendAttackCornShot(enemyFireTransforms[0], bulletDamage, bulletSpeed, EntityBulletType, 360.0f, 10)
            .Wait(1.0f)
            .AppendAttackCornShot(enemyFireTransforms[1], bulletDamage, bulletSpeed, EntityBulletType, 360.0f, 10)
            .Wait(1.0f)
            .AppendAttackCornShot(enemyFireTransforms[0], bulletDamage, bulletSpeed, EntityBulletType, 360.0f, 10)
            .Wait(1.0f)
            .AppendAttackCornShot(enemyFireTransforms[1], bulletDamage, bulletSpeed, EntityBulletType, 360.0f, 10)
            .Wait(1.0f)
            .AppendAttackCornShot(enemyFireTransforms[0], bulletDamage, bulletSpeed, EntityBulletType, 360.0f, 10)
            .Wait(1.0f)
            .AppendAttackCornShot(enemyFireTransforms[1], bulletDamage, bulletSpeed, EntityBulletType, 360.0f, 10)

            //
            .Wait(1.0f)
            .AppendAttackCornShot(enemyFireTransforms[0], bulletDamage, bulletSpeed, EntityBulletType, 360.0f, 10)
            .Wait(1.0f)
            .AppendAttackCornShot(enemyFireTransforms[1], bulletDamage, bulletSpeed, EntityBulletType, 360.0f, 10)
            .Wait(1.0f)
            .AppendAttackCornShot(enemyFireTransforms[0], bulletDamage, bulletSpeed, EntityBulletType, 360.0f, 10)
            .Wait(1.0f)
            .AppendAttackCornShot(enemyFireTransforms[1], bulletDamage, bulletSpeed, EntityBulletType, 360.0f, 10)
            .Wait(1.0f)
            .AppendAttackCornShot(enemyFireTransforms[0], bulletDamage, bulletSpeed, EntityBulletType, 360.0f, 10)
            .Wait(1.0f)
            .AppendAttackCornShot(enemyFireTransforms[1], bulletDamage, bulletSpeed, EntityBulletType, 360.0f, 10)
            .Wait(1.0f)
            .AppendAttackCornShot(enemyFireTransforms[0], bulletDamage, bulletSpeed, EntityBulletType, 360.0f, 10)
            .Wait(1.0f)
            .AppendAttackCornShot(enemyFireTransforms[1], bulletDamage, bulletSpeed, EntityBulletType, 360.0f, 10)
            .Wait(1.0f)
            .AppendAttackCornShot(enemyFireTransforms[0], bulletDamage, bulletSpeed, EntityBulletType, 360.0f, 10)
            .Wait(1.0f)
            .AppendAttackCornShot(enemyFireTransforms[1], bulletDamage, bulletSpeed, EntityBulletType, 360.0f, 10)
            .Run();
        })
        .Sequence()
        .Wait(20.0f)
        .AppendActionRotateBy(new Vector3(0, 0, 180.0f), 1.0f)
        .Spawn()
        .AppendAttackTornadoShot(enemyFireTransforms[0], bulletDamage, bulletSpeed, EntityBulletType, 20, 0.1f, false)
        .Sequence()
        .Wait(1.5f)
        .AppendAttackTornadoShot(enemyFireTransforms[1], bulletDamage, bulletSpeed, EntityBulletType, 20, 0.1f, false)
        .Spawn()
        .AppendAttackGuidedShot(enemyFireTransforms[0], bulletDamage, bulletSpeed, EntityBulletType, 30, 0.3f, () => m_PlayerManager.GetPlayer())
        .AppendAttackGuidedShot(enemyFireTransforms[1], bulletDamage, bulletSpeed, EntityBulletType, 30, 0.3f, () => m_PlayerManager.GetPlayer())
        .Sequence().Wait(9.0f)
        .Loop(true)
        .Run();

        AddTargetedEntity("BOSS", enemyCore);
    }