Exemplo n.º 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]);
        }
Exemplo n.º 2
0
 void ReadyHandler(object o, NumberEventArgs e)
 {
     OnReady(e.ID);
 }
Exemplo n.º 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;
 }
Exemplo n.º 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;
 }
Exemplo n.º 5
0
 void OnTime(object o, NumberEventArgs e)
 {
     OnTimeSelected(e.ID, e.Target);
 }
Exemplo n.º 6
0
 void OnSkill(object o, NumberEventArgs e)
 {
     OnSkillSelected(e.ID, e.Target);
 }
Exemplo n.º 7
0
 void OnItem(object o, NumberEventArgs e)
 {
     OnItemSelected(e.ID, e.Target);
 }
Exemplo n.º 8
0
        // 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();
        }
Exemplo n.º 9
0
 public void ActionDoneHandler(object o, NumberEventArgs e)
 {
 }
Exemplo n.º 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);
        }
Exemplo n.º 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);
 }