Пример #1
0
        private void spawnObject()
        {
            LBD lbd = ResourceManager.Load <LBD>(PathUtil.Combine(Application.streamingAssetsPath, "original", "STG00",
                                                                  "M000.LBD"));

            var texSetOpts = TextureSetOptions.GetFromLBDPath(
                PathUtil.Combine(Application.streamingAssetsPath, "original", "STG00"),
                Shader.Find("LSDR/ClassicDiffuse"),
                Shader.Find("LSDR/RevampedDiffuse"));
            Material mat = new Material(DreamSystem.GetShader(alpha: false));

            DreamSystem.TextureSetSystem.RegisterMaterial(mat, texSetOpts);
            InteractiveObject.Create(lbd, 0, mat, "Head guy", 1, false, "lua/test.lua");
        }
Пример #2
0
        private void spawnObject()
        {
            if (SpawnedObject != null)
            {
                return;
            }

            var lbdPath    = PathUtil.Combine(Application.streamingAssetsPath, LBDFile);
            LBD lbd        = ResourceManager.Load <LBD>(lbdPath, "scene");
            var texSetOpts = TextureSetOptions.GetFromLBDPath(Path.GetDirectoryName(lbdPath),
                                                              Shader.Find("LSDR/ClassicDiffuse"),
                                                              Shader.Find("LSDR/RevampedDiffuse"));
            Material mat = new Material(DreamSystem.GetShader(alpha: false));

            DreamSystem.TextureSetSystem.RegisterMaterial(mat, texSetOpts);
            SpawnedObject =
                InteractiveObject.Create(lbd, EntityNumber, mat, EntityID, IdleAnimation, PlayIdleAnimation, LuaScript);
            SpawnedObject.transform.position = transform.position;
        }