Ejemplo n.º 1
0
        protected override void LoadContent(DrawState state, Microsoft.Xna.Framework.Content.ContentManager manager)
        {
            SpriteFont font = manager.Load <SpriteFont>("Arial");

            this.stats.Font = font;
            this.text.Font  = font;

            //load the particle systems
            this.fireParticleSystem.ParticleSystemData  = manager.Load <ParticleSystemData>("Particles/Fire");
            this.smokeParticleSystem.ParticleSystemData = manager.Load <ParticleSystemData>("Particles/Smoke");
            this.burstParticleSystem.ParticleSystemData = manager.Load <ParticleSystemData>("Particles/Burst");

            //set the trigger for the burst effect
            ParticleSystemTrigger trigger = this.burstParticleSystem.GetTriggerByName("burst");

            for (int i = 0; i < this.burstSources.Length; i++)
            {
                this.burstSources[i].SetBurstTrigger(trigger);
            }


            //this will only have effect in DEBUG pc builds
            ParticleSystemHotLoader.Monitor(this.UpdateManager, this.smokeParticleSystem);
            ParticleSystemHotLoader.Monitor(this.UpdateManager, this.fireParticleSystem);
            ParticleSystemHotLoader.Monitor(this.UpdateManager, this.burstParticleSystem);
        }
        public HandController(Camera camera, Scene scene, ContentState state)
        {
            this.camera = camera;

            hand = ObjectComposer.Compose(scene, state)
                .AppendName("hand")
                .AppendMesh("hand")
                .AppendMaterialTextures("hand_map", "hand_map")
                .AppendWorld(Vector3.Zero,Vector3.Zero, Vector3.One * 0.02f)
                .AppendDummyCollider()
                .FinishAndAddToScene();

            int animationIndex = hand.Model.GetAnimationController().AnimationIndex("Take 001");
            hand.Model.GetAnimationController().PlayLoopingAnimation(animationIndex);

            bonesController = new HandAnimator(hand.Model.ModelData);
            hand.BoneModifier = bonesController;

            curseParticles = new ParticleSystem(state.Application.UpdateManager);
            TestScene._instance.AddDrawable(new BillboardParticles3D(curseParticles));
            curseParticles.ParticleSystemData = TestScene._instance.state.Load<ParticleSystemData>("Particles/Spark");
            curseParticlesTriger = curseParticles.GetTriggerByName("burst");

        }
		//called at content load time
		public void SetBurstTrigger(Xen.Ex.Graphics.Content.ParticleSystemTrigger trigger)
		{
			this.burstTrigger = trigger;
		}
Ejemplo n.º 4
0
 //called at content load time
 public void SetBurstTrigger(Xen.Ex.Graphics.Content.ParticleSystemTrigger trigger)
 {
     this.burstTrigger = trigger;
 }