Exemplo n.º 1
0
 public Weapon(string modelName, Body body, Transform transform, Scene scene)
 {
     this.ignorePred = new IgnoreSkinPredicate(body);
     this.scene = scene;
     this.fpsModel = new ViewModel(modelName);
     fpsModel.SetTransform(transform);
     Matrix weaponTransform = Matrix.CreateScale(0.1f) * Matrix.CreateRotationX(-MathHelper.PiOver2) * Matrix.CreateRotationY(MathHelper.PiOver2);
     fpsModel.SetCustomMatrix(weaponTransform);
     fpsModel.GetAnimationLayer().SetActiveAnimation("Pistol_Idle", true);//.SetAnimationLayer("Pistol_Idle", 1);
 }
Exemplo n.º 2
0
        public Raptor(DinosaurDatablock datablock)
        {
            this.datablock = datablock;
            model = new ViewModel(datablock.MeshName);
            model.GetAnimationLayer().SetActiveAnimation(datablock.GetAnimation(DinosaurAnimationsSimple.Idle), true);

            grounding.SetScale(datablock.Scale);
            grounding.SetRotation(datablock.Rotation);
            grounding.SetPosition(datablock.Position);

            model.SetCustomMatrix(grounding.GetTransform());
            team = datablock.Team;
        }
Exemplo n.º 3
0
 public Weapon(string datablockName, Body body, Transform transform, Scene scene)
 {
     this.ignorePred = new IgnoreSkinPredicate(body);
     this.scene = scene;
     this.datablock = ResourceManager.Inst.GetWeaponDatablock(datablockName);
     this.fpsModel = new ViewModel(datablock.MeshName);
     this.fpsModel.SetRenderAlways(true, scene);
     this.ammo = datablock.AmmoPerClip;
     this.ReserveAmmo = datablock.DefaultAmmo;
     fpsModel.SetTransform(transform);
     fpsModel.SetCustomMatrix(datablock.CustomMatrix);
     fpsModel.GetAnimationLayer().SetActiveAnimation(datablock.GetAnimation(WeaponAnimations.Idle), true);
 }
Exemplo n.º 4
0
 /*
 public AnimationLayer(string name, ViewModel model, float weight)
 {
     this.name = name;
     this.Weight = weight;
     this.activeAnimation = ResourceManager.Inst.GetAnimation(name);
     this.model = model;
     InitializeFrames();
 }*/
 public AnimationLayer(ViewModel model)
 {
     this.model = model;
 }
Exemplo n.º 5
0
 public AnimatedModel(string name)
 {
     Model = new ViewModel(name);
 }