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

46 lines
1.2 KiB
C#
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

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