Пример #1
0
        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();
            }
        }
Пример #2
0
 private void AnimationEventTriggered(string eventName)
 {
     if (eventName == "shoot")
     {
         Boss.Game.GameManager.MoverManager.TriggerPattern(
             "XmasBell/pattern4", BulletType.Type2, false, Boss.ActionPointPosition(), Boss.ActionPointDirection()
             );
     }
 }
Пример #3
0
 private void ShootTimerFinished(object sender, float e)
 {
     Boss.Game.GameManager.MoverManager.TriggerPattern("XmasBell/pattern4", BulletType.Type2, false, Boss.ActionPointPosition(), Boss.ActionPointDirection());
 }