27 lines
763 B
C#
27 lines
763 B
C#
|
using System;
|
||
|
using PkmnLibSharp.Utilities;
|
||
|
|
||
|
namespace PkmnLibSharp.Battling.ChoiceTurn
|
||
|
{
|
||
|
public abstract class BaseTurnChoice : PointerWrapper
|
||
|
{
|
||
|
protected BaseTurnChoice(IntPtr ptr) : base(ptr){}
|
||
|
|
||
|
public TurnChoiceKind Kind => (TurnChoiceKind) Creaturelibbattling.Generated.BaseTurnChoice.GetKind(Ptr);
|
||
|
|
||
|
public Pokemon User
|
||
|
{
|
||
|
get
|
||
|
{
|
||
|
if (_user != null) return _user;
|
||
|
var ptr = Creaturelibbattling.Generated.BaseTurnChoice.GetUser(Ptr);
|
||
|
if (TryResolvePointer(ptr, out _user))
|
||
|
return _user;
|
||
|
_user = new Pokemon(ptr);
|
||
|
return _user;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
private Pokemon _user;
|
||
|
}
|
||
|
}
|