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; } } } }
public bool gambitComplete(out GambitResult result) { if (currentGambit.isComplete(out result)) return true; return false; }
/// <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; }
/// <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; }
public static void testActionRanged(Sprite player, Sprite target, GambitResult gambitResult) { player.hitTargetRanged(target, gambitResult.multiplier); }
public void resolve(PlayerSprite player, Sprite target, EnemyPanel enemies, GambitResult result) { action(player, target, result); }