Esempio n. 1
0
 private void toolStripButton5_Click(object sender, EventArgs e)
 {
     //将当前选定对象移动到当前激活的图层
     NexusEngine.NActor actor = Program.engine.ActorEd.SelectedActor;
     if (actor != null)
     {
         string name = actor.Name;
         Program.engine.MainLevel.MoveActorToActiveLayer(name);
         OperationTooltip.Text = "对象移动完成";
     }
 }
Esempio n. 2
0
        public override void PostCreateActor(NexusEngine.NActor actor)
        {
            base.PostCreateActor(actor);

            //创建体积雾部件
            actor.CreateComponent("WaterComponent", "nwater_component");

            //创建显示用部件
            NResourceLoc         res      = new NResourceLoc("engine_data", "/editor_res/ball.nmdl");
            NActorComponent      comp     = actor.CreateComponent("WaterSignBoard", "nstatic_editor_mesh_component");
            NStaticMeshComponent meshComp = comp as NStaticMeshComponent;

            meshComp.ResetResource(res);
        }
Esempio n. 3
0
        public override void PostCreateActor(NexusEngine.NActor actor)
        {
            base.PostCreateActor(actor);

            //创建光源部件
            actor.CreateComponent("DirectionalLightComponent", "ndirectional_light_component");

            //创建显示用部件
            NResourceLoc         res      = new NResourceLoc("engine_data", "/editor_res/light.nmdl");
            NActorComponent      comp     = actor.CreateComponent("LightSignBoard", "nstatic_editor_mesh_component");
            NStaticMeshComponent meshComp = comp as NStaticMeshComponent;

            meshComp.ResetResource(res);
        }
Esempio n. 4
0
        public override void PostCreateActor(NexusEngine.NActor actor)
        {
            base.PostCreateActor(actor);

            //创建显示用部件
            NResourceLoc        res  = new NResourceLoc("engine_data", "/resource_default/skydome.nmdl");
            NResourceStaticMesh mesh = NResourceManager.Instance.LoadStaticMesh(res, EResourceIOMode.Auto, EResourceIOPriority.Normal);

            if (mesh == null)
            {
                return;
            }
            actor.Frozen = true;
            NActorComponent comp     = actor.CreateComponent("SkyComponent", "nsky_component");
            NSkyComponent   meshComp = comp as NSkyComponent;

            meshComp.ResetResource(res);
        }