missionの羽表示対応
This commit is contained in:
parent
7c864348bc
commit
85b7eee118
|
|
@ -1115,6 +1115,8 @@ MonoBehaviour:
|
||||||
backgroundAnimator: {fileID: 7864277048177254395}
|
backgroundAnimator: {fileID: 7864277048177254395}
|
||||||
normalMissionObject: {fileID: 7864277047117909270}
|
normalMissionObject: {fileID: 7864277047117909270}
|
||||||
dailyMissionObject: {fileID: 7864277046940800487}
|
dailyMissionObject: {fileID: 7864277046940800487}
|
||||||
|
coinObject: {fileID: 7864277046498279117}
|
||||||
|
shopCustomizeCoinObject: {fileID: 6486626702307193939}
|
||||||
closeButton: {fileID: 7864277046190771840}
|
closeButton: {fileID: 7864277046190771840}
|
||||||
coinText: {fileID: 7864277047470455966}
|
coinText: {fileID: 7864277047470455966}
|
||||||
--- !u!1 &7864277047470455960
|
--- !u!1 &7864277047470455960
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load Diff
|
|
@ -631,6 +631,8 @@ MonoBehaviour:
|
||||||
disableObject: {fileID: 1628107520490624917}
|
disableObject: {fileID: 1628107520490624917}
|
||||||
rewardedObject: {fileID: 1628107518883220827}
|
rewardedObject: {fileID: 1628107518883220827}
|
||||||
coinFrame: {fileID: 1628107518996228242}
|
coinFrame: {fileID: 1628107518996228242}
|
||||||
|
coinObject: {fileID: 1628107520038931065}
|
||||||
|
shopCustomizeCoinObject: {fileID: 351682544235989113}
|
||||||
coinText: {fileID: 1628107519630045354}
|
coinText: {fileID: 1628107519630045354}
|
||||||
missionText: {fileID: 1628107520295442136}
|
missionText: {fileID: 1628107520295442136}
|
||||||
progressText: {fileID: 1628107520281042222}
|
progressText: {fileID: 1628107520281042222}
|
||||||
|
|
|
||||||
|
|
@ -1336,6 +1336,8 @@ MonoBehaviour:
|
||||||
disableObject: {fileID: 2812558656100289859}
|
disableObject: {fileID: 2812558656100289859}
|
||||||
rewardedObject: {fileID: 1317476163109784676}
|
rewardedObject: {fileID: 1317476163109784676}
|
||||||
coinFrame: {fileID: 9105416004953858659}
|
coinFrame: {fileID: 9105416004953858659}
|
||||||
|
coinObject: {fileID: 155305349105938002}
|
||||||
|
shopCustomizeCoinObject: {fileID: 534720045508731971}
|
||||||
coinText: {fileID: 1908821625635297698}
|
coinText: {fileID: 1908821625635297698}
|
||||||
missionText: {fileID: 1565904717471002110}
|
missionText: {fileID: 1565904717471002110}
|
||||||
progressText: {fileID: 2579434982158521488}
|
progressText: {fileID: 2579434982158521488}
|
||||||
|
|
|
||||||
|
|
@ -11,6 +11,8 @@ public class MissionCompleteView : MonoBehaviour
|
||||||
[SerializeField] private Animator backgroundAnimator;
|
[SerializeField] private Animator backgroundAnimator;
|
||||||
[SerializeField] private GameObject normalMissionObject;
|
[SerializeField] private GameObject normalMissionObject;
|
||||||
[SerializeField] private GameObject dailyMissionObject;
|
[SerializeField] private GameObject dailyMissionObject;
|
||||||
|
[SerializeField] private GameObject coinObject;
|
||||||
|
[SerializeField] private GameObject shopCustomizeCoinObject;
|
||||||
[SerializeField] private Button closeButton;
|
[SerializeField] private Button closeButton;
|
||||||
[SerializeField] private Text coinText;
|
[SerializeField] private Text coinText;
|
||||||
|
|
||||||
|
|
@ -31,5 +33,7 @@ public class MissionCompleteView : MonoBehaviour
|
||||||
normalMissionObject.SetActive(missionData.Category == MissionCategory.Normal);
|
normalMissionObject.SetActive(missionData.Category == MissionCategory.Normal);
|
||||||
dailyMissionObject.SetActive(missionData.Category == MissionCategory.Daily);
|
dailyMissionObject.SetActive(missionData.Category == MissionCategory.Daily);
|
||||||
coinText.text = missionData.reward.ToString();
|
coinText.text = missionData.reward.ToString();
|
||||||
|
coinObject.SetActive(missionData.RewardType == MissionRewardType.Coin);
|
||||||
|
shopCustomizeCoinObject.SetActive(missionData.RewardType == MissionRewardType.ShopCustomizeCoin);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -11,24 +11,28 @@ public class MissionView : MonoBehaviour
|
||||||
[SerializeField] private GameObject disableObject;
|
[SerializeField] private GameObject disableObject;
|
||||||
[SerializeField] private GameObject rewardedObject;
|
[SerializeField] private GameObject rewardedObject;
|
||||||
[SerializeField] private GameObject coinFrame;
|
[SerializeField] private GameObject coinFrame;
|
||||||
|
[SerializeField] private GameObject coinObject;
|
||||||
|
[SerializeField] private GameObject shopCustomizeCoinObject;
|
||||||
[SerializeField] private Text coinText;
|
[SerializeField] private Text coinText;
|
||||||
[SerializeField] private Text missionText;
|
[SerializeField] private Text missionText;
|
||||||
[SerializeField] private TextMeshProUGUI progressText;
|
[SerializeField] private TextMeshProUGUI progressText;
|
||||||
[SerializeField] private Slider progressBar;
|
[SerializeField] private Slider progressBar;
|
||||||
public IObservable<Unit> RewardButton => rewardButton.OnClickAsObservable().TakeUntilDestroy(this);
|
public IObservable<Unit> RewardButton => rewardButton.OnClickAsObservable().TakeUntilDestroy(this);
|
||||||
|
|
||||||
public void SetData(MissionData missionData, int curentValue, string specialText = null)
|
public void SetData(MissionData missionData, int currentValue, string specialText = null)
|
||||||
{
|
{
|
||||||
coinText.text = missionData.reward.ToString();
|
coinText.text = missionData.reward.ToString();
|
||||||
missionText.text = specialText ?? missionData.Text;
|
missionText.text = specialText ?? missionData.Text;
|
||||||
progressBar.value = Mathf.InverseLerp(0, missionData.count, curentValue);
|
progressBar.value = Mathf.InverseLerp(0, missionData.count, currentValue);
|
||||||
progressText.text = string.Format(progressFormat, curentValue, missionData.count);
|
progressText.text = string.Format(progressFormat, currentValue, missionData.count);
|
||||||
|
coinObject.SetActive(missionData.RewardType == MissionRewardType.Coin);
|
||||||
|
shopCustomizeCoinObject.SetActive(missionData.RewardType == MissionRewardType.ShopCustomizeCoin);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void ChangeProgress(int goalValue, int curentValue)
|
public void ChangeProgress(int goalValue, int currentValue)
|
||||||
{
|
{
|
||||||
progressBar.value = Mathf.InverseLerp(0, goalValue, curentValue);
|
progressBar.value = Mathf.InverseLerp(0, goalValue, currentValue);
|
||||||
progressText.text = string.Format(progressFormat, curentValue, goalValue);
|
progressText.text = string.Format(progressFormat, currentValue, goalValue);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SetButtonActive(bool active)
|
public void SetButtonActive(bool active)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue