Example #1
0
        /// <summary>
        /// Sets the data for PlayerData, LevelSet, etc..
        /// </summary>
        private void InitializeGame(int nivel)
        {
            level = (Level)levelSet[nivel - 1];

            // Draw the level on the screen
            DrawLevel();
        }
Example #2
0
        static void Main()
        {
            Console.WriteLine("CLIENTE DE SOKOBANURJC");

            // Recuperar tabla de nombres remota:
            RemotingConfiguration.RegisterWellKnownClientType(typeof(SokobanURJC.TablaNombres), "http://localhost:1232/TablaNombres.remoto");
            TablaNombres tablaNombres = (TablaNombres)Activator.GetObject(typeof(SokobanURJC.TablaNombres), "http://localhost:1232/TablaNombres.remoto");

            int puertoLogica = tablaNombres.puertoLogica;
            int puertoNiveles = tablaNombres.puertoNiveles;

            RemotingConfiguration.RegisterWellKnownClientType(typeof(SokobanURJC.Level), "http" + "://localhost:" + puertoLogica + "/Level.remoto");
            RemotingConfiguration.RegisterWellKnownClientType(typeof(SokobanURJC.LevelSet), "http" + "://localhost:" + puertoLogica + "/LevelSet.remoto");
            RemotingConfiguration.RegisterWellKnownClientType(typeof(SokobanURJC.ColeccionNiveles), "http" + "://localhost:" + puertoNiveles + "/ColeccionNiveles.remoto");

            levelSet = (LevelSet)Activator.GetObject(typeof(LevelSet), "http" + "://localhost:" + puertoLogica + "/LevelSet.remoto");
            level = (Level)Activator.GetObject(typeof(Level), "http" + "://localhost:" + puertoLogica + "/Level.remoto");
            coleccionNiveles = (ColeccionNiveles)Activator.GetObject(typeof(SokobanURJC.ColeccionNiveles), "http" + "://localhost:" + puertoNiveles + "/ColeccionNiveles.remoto");

            // Lanzar juego:
            Application.Run(new Board());
        }