コード例 #1
0
        public void AddSpriteSheet(string key, Texture2D texture, int frameWidth, int frameHeight)
        {
            if (sheets.ContainsKey(key))
                sheets.Remove(key);

            var sheet = new SpriteSheet(texture, frameWidth, frameHeight);
            sheets.Add(key, sheet);
        }
コード例 #2
0
        public void AddSpriteSheet(string key, string textureAssetName, int frameWidth, int frameHeight)
        {
            var content = Io2GameLibGame.Instance.Content;
            var sheet = new SpriteSheet(content.Load<Texture2D>(textureAssetName), frameWidth, frameHeight);

            if (sheets.ContainsKey(key))
                sheets.Remove(key);

            sheets.Add(key, sheet);
        }