Beispiel #1
0
        /// <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]);
        }
Beispiel #2
0
 void ReadyHandler(object o, NumberEventArgs e)
 {
     OnReady(e.ID);
 }
Beispiel #3
0
 /// <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;
 }
Beispiel #4
0
 /// <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();
        }
Beispiel #9
0
 public void ActionDoneHandler(object o, NumberEventArgs e)
 {
 }
Beispiel #10
0
        /// <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);
        }
Beispiel #11
0
 /// <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);
 }