Esempio n. 1
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. 2
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. 3
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);
        }