public ClericBoss() { HitPoints = MaxHitPoints = 5500; RunSpeed = MaxRunSpeed = 1; MainGraphic = new MetaModel { AlphaRef = 254, SkinnedMesh = new SkinnedMeshFromFile("Models/Units/VoodooPriest1.x"), Texture = new TextureConcretizer { TextureDescription = new global::Graphics.Software.Textures.SingleColorTexture( System.Drawing.Color.White) }, World = SkinnedMesh.InitSkinnedMeshFromMaya * Matrix.Scaling(0.1f, 0.1f, 0.1f), IsBillboard = false, CastShadows = global::Graphics.Content.Priority.High, ReceivesShadows = global::Graphics.Content.Priority.High, }; VisibilityLocalBounding = new MetaBoundingBox { Mesh = ((MetaModel)MainGraphic).SkinnedMesh, Transformation = ((MetaModel)MainGraphic).World }; PickingLocalBounding = new Common.Bounding.Chain { Boundings = new object[] { VisibilityLocalBounding, new BoundingMetaMesh { SkinnedMeshInstance = MetaEntityAnimation, Transformation = ((MetaModel)MainGraphic).World } }, Shallow = true }; AddAbility(new ClericRaiseDead()); AddAbility(new IceBreath()); AddAbility(new BossIncinerateApplyBuff()); //AddAbility(new ScourgedEarth()); if (Program.Instance != null) { var sm = Program.Instance.SoundManager; var idleSound = sm.GetSoundResourceGroup(sm.GetSFX(SFX.ClericIdle1), sm.GetSFX(SFX.ClericIdle2), sm.GetSFX(SFX.ClericIdle3)); idle = idleSound.PlayLoopedWithIntervals(5, 15, 3f + (float)Game.Random.NextDouble() * 3.0f, new Sound.PlayArgs { GetPosition = () => { return Position; }, GetVelocity = () => { if (MotionNPC != null) return MotionNPC.Velocity; else return Vector3.Zero; } }); } }
protected override void OnMoved() { base.OnMoved(); if (footStep == null && Running) { var sm = Program.Instance.SoundManager; footStep = sm.GetSFX(Sound.SFX.FootStepsGrass1_3D).Play(new Sound.PlayArgs { Position = Position, Velocity = Vector3.Zero, Looping = true }); } }
protected override void OnKilled(Unit perpetrator, Script script) { base.OnKilled(perpetrator, script); if (idle != null) { idle.Stop(); idle = null; } if (footStep != null) { footStep.Stop(); footStep = null; } }
protected override void OnAddedToScene() { base.OnAddedToScene(); burningSkull = new Client.Game.Map.Effects.ClericBurningSkull(); Scene.Add(burningSkull); if (Program.Instance != null) { var sm = Program.Instance.SoundManager; var idleSound = sm.GetSoundResourceGroup(sm.GetSFX(SFX.ClericIdle1), sm.GetSFX(SFX.ClericIdle2), sm.GetSFX(SFX.ClericIdle3)); idle = idleSound.PlayLoopedWithIntervals(5, 15, 3f + (float)Game.Random.NextDouble() * 3.0f, new Sound.PlayArgs { GetPosition = () => { return Position; }, GetVelocity = () => { if (MotionNPC != null) return MotionNPC.Velocity; else return Vector3.Zero; } }); } }
public override void GameUpdate(float dtime) { base.GameUpdate(dtime); if (!Running && footStep != null) { footStep.Stop(); footStep = null; } }