Beispiel #1
0
    protected override void AI_OnAttack()
    {
        //StraightProyectile newBullet = Instantiate(projectylePrefab, aim.position, Quaternion.identity).GetComponent<StraightProyectile>();
        StraightProyectile newBullet = PoolManager.Instance.SpawnFromPool("fireball", aim.position, Quaternion.identity).GetComponent <StraightProyectile>();

        newBullet.Initialize(AI.CurrentTarget.transform.position, timeToHit, AI.targetMask);
    }
Beispiel #2
0
    private void Attack()
    {
        if (CanAttack())
        {
            StraightProyectile newBullet = PoolManager.Instance.SpawnFromPool("fireball", aim.position, Quaternion.identity).GetComponent <StraightProyectile>();
            newBullet.Initialize(currentTarget.transform.position, timeToHit, targetMask);
        }

        Target();
    }
Beispiel #3
0
    protected override void AI_OnAttack()
    {
        StraightProyectile newBullet = Instantiate(projectylePrefab, aim.position, Quaternion.identity).GetComponent <StraightProyectile>();

        newBullet.Initialize(AI.CurrentTarget.transform.position, 0.2f, AI.targetMask);
    }