forked from loodakrawa/SpriterDotNet
-
Notifications
You must be signed in to change notification settings - Fork 0
/
IAssetProvider.cs
52 lines (43 loc) · 1.45 KB
/
IAssetProvider.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
// Copyright (C) The original author or authors
//
// This software may be modified and distributed under the terms
// of the zlib license. See the LICENSE file for details.
using System.Collections.Generic;
namespace SpriterDotNet
{
public interface IAssetProvider<T>
{
/// <summary>
/// The current character map. If set to null, the default is used.
/// </summary>
SpriterCharacterMap CharacterMap { get; }
/// <summary>
/// Gets the asset associated for the given folderId and fileId.
/// </summary>
T Get(int folderId, int fileId);
/// <summary>
/// Gets the mapped ids for the given folderId and fileId.
/// </summary>
KeyValuePair<int, int> GetMapping(int folderId, int fileId);
// <summary>
/// Associates the asset with the given folderId and fileId.
/// </summary>
void Set(int folderId, int fileId, T asset);
/// <summary>
/// Swaps one asset with another.
/// </summary>
void Swap(T original, T replacement);
/// <summary>
/// Removes a asset swap.
/// </summary>
void Unswap(T original);
/// <summary>
/// Applies the provided character map.
/// </summary>
void PushCharMap(SpriterCharacterMap charMap);
/// <summary>
/// Removes the top character map.
/// </summary>
void PopCharMap();
}
}