예제 #1
0
        private void Draw(Stance.Id inStance, Expression.Id inExpression, short inFrame, short inExpFrame,
                          DrawArgument args)
        {
            if (Stance.IsClimbing(inStance)) // 判断是否为 爬绳
            {
                Body.Draw(inStance, Body.Layer.Body, inFrame, args);
                _equips.Draw(EquipSlot.Id.Gloves, inStance, Clothing.Layer.Glove, inFrame, args);
                _equips.Draw(EquipSlot.Id.Shoes, inStance, Clothing.Layer.Shoes, inFrame, args);
                _equips.Draw(EquipSlot.Id.Bottom, inStance, Clothing.Layer.Pants, inFrame, args);
                _equips.Draw(EquipSlot.Id.Top, inStance, Clothing.Layer.Top, inFrame, args);
                _equips.Draw(EquipSlot.Id.Top, inStance, Clothing.Layer.Mail, inFrame, args);
                _equips.Draw(EquipSlot.Id.Cape, inStance, Clothing.Layer.Cape, inFrame, args);
                Body.Draw(inStance, Body.Layer.Head, inFrame, args);
                _equips.Draw(EquipSlot.Id.EarAcc, inStance, Clothing.Layer.Earrings, inFrame, args);
                switch (_equips.GetCapType())
                {
                case CharEquips.CapType.None:
                    Hair.Draw(inStance, Hair.Layer.Back, inFrame, args);
                    break;

                case CharEquips.CapType.Headband:
                    _equips.Draw(EquipSlot.Id.Hat, inStance, Clothing.Layer.Cap, inFrame, args);
                    Hair.Draw(inStance, Hair.Layer.Back, inFrame, args);
                    break;

                case CharEquips.CapType.HalfCover:
                    Hair.Draw(inStance, Hair.Layer.BelowCap, inFrame, args);
                    _equips.Draw(EquipSlot.Id.Hat, inStance, Clothing.Layer.Cap, inFrame, args);
                    break;

                case CharEquips.CapType.FullCover:
                    _equips.Draw(EquipSlot.Id.Hat, inStance, Clothing.Layer.Cap, inFrame, args);
                    break;
                }

                _equips.Draw(EquipSlot.Id.Shield, inStance, Clothing.Layer.BackShield, inFrame, args);
                _equips.Draw(EquipSlot.Id.Weapon, inStance, Clothing.Layer.BackWeapon, inFrame, args);
            }
            else
            {
                var faceShift = _drawInfo.GetFacePosition(inStance, inFrame);
                var faceArgs  =
                    args + (faceShift - (args.XScale.Equals(-1f) ? new Vector2(faceShift.X * 2, 0) : new Vector2()));
                Hair.Draw(inStance, Hair.Layer.BelowBody, inFrame, args);
                _equips.Draw(EquipSlot.Id.Cape, inStance, Clothing.Layer.Cape, inFrame, args);
                _equips.Draw(EquipSlot.Id.Shield, inStance, Clothing.Layer.ShieldBelowBody, inFrame, args);
                _equips.Draw(EquipSlot.Id.Weapon, inStance, Clothing.Layer.WeaponBelowBody, inFrame, args);
                _equips.Draw(EquipSlot.Id.Hat, inStance, Clothing.Layer.CapBelowBody, inFrame, args);
                Body.Draw(inStance, Body.Layer.Body, inFrame, args);
                _equips.Draw(EquipSlot.Id.Gloves, inStance, Clothing.Layer.WristOverBody, inFrame, args);
                _equips.Draw(EquipSlot.Id.Gloves, inStance, Clothing.Layer.GloveOverBody, inFrame, args);
                _equips.Draw(EquipSlot.Id.Shoes, inStance, Clothing.Layer.Shoes, inFrame, args);
                Body.Draw(inStance, Body.Layer.ArmBelowHead, inFrame, args);

                if (_equips.HasOverAll)
                {
                    _equips.Draw(EquipSlot.Id.Top, inStance, Clothing.Layer.Mail, inFrame, args);
                }
                else
                {
                    _equips.Draw(EquipSlot.Id.Bottom, inStance, Clothing.Layer.Pants, inFrame, args);
                    _equips.Draw(EquipSlot.Id.Top, inStance, Clothing.Layer.Top, inFrame, args);
                }

                Body.Draw(inStance, Body.Layer.ArmBelowHeadOverMail, inFrame, args);
                Hair.Draw(inStance, Hair.Layer.Default, inFrame, args);
                _equips.Draw(EquipSlot.Id.Shield, inStance, Clothing.Layer.ShieldOverHair, inFrame, args);
                _equips.Draw(EquipSlot.Id.EarAcc, inStance, Clothing.Layer.Earrings, inFrame, args);
                Body.Draw(inStance, Body.Layer.Head, inFrame, args);
                Hair.Draw(inStance, Hair.Layer.Shade, inFrame, args);
                Face.Draw(inExpression, inExpFrame, faceArgs);
                _equips.Draw(EquipSlot.Id.Face, inStance, Clothing.Layer.FaceAcc, 0, faceArgs);
                _equips.Draw(EquipSlot.Id.EyeAcc, inStance, Clothing.Layer.EyeAcc, inFrame, args);
                _equips.Draw(EquipSlot.Id.Shield, inStance, Clothing.Layer.Shield, inFrame, args);
                switch (_equips.GetCapType())
                {
                case CharEquips.CapType.None:
                    Hair.Draw(inStance, Hair.Layer.OverHead, inFrame, args);
                    break;

                case CharEquips.CapType.Headband:
                    _equips.Draw(EquipSlot.Id.Hat, inStance, Clothing.Layer.Cap, inFrame, args);
                    Hair.Draw(inStance, Hair.Layer.Default, inFrame, args);
                    Hair.Draw(inStance, Hair.Layer.OverHead, inFrame, args);
                    _equips.Draw(EquipSlot.Id.Hat, inStance, Clothing.Layer.CapOverHair, inFrame, args);
                    break;

                case CharEquips.CapType.HalfCover:
                    Hair.Draw(inStance, Hair.Layer.Default, inFrame, args);
                    _equips.Draw(EquipSlot.Id.Hat, inStance, Clothing.Layer.Cap, inFrame, args);
                    break;

                case CharEquips.CapType.FullCover:
                    _equips.Draw(EquipSlot.Id.Hat, inStance, Clothing.Layer.Cap, inFrame, args);
                    break;
                }

                _equips.Draw(EquipSlot.Id.Weapon, inStance, Clothing.Layer.WeaponBelowArm, inFrame, args);

                if (inStance == Stance.Id.StabO1)
                {
                    Console.WriteLine();
                }
                if (IsTwoHanded(inStance))
                {
                    _equips.Draw(EquipSlot.Id.Top, inStance, Clothing.Layer.MailArm, inFrame, args);
                    Body.Draw(inStance, Body.Layer.Arm, inFrame, args);
                    Body.Draw(inStance, Body.Layer.ArmOverHair, inFrame, args);
                    Body.Draw(inStance, Body.Layer.ArmOverHairBelowWeapon, inFrame, args);
                    _equips.Draw(EquipSlot.Id.Weapon, inStance, Clothing.Layer.Weapon, inFrame, args);
                }
                else
                {
                    _equips.Draw(EquipSlot.Id.Weapon, inStance, Clothing.Layer.Weapon, inFrame, args);
                    Body.Draw(inStance, Body.Layer.Arm, inFrame, args);
                    Body.Draw(inStance, Body.Layer.ArmOverHair, inFrame, args);
                    Body.Draw(inStance, Body.Layer.ArmOverHairBelowWeapon, inFrame, args);
                    _equips.Draw(EquipSlot.Id.Top, inStance, Clothing.Layer.MailArm, inFrame, args);
                }

                _equips.Draw(EquipSlot.Id.Gloves, inStance, Clothing.Layer.Wrist, inFrame, args);
                _equips.Draw(EquipSlot.Id.Gloves, inStance, Clothing.Layer.Glove, inFrame, args);
                _equips.Draw(EquipSlot.Id.Weapon, inStance, Clothing.Layer.WeaponOverGlove, inFrame, args);

                Body.Draw(inStance, Body.Layer.HandBelowWeapon, inFrame, args);

                _equips.Draw(EquipSlot.Id.Weapon, inStance, Clothing.Layer.WeaponOverHand, inFrame, args);
                _equips.Draw(EquipSlot.Id.Weapon, inStance, Clothing.Layer.WeaponOverBody, inFrame, args);
                Body.Draw(inStance, Body.Layer.HandOverHair, inFrame, args);
                Body.Draw(inStance, Body.Layer.HandOverWeapon, inFrame, args);

                _equips.Draw(EquipSlot.Id.Gloves, inStance, Clothing.Layer.WristOverHair, inFrame, args);
                _equips.Draw(EquipSlot.Id.Gloves, inStance, Clothing.Layer.GloveOverHair, inFrame, args);
            }
        }