private void ShootTimerFinished(object sender, float e) { if (Boss.Game.GameManager.GetBossBullets().Count < 20) { Boss.TriggerPattern("XmasGift/pattern1", BulletType.Type2, false, Boss.ActionPointPosition()); } }
private void AnimationEventTriggered(string eventName) { if (eventName == "shoot") { Boss.Game.GameManager.MoverManager.TriggerPattern( "XmasBell/pattern4", BulletType.Type2, false, Boss.ActionPointPosition(), Boss.ActionPointDirection() ); } }
public override void Update(GameTime gameTime) { base.Update(gameTime); if (!_targetingPlayer && !Boss.TargetingPosition && Boss.Position().Equals(Boss.InitialPosition)) { _targetingPlayer = true; Boss.CurrentAnimator.Play("NoAnimation"); } else if (_targetingPlayer && !_stretchingOut) { Boss.RotateTo(Boss.GetPlayerDirectionAngle()); if (_stretchingOutTimer >= TimeSpan.Zero) { _stretchingOutTimer -= gameTime.ElapsedGameTime; } else { _stretchingOut = true; Boss.CurrentAnimator.Play("StretchOut"); } } if (Boss.Game.GameManager.IsOutside(Boss.ActionPointPosition())) { Boss.Game.Camera.Shake(0.5f, 50f); Boss.TriggerPattern( "XmasCandy/pattern2", BulletML.BulletType.Type1, false, Boss.ActionPointPosition(), (float)(Boss.ActionPointDirection() + Math.PI) ); ResetStretchOutAttack(); } }
private void ShootTimerFinished(object sender, float e) { // Bullet speed should depends on the boss scale Boss.TriggerPattern("XmasCandy/pattern4", BulletType.Type2, false, Boss.ActionPointPosition()); }
private void ShootTimerFinished(object sender, float e) { Boss.Game.GameManager.MoverManager.TriggerPattern("XmasBell/pattern4", BulletType.Type2, false, Boss.ActionPointPosition(), Boss.ActionPointDirection()); }
private void ShootTimerFinished(object sender, float e) { Boss.TriggerPattern("XmasCandy/pattern1", BulletType.Type2, false, Boss.ActionPointPosition()); }
public override void Update(GameTime gameTime) { base.Update(gameTime); var newPosition = new Vector2( Boss.Game.GameManager.Random.Next( (int)(Boss.Width() / 2f), (int)(Boss.Game.ViewportAdapter.VirtualWidth - (Boss.Width() / 2f)) ), (int)(Boss.Height() / 1.25f) ); Boss.MoveTo(newPosition, 1.5f); if (_bulletFrequence.TotalMilliseconds > 0) { _bulletFrequence -= gameTime.ElapsedGameTime; } else { _bulletFrequence = TimeSpan.FromSeconds(0.5f); Boss.Game.GameManager.MoverManager.TriggerPattern("XmasBell/pattern1", BulletType.Type2, false, Boss.ActionPointPosition()); } }
public override void Update(GameTime gameTime) { base.Update(gameTime); if (Boss.Invincible && Boss.IsOutside) { Boss.Invincible = false; } // Go from a side to another side of the screen if (!Boss.TargetingPosition) { if (Boss.CurrentAnimator.Position.X > GameConfig.VirtualResolution.X + Boss.Width()) { GetNewYRandomPosition(); Boss.Direction.X = -1; } else if (Boss.CurrentAnimator.Position.X < -Boss.Width()) { GetNewYRandomPosition(); Boss.Direction.X = 1; } if (_bulletFrequence.TotalMilliseconds > 0) { _bulletFrequence -= gameTime.ElapsedGameTime; } else { _bulletFrequence = TimeSpan.FromSeconds(0.5f); Boss.Game.GameManager.MoverManager.TriggerPattern("XmasBell/pattern1", BulletType.Type2, false, Boss.ActionPointPosition()); } } }