Exemplo n.º 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);;
    }
Exemplo n.º 2
0
 private void ProcessTentacleMvmnt()
 {
     tentacleMvmntTimer += Time.deltaTime;
     if (tentacleMvmntTimer > tentacleMvmntDelay)
     {
         inTentacleMvmnt = false;
         tentacleInMovement.EngageSmashAttack(true);
     }
 }