
本文共 2728 字,大约阅读时间需要 9 分钟。
���������������������������������������������������������������������������������������������������
���������������������������
������������������������������������Resources
������������������������������������������������������������������������������������������������������������������Textures
������������������������������������������LogOn
������������������Textures/LogOn
������������������������������
���������
������������������
������UI������������
���������������������������������������������������UGUI
������������������������.<CR>
���������
���������Inspector
������UIImage
������������������TipImgName
���TipImgPwd
���
������������������
���������������������������������View_LogonInfo.cs
������������������������������������������������������������
using UnityEngine.UI;public class View_LogonInfo : MonoBehaviour { public Image tipImgName; public Image tipImgPwd; private string iconCorrect = "������"; private string iconError = "������"; void Start() { //������������������ tipImgName.SetActive(false); tipImgPwd.SetActive(false); } public void BtnLogon() { if (ValidateLogon()) { ShowCorrect Icons(); Debug.Log("������������"); } else { ShowError Icons(); Debug.Log("������������"); } } private bool ValidateLogon() { // ������������������������ return true; // ������ } private void ShowCorrectIcons() { DisplayIcon(tipImgName, iconCorrect); DisplayIcon(tipImgPwd, iconCorrect); } private void ShowErrorIcons() { DisplayIcon(tipImgName, iconError); DisplayIcon(tipImgPwd, iconError); } private void DisplayIcon(Image img, string iconType) { Resources.Load("Textures/LogOn/" + iconType, typeof(Sprite)) .Cookieslime. }}
������������������������
������������������������������������������������������������������������������������BtnLogon()
������������������������������������������������������������������������������������������������
������������������������������������������������������������������������������
���������������������������������Resources/Textures/LogOn
������������
���������
������������������������������������������������������������
- ������������������������������������������������������������������������������������������������������������
- ���������������������������UI���������������������������������
- ** Sprite unloaded ������**���������������������������������������������������������������
Resources/Textures/LogOn
���������������������Public
���
���������������������������������������������������������������������������������������������������
发表评论
最新留言
关于作者
