Пример #1
0
        public override void Initialize()
        {
            particle = Scene.CreateParticleSystem();
            particle.Load(FileName);
            particle.SetGlobalPosition(Position.x, Position.y, Position.z);
            particle.SetGlobalScale(Scale.x, Scale.y, Scale.z);
            particle.Enable(Visible);

            // Register object in Lua.
            ScriptManager.SetGlobal(Name, this);
        }
Пример #2
0
        public override void Initialize()
        {
            particle = Scene.CreateParticleSystem();
            particle.Load(FileName);
            particle.SetGlobalPosition(Position.x, Position.y, Position.z);
            particle.SetGlobalScale(Scale.x, Scale.y, Scale.z);
            particle.Enable(Visible);

            // Register object in Lua.
            ScriptManager.SetGlobal(Name, this);
        }
Пример #3
0
        //[Browsable(false)]
        //public override VECTOR3D Rotation { get; set; }
        public Particle(ICore core, string fileName)
            : base(core)
        {
            this.core = core;
            FileName = fileName;
            Visible = true;
            Name = core.GetName<Particle>();

            TV_3DVECTOR position = Core.Camera.GetFrontPosition(10.0f);
            Position = new VECTOR3D(position.x, position.y, position.z);
            mesh = core.Scene.CreateBillboard(Helpers.GetTextureFromResource(core, Resources.particleBig), position.x, position.y,
                                              position.z, 1.0f, 1.0f);
            mesh.SetAlphaTest(true);

            particle = core.Scene.CreateParticleSystem();
            particle.Load(fileName);
            particle.SetGlobalPosition(Position.X, Position.Y, Position.Z);
            particle.SetGlobalRotation(Rotation.X, Rotation.Y, Rotation.Z);
            particle.SetGlobalScale(Scale.X, Scale.Y, Scale.Z);

            UniqueId = mesh.GetMeshName();
        }
Пример #4
0
        //[Browsable(false)]
        //public override VECTOR3D Rotation { get; set; }

        public Particle(ICore core, string fileName)
            : base(core)
        {
            this.core = core;
            FileName  = fileName;
            Visible   = true;
            Name      = core.GetName <Particle>();

            TV_3DVECTOR position = Core.Camera.GetFrontPosition(10.0f);

            Position = new VECTOR3D(position.x, position.y, position.z);
            mesh     = core.Scene.CreateBillboard(Helpers.GetTextureFromResource(core, Resources.particleBig), position.x, position.y,
                                                  position.z, 1.0f, 1.0f);
            mesh.SetAlphaTest(true);

            particle = core.Scene.CreateParticleSystem();
            particle.Load(fileName);
            particle.SetGlobalPosition(Position.X, Position.Y, Position.Z);
            particle.SetGlobalRotation(Rotation.X, Rotation.Y, Rotation.Z);
            particle.SetGlobalScale(Scale.X, Scale.Y, Scale.Z);

            UniqueId = mesh.GetMeshName();
        }