コード例 #1
0
ファイル: Death.cs プロジェクト: MattGraffunder/MonoGameTest
        public virtual void StartDying()
        {
            Dying = true;

            _explosion = _explosionFactory.GetExplosion();

            _explosion.Explode();
        }
コード例 #2
0
        public Explosion GetExplosion()
        {
            Animation explosionAnimation = new Animation();
            explosionAnimation.Initialize(_explosionStrip, Vector2.Zero, 133, 134, 12, 30, Color.White, 1f, false);

            SoundEffectInstance explosionSoundInstance = _explosionSound.CreateInstance();
            explosionSoundInstance.Volume = .1f;

            Explosion explosion = new Explosion(explosionAnimation, explosionSoundInstance);

            return explosion;
        }