Esempio n. 1
0
    protected override void BrainInitialisation()
    {
        hp          = configScriptable.bossHp;
        damage      = configScriptable.bossDamage;
        speed       = configScriptable.bossSpeed;
        bulletSpeed = configScriptable.bossBulletSpeed;

        damageDealed = false;

        brain = new Brain(true);

        Chase           chase      = new Chase(2f, transform, AI.GetPlayer(), speed * 2);
        RandomMove      randomMove = new RandomMove(1f, transform, speed);
        ShootAtPosition shoot      = new ShootAtPosition(.2f, transform, AI.GetPlayer(), false, bulletSpeed, damage);
        MultiShot       multiShoot = new MultiShot(.2f, transform, AI.GetPlayer(), damage, bulletSpeed);
        AIWait          aIWait     = new AIWait(1f);

        brain.AddAIMechanic(chase);
        brain.AddAIMechanic(aIWait);

        brain.AddAIMechanic(multiShoot);
        brain.AddAIMechanic(aIWait);

        brain.AddAIMechanic(shoot);
        brain.AddAIMechanic(shoot);
        brain.AddAIMechanic(shoot);
        brain.AddAIMechanic(aIWait);

        brain.AddAIMechanic(randomMove);

        brain.ChooseState();

        coroutine = Wait(brain.GetCooldown());
        StartCoroutine(coroutine);
    }
Esempio n. 2
0
    protected override void BrainInitialisation()
    {
        hp          = configScriptable.flyerHp;
        damage      = configScriptable.flyerDamage;
        speed       = configScriptable.flyerSpeed;
        bulletSpeed = configScriptable.flyerBulletSpeed;

        brain = new Brain(true);

        RandomMove      randomMove = new RandomMove(1f, transform, speed);
        ShootAtPosition shoot      = new ShootAtPosition(1f, transform, AI.GetPlayer(), false, bulletSpeed, damage);


        brain.AddAIMechanic(randomMove);
        brain.AddAIMechanic(shoot);



        brain.ChooseState();

        coroutine = Wait(brain.GetCooldown());
        StartCoroutine(coroutine);
    }
Esempio n. 3
0
    protected override void BrainInitialisation()
    {
        hp          = configScriptable.playerHp;
        maxHP       = configScriptable.playerHp;
        damage      = configScriptable.playerDamage;
        speed       = configScriptable.playerSpeed;
        bulletSpeed = configScriptable.playerBulletSpeed;

        brain = new Brain(true);

        ShootAtPosition shoot = new ShootAtPosition(1f, transform, AI.GetCloserEnemy(gameCreator.enemyList, transform).transform, true, bulletSpeed, damage);

        brain.AddAIMechanic(shoot);

        brain.ChooseState();

        coroutine = Wait(brain.GetCooldown());
        StartCoroutine(coroutine);
    }
Esempio n. 4
0
    protected override void BrainInitialisation()
    {
        hp           = configScriptable.sliderHp;
        damage       = configScriptable.sliderDamage;
        speed        = configScriptable.sliderSpeed;
        damageDealed = false;

        brain = new Brain(false);

        Chase chase = new Chase(1f, transform, AI.GetPlayer(), speed);


        brain.AddAIMechanic(chase);



        brain.ChooseState();

        coroutine = Wait(brain.GetCooldown());
        StartCoroutine(coroutine);
    }