PkmnLibSharp/PkmnLibSharp/Battling/Battle/BattleSide.cs

24 lines
619 B
C#
Raw Normal View History

using System;
2020-07-26 12:47:56 +00:00
using PkmnLibSharp.Utilities;
namespace PkmnLibSharp.Battling
{
public class BattleSide : PointerWrapper
{
internal BattleSide(IntPtr ptr) : base(ptr){}
2020-08-11 19:48:41 +00:00
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;
}
2020-07-26 12:47:56 +00:00
protected override void DeletePtr()
{
Creaturelib.Generated.BattleSide.Destruct(Ptr);
2020-07-26 12:47:56 +00:00
}
}
}