Ejemplo n.º 1
0
        private void SetWorldTeleporters(LayeredWorld world)
        {
            int    x;
            int    y;
            string target;
            string texture;

            string[] parts;

            for (int i = teleportationIndex + 1; i < lines.Length; i++)
            {
                parts   = lines[i].Split(':', ',');
                texture = parts[0];
                x       = int.Parse(parts[1]);
                y       = int.Parse(parts[2]);
                target  = parts[3];

                Teleporter teleporter = new Teleporter(new Vector2D(x, y), target, texture);
                world.AddTeleporter(teleporter);
            }
        }
Ejemplo n.º 2
0
        private void SetWorldTeleporters(LayeredWorld world)
        {
            int x;
            int y;
            string target;
            string texture;
            string[] parts;

            for (int i = teleportationIndex + 1; i < lines.Length; i++)
            {
                parts = lines[i].Split(':', ',');
                texture = parts[0];
                x = int.Parse(parts[1]);
                y = int.Parse(parts[2]);
                target = parts[3];

                Teleporter teleporter = new Teleporter(new Vector2D(x, y), target, texture);
                world.AddTeleporter(teleporter);
            }
        }