public Reward GetLastGivenReward() { int idx = RewardStorage.GetLastSeqIdxGiven(mID); if (idx < 0) { return(null); } return(Rewards[idx]); }
protected override bool giveInner() { int idx = RewardStorage.GetLastSeqIdxGiven(mID); if (idx >= Rewards.Count) { return(false); // all rewards in the sequence were given } RewardStorage.SetLastSeqIdxGiven(mID, ++idx); return(true); }
protected override bool takeInner() { int idx = RewardStorage.GetLastSeqIdxGiven(mID); if (idx <= 0) { return(false); // all rewards in the sequence were taken } RewardStorage.SetLastSeqIdxGiven(mID, --idx); return(true); }
public bool HasMoreToGive() { return(RewardStorage.GetLastSeqIdxGiven(mID) < Rewards.Count); }