Ejemplo n.º 1
0
        public static void RenderFromProto(World world, IntPoint pos, ProtoWorld proto)
        {
            var manager = world.Manager;

            // get map stream
            int map = 0;

            if (proto.maps != null && proto.maps.Length > 1)
            {
                var rnd = new Random();
                map = rnd.Next(0, proto.maps.Length);
            }
            var ms = new MemoryStream(proto.wmap[map]);

            var sp = new Wmap(manager.Resources.GameData);

            sp.Load(ms, 0);
            sp.ProjectOntoWorld(world, pos);
        }