private void Btn_Refresh_Click(object sender, MouseButtonEventArgs e)
        {
            var noinfo = CompileCode(EngineNS.EPlatformType.PLATFORM_WIN, true);

            CurrentParticleResourceInfo.NeedRefresh = true;
            var test = CurrentResourceInfo.Save();
        }
Ejemplo n.º 2
0
        async Task Save()
        {
            await CurrentResourceInfo.Save();

            if (CommonVisible == Visibility.Visible)
            {
                Macross_Common.Save();
            }
            if (ClientVisible == Visibility.Visible)
            {
                Macross_Client.Save();
            }
            if (ServerVisible == Visibility.Visible)
            {
                Macross_Server.Save();
            }

            CurrentResourceInfo.CustomFunctions_Client.Clear();
            Macross_Client.CollectFuncDatas(CurrentResourceInfo.CustomFunctions_Client);
            CurrentResourceInfo.CustomFunctions_Server.Clear();
            Macross_Server.CollectFuncDatas(CurrentResourceInfo.CustomFunctions_Server);
            await CurrentResourceInfo.Save();

            await CompileCode(EngineNS.EPlatformType.PLATFORM_DROID);
            await CompileCode(EngineNS.EPlatformType.PLATFORM_WIN);
        }
Ejemplo n.º 3
0
        async Task Save()
        {
            CurrentResourceInfo.ReferenceRNameList.Clear();
            if (ClientVisible == Visibility.Visible)
            {
                Macross_Client.Save();
            }
            if (ServerVisible == Visibility.Visible)
            {
                Macross_Server.Save();
            }

            var className     = Program.GetClassName(CurrentResourceInfo, ECSType.Client);
            var classFullName = Program.GetClassNamespace(CurrentResourceInfo, ECSType.Client) + "." + className;

            WPG.Data.PropertyCollection.RemoveCache(EngineNS.CEngine.Instance.MacrossDataManager.MacrossScripAssembly.GetType(classFullName));

            CurrentResourceInfo.CustomFunctions_Client.Clear();
            Macross_Client.CollectFuncDatas(CurrentResourceInfo.CustomFunctions_Client);
            CurrentResourceInfo.CustomFunctions_Server.Clear();
            Macross_Server.CollectFuncDatas(CurrentResourceInfo.CustomFunctions_Server);
            //await CurrentResourceInfo.Save();

            //await CompileCode(EngineNS.EPlatformType.PLATFORM_DROID);
            await CompileCode(EngineNS.EPlatformType.PLATFORM_WIN);

            List <RName> rnames = new List <RName>();

            if (ClientVisible == Visibility.Visible)
            {
                await mCodeGenerator.CollectMacrossResource(Macross_Client, rnames);
            }
            if (ServerVisible == Visibility.Visible)
            {
                await mCodeGenerator.CollectMacrossResource(Macross_Server, rnames);
            }

            CurrentResourceInfo.ReferenceRNameList.AddRange(rnames);
            await CurrentResourceInfo.Save();
        }
        async Task Save()
        {
            //CurrentResourceInfo.ReferenceRNameList.Clear();
            //Particle_Client.Save();

            //CurrentResourceInfo.CustomFunctions_Client.Clear();
            //Particle_Client.CollectFuncDatas(CurrentResourceInfo.CustomFunctions_Client);

            ////await CompileCode(EngineNS.EPlatformType.PLATFORM_DROID);
            //await CompileCode(EngineNS.EPlatformType.PLATFORM_WIN);

            //List<RName> rnames = new List<RName>();
            //await mCodeGenerator.GenerateMacrossResource(Particle_Client, rnames);


            //foreach (var rname in rnames)
            //{
            //    CurrentResourceInfo.ReferenceRNameList.Add(rname);
            //}
            //await CurrentResourceInfo.Save();



            CurrentResourceInfo.ReferenceRNameList.Clear();
            Particle_Client.Save();

            var className     = Program.GetClassName(CurrentResourceInfo, ECSType.Client);
            var classFullName = Program.GetClassNamespace(CurrentResourceInfo, ECSType.Client) + "." + className;

            WPG.Data.PropertyCollection.RemoveCache(EngineNS.CEngine.Instance.MacrossDataManager.MacrossScripAssembly.GetType(classFullName));

            CurrentResourceInfo.CustomFunctions_Client.Clear();
            Particle_Client.CollectFuncDatas(CurrentResourceInfo.CustomFunctions_Client);

            //await CompileCode(EngineNS.EPlatformType.PLATFORM_DROID);
            await CompileCode(EngineNS.EPlatformType.PLATFORM_WIN);

            List <RName> rnames = new List <RName>();
            await mCodeGenerator.CollectMacrossResource(Particle_Client, rnames);

            foreach (var rname in rnames)
            {
                CurrentResourceInfo.ReferenceRNameList.Add(rname);
            }

            await CurrentResourceInfo.Save();

            var IsShowFloor  = Particle_Client.SceneControl.IsShowFloor;
            var IsShowSkyBox = Particle_Client.SceneControl.IsShowSkyBox;

            Particle_Client.SceneControl.IsShowFloor  = false;
            Particle_Client.SceneControl.IsShowSkyBox = false;

            var snapShotFile = CurrentResourceInfo.ResourceName.Address + EditorCommon.Program.SnapshotExt;
            var data         = new EngineNS.Support.CBlobObject[1];

            data[0] = new EngineNS.Support.CBlobObject();
            var rc = EngineNS.CEngine.Instance.RenderContext;

            Particle_Client.SceneControl.ViewPort.RPolicy.mCopyPostprocessPass.mScreenView.FrameBuffer.GetSRV_RenderTarget(0).Save2Memory(rc, data[0], EngineNS.EIMAGE_FILE_FORMAT.PNG);
            EngineNS.CShaderResourceView.SaveSnap(snapShotFile, data);

            Particle_Client.SceneControl.IsShowFloor  = IsShowFloor;
            Particle_Client.SceneControl.IsShowSkyBox = IsShowSkyBox;
        }