- Turned multi job reward button click into a whole new content - Rift raids open up on multijob completion, allowing players to dive deep and take action into the rifts themselves
36 lines
983 B
C#
36 lines
983 B
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using TMPro;
|
|
using UnityEngine;
|
|
|
|
public class JobCompletedInfo : MonoBehaviour
|
|
{
|
|
[SerializeField] private GameObject infograph;
|
|
[SerializeField] private TMP_Text exp;
|
|
[SerializeField] private TMP_Text coin;
|
|
[SerializeField] private TMP_Text rep;
|
|
|
|
[SerializeField] private GameEventListener_JobInstance onJobCompleted;
|
|
|
|
private void Awake()
|
|
{
|
|
onJobCompleted.Response.AddListener(ShowRewards);
|
|
infograph.SetActive(false);
|
|
}
|
|
public void ShowRewards(JobInstance instance)
|
|
{
|
|
exp.text = instance.experienceReward.ToString("F0");
|
|
coin.text = instance.coinReward.ToString("F0");
|
|
rep.text = instance.reputationReward.ToString("F0");
|
|
|
|
StartCoroutine(SelfDestruct());
|
|
}
|
|
|
|
private IEnumerator SelfDestruct()
|
|
{
|
|
infograph.SetActive(true);
|
|
yield return new WaitForSeconds(2.5f);
|
|
infograph.SetActive(false);
|
|
}
|
|
}
|