Example #1
0
        private void ui_lbActions_SelectedIndexChanged(object sender, EventArgs e)
        {
            if (pia_action != null)
            {
                pia_action.ErrorMessage -= AddMessage;
                pia_action.AddAction -= AddAction;
                pia_action = null;
                ui_gbParamAction.Dispose();
            }

            pia_action = caListActions.Informations(ui_lbActions.Text);
            pia_action.ErrorMessage += AddMessage;
            pia_action.AddAction += AddAction;

            ui_rtbDescription.Text = pia_action.DESC;
            if (ui_rtbDescription.Text == "")
                ui_rtbDescription.Text = "Aucune description disponible";

            ui_gbParamAction = pia_action.create();

            ui_gbParamAction.Dock = DockStyle.Fill;
            
            ui_pRight.Controls.Add(ui_gbParamAction);
            ui_pRight.Controls.SetChildIndex(ui_gbParamAction, 0);
        }
Example #2
0
        public static UIActionCallback DispatchAction(DUIEntity _owner, Action_Request_Type _type)
        {
            iAction _action = m_ActionSet.GetEntity((int)_type);

            _action.Excute(_owner);
            return(_action.OnFinish);
        }
Example #3
0
 public Elf(string in_name, string in_title, int [] stats, iWeapon in_wep, iArmor in_armor, iAction in_attack, iAction in_block, iAction in_evade)
 {
     name   = in_name;
     title  = in_title;
     race   = "Elf";
     Str    = stats[0];
     Dex    = stats[1] + 2;
     Con    = stats[2];
     Int    = stats[3];
     Wis    = stats[4];
     Cha    = stats[5];
     hp     = 10 + Helper.Helper.Mod(Con);
     weapon = in_wep;
     armor  = in_armor;
     AC     = Helper.Helper.AC(this);
     Attack = in_attack;
     Block  = in_block;
     Evade  = in_evade;
 }
Example #4
0
 public Character()
 {
     name   = "Nameless";
     title  = "";
     race   = "";
     hp     = 0;
     Str    = 0;
     Dex    = 0;
     Con    = 0;
     Int    = 0;
     Wis    = 0;
     Cha    = 0;
     weapon = new Dagger();
     armor  = new Leather();
     AC     = Helper.Helper.AC(this);
     Attack = new Attack();
     Block  = new Block();
     Evade  = new Evade();
 }
Example #5
0
 public AddActionEventArgs(iAction ia) : base()
 {
     ia_action = ia;
 }
 public void Add(iAction action)
 {
     history.Add(action);
 }
Example #7
0
 protected virtual void RaiseAddActionEvent(iAction ia)
 {
     if (AddAction != null)
         AddAction(this, new AddActionEventArgs(ia));
 }
Example #8
0
 private void ui_mFileNew_Click(object sender, EventArgs e)
 {
     ui_tvActions.Nodes[0].Nodes.Clear();
     ui_tvActions.Nodes[0].Text = "Projet inconnu";
     ui_rtbMessages.Clear();
     ui_rtbDescription.Clear();
     ui_lbActions.ClearSelected();
     if (pia_action != null)
     {
         pia_action = null;
         ui_gbParamAction.Dispose();
     }
 }
Example #9
0
 public static void RegistAction(Action_Request_Type _type, iAction _action)
 {
     m_ActionSet.AddEntity((int)_type, _action);
 }