コード例 #1
0
        static List<Puntuaciones> GetResortedPuntuaciones(Usuarios user)
        {
            List<Puntuaciones> ret = new List<Puntuaciones>();

            for (int c = 0; c < user.Puntuaciones.Count; c++)
            {
                Puntuaciones curr = user.Puntuaciones[c];

                if (curr.cEvento == "Restart")
                {
                    ret.Add(curr);
                }
                else
                {
                    if (curr.cEvento != "GlobalScore")
                    {
                        ret.Add(curr);

                        if (c != user.Puntuaciones.Count - 1 && curr.nPuntuacion != -1)
                        {
                            Puntuaciones next = user.Puntuaciones[c + 1];
                            if (next.cEvento == "GlobalScore")
                            {
                                ret.Add(next);
                                c++;
                            }
                        }
                    }
                    else
                    {
                        if (c != user.Puntuaciones.Count - 1)
                        {
                            Puntuaciones next = user.Puntuaciones[c + 1];
                            if (next.cEvento != "GlobalScore" && next.cEvento != "Restart")
                            {
                                ret.Add(next);
                                c++;
                            }
                        }
                        ret.Add(curr);
                    }
                }
            }

            Debug.Assert(ret.Count == user.Puntuaciones.Count);

            return ret;
        }
コード例 #2
0
 partial void UpdateUsuarios(Usuarios instance);
コード例 #3
0
 partial void DeleteUsuarios(Usuarios instance);
コード例 #4
0
 partial void InsertUsuarios(Usuarios instance);