private void OnCompleteBounty(BountyRef bounty) { titleText.text = $"Bounty Complete: {bounty.ReferencedBounty.Name}"; bountyInfoText.text = bounty.ReferencedBounty.Info; SetRewardViews(bounty.ReferencedBounty.RewardItems); Show(); }
public void AddBounty(Bounty bounty) { BountyRef bountyRef = bountyList.Add(bounty); if (bountyRef != null) { startBountyEvent.Invoke(bountyRef); } }
public BountyRef Add(Bounty bounty) { Debug.Assert(bounty != null, "Attempting to add null bounty to BountyList"); BountyRef foundBounty = bountyList.Find((b) => b.ReferencedBounty == bounty); if (foundBounty == null) { BountyRef bountyRef = new BountyRef(bounty); bountyList.Add(bountyRef); return(bountyRef); } return(null); }
private void OnKillEntity(EntityKillData killdata) { List <BountyRef> completedBounties = new List <BountyRef>(); for (int index = 0; index < bountyList.Count; ++index) { BountyRef bounty = bountyList.Get(index); if (bounty.ReferencedBounty.TargetEntity == killdata.TargetEntity) { bounty.CurrentProgress++; if (bounty.IsComplete()) { completedBounties.Add(bounty); } } } ProcessCompletedBounties(completedBounties); }
public bool Remove(BountyRef bounty) { return(bountyList.Remove(bounty)); }