public bool GetHardpoint(string hp, out HardpointDefinition def, out BoneInstance bone)
        {
            var hardpoint = dfm.GetHardpoints().First(x => x.Hp.Name.Equals(hp, StringComparison.OrdinalIgnoreCase));

            if (Bones.TryGetValue(hardpoint.Part.objectName, out BoneInstance bi))
            {
                def  = hardpoint.Hp;
                bone = bi;
                return(true);
            }
            def  = null;
            bone = null;
            return(false);
        }
Exemplo n.º 2
0
        public override void Draw(ICamera camera, CommandBuffer commands, SystemLighting lights, NebulaRenderer nr)
        {
            Body.Update(camera, TimeSpan.Zero, TimeSpan.Zero);
            var bhps = Body.GetHardpoints().Where((arg) => arg.Hp.Name.ToLowerInvariant() == "hp_head").First();

            Body.DrawBuffer(commands, transform, Lighting.Empty);
            Head.Update(camera, TimeSpan.Zero, TimeSpan.Zero);
            Head.DrawBuffer(commands, bhps.GetTransform(transform), Lighting.Empty);
            var hhps = Head.GetHardpoints().ToArray();

            LeftHand.Update(camera, TimeSpan.Zero, TimeSpan.Zero);
            var lhhps = LeftHand.GetHardpoints().ToArray();

            RightHand.Update(camera, TimeSpan.Zero, TimeSpan.Zero);
            var rhhps = RightHand.GetHardpoints().ToArray();
        }