Beispiel #1
0
        protected override void WriteDataXML(XElement ele, ElderScrollsPlugin master)
        {
            XElement subEle;

            ele.TryPathTo("CreatureType", true, out subEle);
            subEle.Value = CreatureType.ToString();

            ele.TryPathTo("Skill/Combat", true, out subEle);
            subEle.Value = CombatSkill.ToString();

            ele.TryPathTo("Skill/Magic", true, out subEle);
            subEle.Value = MagicSkill.ToString();

            ele.TryPathTo("Skill/Stealth", true, out subEle);
            subEle.Value = StealthSkill.ToString();

            ele.TryPathTo("Health", true, out subEle);
            subEle.Value = Health.ToString();

            WriteUnusedXML(ele, master);

            ele.TryPathTo("Damage", true, out subEle);
            subEle.Value = Damage.ToString();

            ele.TryPathTo("Strength", true, out subEle);
            subEle.Value = Strength.ToString();

            ele.TryPathTo("Perception", true, out subEle);
            subEle.Value = Perception.ToString();

            ele.TryPathTo("Endurance", true, out subEle);
            subEle.Value = Endurance.ToString();

            ele.TryPathTo("Charisma", true, out subEle);
            subEle.Value = Charisma.ToString();

            ele.TryPathTo("Intelligence", true, out subEle);
            subEle.Value = Intelligence.ToString();

            ele.TryPathTo("Agility", true, out subEle);
            subEle.Value = Agility.ToString();

            ele.TryPathTo("Luck", true, out subEle);
            subEle.Value = Luck.ToString();
        }
Beispiel #2
0
        public void FixedUpdate()
        {
            if (!mInitialized)
            {
                return;
            }

            if (player.IsSprinting)
            {
                mFootstepInterval = FootStepIntervalSprint;
            }
            else if (player.Surroundings.IsOutside)
            {
                mFootstepInterval = FootStepIntervalWalk;
            }
            else
            {
                mFootstepInterval = FootstepIntervalWalkInterior;
            }

            AudibleVolume = 1.0f * VolumeMovementMultiplier;                                    //crouching
            AudibleRange  = Globals.MaxAudibleRange;
            IsAudible     = true;
            for (int i = 0; i < Skills.Get.SkillsInUse.Count; i++)
            {
                StealthSkill stealthSkill = Skills.Get.SkillsInUse[i] as StealthSkill;
                if (stealthSkill != null)
                {
                    AudibleVolume *= stealthSkill.AudibleVolumeMultiplier;
                    AudibleRange  *= stealthSkill.AudibleRangeMultiplier;
                    IsAudible     &= stealthSkill.UserIsAudible;
                }
            }
            AudibleVolume = Mathf.Clamp01(AudibleVolume);

            if (WorldClock.AdjustedRealTime >= mNextFootStepTime || WorldClock.AdjustedRealTime >= mNextLandTime)
            {
                switch (Player.Local.Surroundings.State.GroundBeneathPlayer)
                {
                case GroundType.Dirt:
                    mFootstepType = MasterAudio.SoundType.FootstepDirt;
                    mJumpLandType = MasterAudio.SoundType.JumpLandDirt;
                    break;

                case GroundType.Leaves:
                    mFootstepType = MasterAudio.SoundType.FootstepLeaves;
                    mJumpLandType = MasterAudio.SoundType.JumpLandLeaves;
                    break;

                case GroundType.Wood:
                    mFootstepType = MasterAudio.SoundType.FootstepWood;
                    mJumpLandType = MasterAudio.SoundType.JumpLandWood;
                    break;

                case GroundType.Water:
                    mFootstepType = MasterAudio.SoundType.FootstepWater;
                    mJumpLandType = MasterAudio.SoundType.JumpLandWater;
                    break;

                case GroundType.Stone:
                    mFootstepType = MasterAudio.SoundType.FootstepStone;
                    mJumpLandType = MasterAudio.SoundType.JumpLandStone;
                    break;

                default:
                    mFootstepType = MasterAudio.SoundType.FootstepDirt;
                    mJumpLandType = MasterAudio.SoundType.JumpLandDirt;
                    break;
                }
            }
        }