mergemilitary/Assets/MMOModule/Scripts/MMOUIs/MMOUINewTask.cs

46 lines
1.2 KiB
C#
Raw Normal View History

2022-07-04 11:17:39 +00:00
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
using DG.Tweening;
namespace MMO
{
2022-09-09 14:35:49 +00:00
public class MMOUINewTask : MMOUIPop
2022-07-04 11:17:39 +00:00
{
[SerializeField] Text mTxtHead;
[SerializeField] Text mTxtTitle;
[SerializeField] Text mTxtContent;
[SerializeField] Image mImgTaskIcon;
[SerializeField] Button mBtnOK;
protected override void OnInit()
{
base.OnInit();
2022-09-09 14:35:49 +00:00
BindBtn(mBtnOK, PopOut);
2022-07-04 11:17:39 +00:00
}
public void ConfigInfo(string pContent, MMOTaskType pType)
{
if (pType != MMOTaskType.Final)
{
mImgTaskIcon.gameObject.SetActive(true);
mImgTaskIcon.sprite = MMOUtils.LoadTaskIcon(pType);
mTxtHead.text = "New Task";
2022-09-09 14:35:49 +00:00
mTxtTitle.text = "Almost ThereYou have to complete next misson to get the Robux.";
2022-07-04 11:17:39 +00:00
}
else
{
mImgTaskIcon.gameObject.SetActive(false);
mTxtHead.text = "Task Complete";
mTxtTitle.text = "Congratulations!";
}
mTxtContent.text = pContent;
}
}
}