/// <summary> /// Handles the attack command from the menu /// </summary> /// <param name="o"></param> /// <param name="e"></param> public void AttackHandler(object o, NumberEventArgs e) { // DEBUG: For now reset the timer and make the menu disappear Console.WriteLine("Attacking with ID {0}", e.ID); // TODO: Reset the timer after the attack animation is finished. // Need to create an attack queue. // Do damage against the enemy //int dmg = BattleEngine.PerformAttack(e.ID, e.Target, false); //BattleEngine.ResetTime(e.ID, false); BattleEngine.PlayerReady[e.ID] = false; battleDirector.CreateAttack(BattleEngine.PlayerPartyList[e.ID], BattleEngine.EnemyPartyList[e.Target]); }
void ReadyHandler(object o, NumberEventArgs e) { OnReady(e.ID); }
/// <summary> /// Handles when a party member is ready /// </summary> /// <param name="sender"></param> /// <param name="e"></param> static void ReadyHandler(object sender, NumberEventArgs e) { // TODO: Generate the menu based on what position the character is // in the party // For now, make it in the first spot PlayerParty.IsReady[e.ID] = true; }
/// <summary> /// Handles when an enemy is ready /// </summary> /// <param name="sender"></param> /// <param name="e"></param> static void EnemyReadyHandler(object sender, NumberEventArgs e) { // TODO: Properly get the enemy to attack a random party member EnemyParty.IsReady[e.ID] = true; }
void OnTime(object o, NumberEventArgs e) { OnTimeSelected(e.ID, e.Target); }
void OnSkill(object o, NumberEventArgs e) { OnSkillSelected(e.ID, e.Target); }
void OnItem(object o, NumberEventArgs e) { OnItemSelected(e.ID, e.Target); }
// All of these just call the event method and invokes this class's // events. void OnAttack(object o, NumberEventArgs e) { characterSelecting = e.ID; // Get a target SelectAvailableTarget(); }
public void ActionDoneHandler(object o, NumberEventArgs e) { }
/// <summary> /// Handles displaying the battle menu when the player is ready /// </summary> /// <param name="o"></param> /// <param name="e"></param> public void ReadyHandler(object o, NumberEventArgs e) { // DEBUG: Check e Console.WriteLine("PlayerID = {0}", e.ID); // Show the menu for this player menuScreen.SetMenuVisible(e.ID, true); }
/// <summary> /// Handles moving the NPCs when ready /// </summary> /// <param name="o"></param> /// <param name="e"></param> void ReadyHandler(object o, NumberEventArgs e) { // Move the specific NPC MoveNPC(e.ID); }