Ejemplo n.º 1
0
        /// <summary>
        ///     玉の破壊時のパーティクルを表示する.
        /// </summary>
        /// <param name="orig">発火の起点となった玉</param>
        /// <param name="destroyed">破壊された玉</param>
        private void SpawnBallDestroyParticles(Ball orig, List <Point> destroyed)
        {
            foreach (var ball in destroyed.Select(p => GetBall(p.X, p.Y)))
            {
                _entityManager.Add(new BallParticle(SpriteBatch, Camera, GameMain, this, ball));
            }
            var cross = new CrossParticle(SpriteBatch, Camera, GameMain, this)
            {
                X = orig.X,
                Y = orig.Y
            };

            cross.LoadContent();
            _entityManager.Add(cross);
        }
Ejemplo n.º 2
0
        public PersistentField(float px, float py, GameConfig gameConfig, AiLogger aiLogger,
                               GameMain gameMain, SpriteBatch spriteBatch, Camera camera, MonoGameControl gameControl,
                               ReplayPlayerData replayPlayerData)
            : base(
                px, py, gameConfig, aiLogger, gameMain, spriteBatch, camera, gameControl,
                replayPlayerData)
        {
            _crossParticle = new CrossParticle(SpriteBatch, Camera, GameMain, this)
            {
                IsPersistent = true
            };
            _crossParticle.LoadContent();

            _turnCaches.Add(new TurnCache(this));
            _replayPlayerData = replayPlayerData;
        }