Exemple #1
0
        public void OnNewProc(object source, ref Processus proc)
        {
            Player p;

            if (players.TryGetValue(proc.PlayerId, out p))
            {
                p.NbProc++;
                p.RenderProc();
                p.RefreshPanel();
            }
            else
            {
                throw new MissingMemberException(String.Format("missing player {0}", proc.Id));
            }
        }
Exemple #2
0
        public void OnProcUpdate(object _source, ProcEventArgs e)
        {
            Processus proc;

            if (ProcessusList.TryGetValue(e.Id, out proc))
            {
                proc.Pos = e.Pos;
            }
            else
            {
                proc = new Processus(e.Id, e.PlayerId, e.Pos);
                ProcessusList.Add(e.Id, proc);
                OnNewProc(ref proc);
            }
            // Logger.Log.WriteLine("proc id({0}) pos({1})", e.Id, e.Pos);
        }
Exemple #3
0
 protected virtual void OnNewProc(ref Processus proc) => NewProcEvent?.Invoke(this, ref proc);