コード例 #1
0
        public static void Release()
        {
            if (_cursorGraphic != null)
            {
                _cursorGraphic.Dispose();
            }

            if (_smallTTFont != null)
            {
                _smallTTFont.Dispose();
            }
            if (_middleTTFont != null)
            {
                _middleTTFont.Dispose();
            }
            if (_largeTTFont != null)
            {
                _largeTTFont.Dispose();
            }

            if (_smallPFont != null)
            {
                _smallPFont.Dispose();
            }
            if (_middlePFont != null)
            {
                _middlePFont.Dispose();
            }
            if (_largePFont != null)
            {
                _largePFont.Dispose();
            }

            if (_soundOK != null)
            {
                _soundOK.Dispose();
            }
            if (_soundCancel != null)
            {
                _soundCancel.Dispose();
            }
            if (_soundExplosion != null)
            {
                foreach (Sound s in _soundExplosion.Values)
                {
                    s.Dispose();
                }
            }

            foreach (KeyValuePair <Color, AnimatedSprite> kv in _coloredCursors)
            {
                kv.Value.Dispose();
            }
        }
コード例 #2
0
ファイル: Sprite2D.cs プロジェクト: victorvalentin/tgc-viewer
 public override void Dispose()
 {
     sprite.Dispose();
     animatedSprite.Dispose();
     box.Dispose();
 }