#region File Description //----------------------------------------------------------------------------- // GameResourceAnimation.cs // // Microsoft XNA Community Game Platform // Copyright (C) Microsoft Corporation. All rights reserved. //----------------------------------------------------------------------------- #endregion #region Using Statements using System; using System.Collections.Generic; using System.Text; using Microsoft.Xna.Framework; using RobotGameData.GameObject; #endregion namespace RobotGameData.Resource { /// /// a resource element structure with AnimationSequence class. /// When an animation(.Animation) file is loaded from the resource manager, /// it gets stored here. /// public class GameResourceAnimation : GameResourceBase { #region Fields AnimationSequence animationSequence = null; #endregion #region Properties public AnimationSequence Animation { get { return animationSequence; } } #endregion /// /// Constructor. /// /// key name /// asset name /// animation resource public GameResourceAnimation(string key, string assetName, AnimationSequence resource) : base(key, assetName) { this.animationSequence = resource; this.resource = (object)this.animationSequence; } protected override void Dispose(bool disposing) { if (disposing) { if (animationSequence != null) { animationSequence = null; } } base.Dispose(disposing); } } }