Beispiel #1
0
 public override void OnEnter()
 {
     navAgent.enabled    = false;
     navObstacle.enabled = true;
     attackDone          = false;
     animator.SetInteger(Strings.ANIMATIONSTATE, (int)AnimationStates.Attack1);
     shooterProperties.Initialize(2, 5, 6, 0);
     SetShooterProperties(shooterProperties);
     waitTimeToDestruct = properties.selfDestructTime;
     blastRadius        = properties.blastRadius;
     scaleRate          = properties.selfDestructTime;
     Timing.RunCoroutine(RunStartupTimer(), CoroutineName);
 }
Beispiel #2
0
    public override void OnEnter()
    {
        initialPosition  = controller.transform.position;
        doneAttacking    = false;
        oldAnimatorSpeed = animator.speed;
        animator.speed   = animatorSpeed;
        attacks          = new List <int>();
        //attacks.Add((int)AnimationStates.Attack1);
        //attacks.Add((int)AnimationStates.Attack2);
        //attacks.Add((int)AnimationStates.Attack3);
        attacks.Add((int)AnimationStates.Attack4);
        attacks.Add((int)AnimationStates.Attack5);
        attacks.Add((int)AnimationStates.Attack6);
        int animationAttackValue = attacks[Random.Range(0, attacks.Count)];

        moveTowardsPlayer = false;
        animator.SetInteger(Strings.ANIMATIONSTATE, animationAttackValue);
        shooterProperties.Initialize(2, 5, 6, 0);
        SetShooterProperties(shooterProperties);
    }
Beispiel #3
0
 private void Start()
 {
     shooterProperties.Initialize(0, 5, 6, 2);
     SetShooterProperties(shooterProperties);
     Timing.RunCoroutine(DestroyAfter(), CoroutineName);
 }