24 lines
619 B
C#
24 lines
619 B
C#
using System;
|
|
using PkmnLibSharp.Utilities;
|
|
|
|
namespace PkmnLibSharp.Battling
|
|
{
|
|
public class BattleSide : PointerWrapper
|
|
{
|
|
internal BattleSide(IntPtr ptr) : base(ptr){}
|
|
|
|
public byte SideIndex => Creaturelib.Generated.BattleSide.GetSideIndex(Ptr);
|
|
|
|
public byte IndexOf(Pokemon pokemon)
|
|
{
|
|
byte b = 0;
|
|
Creaturelib.Generated.BattleSide.GetCreatureIndex(ref b, Ptr, pokemon.Ptr).Assert();
|
|
return b;
|
|
}
|
|
|
|
protected override void DeletePtr()
|
|
{
|
|
Creaturelib.Generated.BattleSide.Destruct(Ptr);
|
|
}
|
|
}
|
|
} |