Beispiel #1
0
        private void SetWorldTeleporters(World 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);
            }
        }
        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);
            }
        }
Beispiel #3
0
        public void AddTeleporter(Teleporter newTeleporter)
        {
            newTeleporter.OnCollision += teleporter_OnTeleportation;

            teleporters.Add(newTeleporter);
        }
Beispiel #4
0
        public void AddTeleporter(Teleporter newTeleporter)
        {
            newTeleporter.OnCollision += teleporter_OnTeleportation;

            teleporters.Add(newTeleporter);
        }