コード例 #1
0
        /// <summary>
        /// Method that is called when a pea finishes jumping
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void _source_OnJumpCompleted(JumpEventArgs e)
        {
            if (_activeState != null)
            {
                _activeState.Exit();
            }

            if (!e.Pea.IsAlive)
            {
                return;
            }

            if (e.Pea.IsTrapped)
            {
                _alert = SpriteAlert.GenerateTrap(this.SceneLayer);
            }
            else if (!e.Pea.IsNotHappy)
            {
                _alert = SpriteAlert.GenerateNinja(this.SceneLayer);
            }

            if (_alert != null)
            {
                _alert.Initialize();

                if (this.ContentManager != null)
                {
                    _alert.LoadContent(this.ContentManager);
                }
            }
        }
コード例 #2
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void _source_OnJumpSpotCompleted(object sender, EventArgs e)
        {
            var spot = sender as DataJumpSpot;

            _jumpSpotAlert = SpriteAlert.GenerateCompleted(this.SceneLayer);

            _jumpSpotAlert.Initialize();
            _jumpSpotAlert.LoadContent(this.ContentManager);
        }
コード例 #3
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void _source_OnJumpSpotMarked(object sender, EventArgs e)
        {
            var spot = sender as DataJumpSpot;

            if (_jumpSpotAlert == null)
            {
                _jumpSpotAlert = SpriteAlert.GenerateJumpSpot(this.SceneLayer);

                _jumpSpotAlert.Initialize();
                _jumpSpotAlert.LoadContent(this.ContentManager);
                _jumpSpotAlert.OnFinished += new EventHandler(_jumpSpotAlert_OnFinished);
            }
        }
コード例 #4
0
        /// <summary>
        /// 
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void _source_OnJumpSpotCompleted(object sender, EventArgs e)
        {
            var spot = sender as DataJumpSpot;

            _jumpSpotAlert = SpriteAlert.GenerateCompleted(this.SceneLayer);

            _jumpSpotAlert.Initialize();
            _jumpSpotAlert.LoadContent(this.ContentManager);
        }
コード例 #5
0
        /// <summary>
        /// 
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void _source_OnJumpSpotMarked(object sender, EventArgs e)
        {
            var spot = sender as DataJumpSpot;

            if (_jumpSpotAlert == null)
            {
                _jumpSpotAlert = SpriteAlert.GenerateJumpSpot(this.SceneLayer);

                _jumpSpotAlert.Initialize();
                _jumpSpotAlert.LoadContent(this.ContentManager);
                _jumpSpotAlert.OnFinished += new EventHandler(_jumpSpotAlert_OnFinished);
            }
        }