void addPoints()
    {
        float points = POINTS_RATE * DOOMSDAY_SPEED * SPEED_MODIFIER * ATTACK_SPEED;

        actionPoints.addPoints(points);
        actionPoints.getMeter(doomsdayTimer);
        points = POINTS_RATE * (damageModule.getAttribute(Attribute.Speed)) * SPEED_MODIFIER * ATTACK_SPEED;
        actionPoints2.addPoints(points);
        actionPoints2.getMeter(attackTimer);
    }
 // Update is called once per frame
 void Update()
 {
     dragonText.text = healthBar.getHealthString();
     addPoints();
     counterBool = setCounterBool();
     setCounterColor();
     if (counter())
     {
         cancelAttack();
     }
     if (actionPoints2.getMeter() > counterWindow)
     {
         setAnimationTrigger();
         makeTimerVisible();
     }
     if (actionPoints2.isReady() && !gameOver())
     {
         doRandomAttack(nextAttack);
         actionPoints2.usePoints();
         nextAttack = getRandomAttack();
         resetAttackTimerPos();
     }
     if (timerCount == TIMER_MAX)
     {
         GameController.GetComponent <GameController>().gameOver();
     }
     else if (actionPoints.isReady())
     {
         ++timerCount;
         if (timerCount < TIMER_MAX)
         {
             powerUp();
             setTimerColor(doomsdayTimer);
         }
     }
 }
Exemplo n.º 3
0
 public void displayUpdates(Text myText, Image actionMeter)
 {
     actionPoints.setHeroColor(actionMeter);
     actionPoints.getMeter(actionMeter);
     myText.text = healthBar.getHealthString();
 }