Exemple #1
0
    //Smash attack if possilbe, throw otherwise
    public override float Attack1()
    {
        float    attackTime = 0f;
        Tentacle tentacle   = ClosestTentacle();

        if (tentacle == null)
        {
            return(0f);
        }
        if (tentacle.InRange)
        {
            tentacle.EngageSmashAttack(true);
            attackTime = smashAttackTime + Tentacle.smashWaitTime;
        }
        else
        {
            if (Utils.Instance.Rng.Next() % 4 == 0)
            {
                attackTime = Attack6();
            }
            else
            {
                tentacle.EngageThrowAttack(Boat.transform.position);
                attackTime = throwAttackTime + Tentacle.throwWaitTime;
            }
        }
        return(attackTime);;
    }
Exemple #2
0
    //Throw iceberg with closest tentacle
    public override float Attack2()
    {
        Tentacle tentacle = ClosestTentacle();

        if (tentacle == null)
        {
            return(0f);
        }
        tentacle.EngageThrowAttack(Boat.transform.position);
        return(throwAttackTime + Tentacle.throwWaitTime);
    }