コード例 #1
0
        public void UpdateConfigCollision()
        {
            try
            {
                if (CollisionMaskA != null)
                {
                    CollisionMaskA.Dispose();
                }
                if (CollisionMaskB != null)
                {
                    CollisionMaskB.Dispose();
                }
                if (CollectiveImage != null)
                {
                    CollectiveImage.Dispose();
                }

                CollisionMaskA  = new Classes.Rendering.GIF(DrawCollisionMaskA());
                CollisionMaskB  = new Classes.Rendering.GIF(DrawCollisionMaskB());
                CollectiveImage = new Classes.Rendering.GIF(CreateCollectiveImage());
            }
            catch (Exception ex)
            {
                throw new Events.TileConfigException("Unable to load Tileconfig.bin!" + Environment.NewLine + "Full Exception Details: " + ex.Message);
            }
        }
コード例 #2
0
 public void Dispose()
 {
     if (BaseImage != null)
     {
         BaseImage.Dispose();
     }
     if (IDImage != null)
     {
         IDImage.Dispose();
     }
     if (CollisionMaskA != null)
     {
         CollisionMaskA.Dispose();
     }
     if (CollisionMaskB != null)
     {
         CollisionMaskB.Dispose();
     }
     if (InternalImage != null)
     {
         InternalImage.Dispose();
     }
     if (CollectiveImage != null)
     {
         CollectiveImage.Dispose();
     }
 }