예제 #1
0
 private void SetupAvailableBountyUI()
 {
     for (int i = 0; i < availableBounties.Count; i++)
     {
         BountyUI newBountyUI = Instantiate(bountyUIPrefab, availableBountySpawn.position, Quaternion.identity, availableBountySpawn).GetComponent <BountyUI>();
         newBountyUI.Setup(availableBounties[i]);
     }
 }
예제 #2
0
    private void SyncActiveBounty(string bountyName, int progress)
    {
        if (activeBounty != null)
        {
            return;
        }

        for (int i = 0; i < availableBounties.Count; i++)
        {
            availableBounties[i].Reset();

            if (availableBounties[i].bountyName == bountyName)
            {
                activeBounty             = availableBounties[i];
                activeBounty.bountyState = Bounty.BountyState.Active;
                activeBounty.progress    = progress;

                BountyUI newBountyUI = Instantiate(bountyUIPrefab, activeBountySpawn.position, Quaternion.identity, activeBountySpawn).GetComponent <BountyUI>();
                newBountyUI.Setup(activeBounty);
            }
        }

        ToggleView();
    }