Esempio n. 1
0
 public static void AddMessage(Message msg)
 {
     if (MessageHandler.messages.Count >= MessageHandler.max_messages)
     {
         MessageHandler.messages.RemoveAt(0);
     }
     MessageHandler.messages.Add(msg);
 }
Esempio n. 2
0
        private void HandleInput(Message m)
        {
            PlayerCharacter pc = Party.party_list[actor_index];
            bool clear_messages = true;
            if (m.type == STANDARD_ACTION)
            {
                switch (m.index)
                {
                case STANDARD_ATTACK:
                    selected_ability = ATTACK_INDEX;
                    waiting_ability = false;
                    waiting_target = true;
                    break;
                case STANDARD_ABILITY:
                    if (open_ability_menu)
                    {
                        CleanUpAbilityButtons();
                        open_ability_menu = false;
                    }
                    else
                    {
                        CreateAbilityButtons();
                        open_ability_menu = true;
                    }
                    waiting_ability = true;
                    waiting_target = false;
                    break;

                case STANDARD_DEFEND:
                    selected_ability = DEFEND_INDEX;
                    waiting_ability = false;
                    waiting_target = false;
                    break;
                }
            }
            else if (m.type == ABILITY_ACTION)
            {

            }
            else if (m.type == TARGET_PLAYER)
            {
                target_player_bool = true;
                target_index = m.index;
                waiting_target = false;
            }
            else if (m.type == TARGET_MONSTER)
            {
                target_player_bool = false;
                target_index = m.index;
                waiting_target = false;
            }
        }