37 lines
1.1 KiB
C#
37 lines
1.1 KiB
C#
using PkmnLibSharp.FFI;
|
|
using PkmnLibSharp.Utils;
|
|
using Interface = PkmnLibSharp.FFI.DynamicData.Libraries.MiscLibrary;
|
|
|
|
namespace PkmnLibSharp.DynamicData.Libraries
|
|
{
|
|
/// <summary>
|
|
/// The misc library holds several misc functions required for the battle to run.
|
|
/// </summary>
|
|
public abstract class MiscLibrary : HandleType
|
|
{
|
|
/// <inheritdoc cref="MiscLibrary"/>
|
|
protected MiscLibrary(FFIHandle handle) : base(handle)
|
|
{
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// A gen 7 implementation for the MiscLibrary.
|
|
/// </summary>
|
|
public class Gen7MiscLibrary : MiscLibrary
|
|
{
|
|
/// <inheritdoc cref="Gen7MiscLibrary"/>
|
|
protected Gen7MiscLibrary(FFIHandle handle) : base(handle)
|
|
{
|
|
}
|
|
|
|
/// <summary>
|
|
/// Instantiates a new MiscLibrary.
|
|
/// </summary>
|
|
public static Gen7MiscLibrary Create()
|
|
{
|
|
var handle = Interface.gen_7_misc_library_new();
|
|
return (Gen7MiscLibrary)Resolver.Instance.ResolveMiscLibrary(handle.Resolve());
|
|
}
|
|
}
|
|
} |