Example #1
0
 public void act(GambitResult result)
 {
     currentDelay = 0;
     for(int i = 0; i<SIZE; ++i)
     {
         if (this[i] != null)
         {
             if (this[i].currentState == Sprite.State.Idle)
             {
                 PartyUtils.testAction(this[i], PartyUtils.getRandomPartyMember(), result);
                 return;
             }
         }
     }
 }
Example #2
0
 public bool gambitComplete(out GambitResult result)
 {
     if (currentGambit.isComplete(out result))
         return true;
     return false;
 }
Example #3
0
 /// <summary>
 /// Returns true if this gambit is complete. The multiplier for this gambit is passed through the out variable.
 /// </summary>
 /// <param name="multiplier">Float that will be assigned the multiplier based on the user's performance</param>
 /// <returns></returns>
 public virtual bool isComplete(out GambitResult result)
 {
     if (finished)
     {
         result = new GambitResult(multiplier, timeElapsed);
         finished = false;
         return true;
     }
     result = this.result;
     return false;
 }
Example #4
0
 /// <summary>
 /// Start this gambit from the given time. Must be called before the gambit can be used
 /// </summary>
 /// <param name="gameTime">The current GameTime object</param>
 public virtual void start(GameTime gameTime, int difficulty)
 {
     startTime = (int)gameTime.TotalGameTime.TotalMilliseconds;
     timeElapsed = 0;
     result = new GambitResult(multiplier, int.MaxValue);
     finished = false;
 }
Example #5
0
 public static void testActionRanged(Sprite player, Sprite target, GambitResult gambitResult)
 {
     player.hitTargetRanged(target, gambitResult.multiplier);
 }
Example #6
0
 public void resolve(PlayerSprite player, Sprite target, EnemyPanel enemies, GambitResult result)
 {
     action(player, target, result);
 }