46 lines
		
	
	
		
			1.2 KiB
		
	
	
	
		
			C#
		
	
	
	
			
		
		
	
	
			46 lines
		
	
	
		
			1.2 KiB
		
	
	
	
		
			C#
		
	
	
	
| 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 There!!You have to complete next misson to get the Robux.";
 | ||
|             }
 | ||
|             else
 | ||
|             {
 | ||
|                 mImgTaskIcon.gameObject.SetActive(false);
 | ||
| 
 | ||
|                 mTxtHead.text = "Task Complete";
 | ||
|                 mTxtTitle.text = "Congratulations!";
 | ||
|             }
 | ||
| 
 | ||
|             mTxtContent.text = pContent;
 | ||
|         }
 | ||
|     }
 | ||
| } |