private void Start()
        {
            WzFileManager wzfm = WzFileManager.instance;

            WzDirectory wzd = wzfm.GetWzDir("Sound");

            var s = wzd["Bgm00.img"] as WzImage;

            s.ParseImage();
            var sound = s["FloralLife"] as WzSoundProperty;

            AudioClip clip = UWL.NAudioPlayer.FromMp3Data(sound.name, sound.GetBytes(false));

            audioSource.clip = clip;
            audioSource.Play();
        }
示例#2
0
        private void Start()
        {
            WzFileManager wzfm = WzFileManager.instance;

            WzDirectory wzd = wzfm.GetWzDir("Map");

            //foreach (WzImage img in wzd.WzImages) print(img.name);
            //foreach (WzDirectory img in wzd.WzDirectories) print(img.name);

            var s      = wzd["Worldmap"]["WorldMap00.img"] as WzImage;
            var sub    = s["BaseImg"] as WzSubProperty;
            var bitmap = sub["0"].GetBitmap();

            var bts    = Util.ImageToByteArray(bitmap);
            var sprite = JCS_ImageLoader.Create(bts);

            sp.sprite = sprite;

            //print(bitmap.Width);
            //print(bitmap.Height);
            //print(s["BaseImg"]["0"]["origin"]);
            //print(s["BaseImg"]["0"]["z"]);
        }