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"); }
public static void MakeController(Camera camera, Scene currentScene, ContentState state) { instance = new HandController(camera, currentScene, state); }