unity-随笔2
来源:互联网 发布:单片机视频教程哪个好 编辑:程序博客网 时间:2024/05/29 03:15
using System.Collections;using System.Collections.Generic;using UnityEngine;using UnityEngine.SceneManagement;public class test : MonoBehaviour { public string username = ""; public string password = ""; public string ispass ="yes"; void OnGUI() { GUI.Box(new Rect(10, 10, 200, 120),"登录框"); GUI.Label(new Rect(20,40,50,30),"用户名"); username = GUI.TextField(new Rect(70, 40, 120, 20), username); GUI.Label(new Rect(20, 70, 50, 30), "密码"); password = GUI.PasswordField(new Rect(70, 70, 120, 20), password ,'*'); if (GUI.Button(new Rect(70, 100, 50, 25), "登录")) { if (username == "myhaspl" && password == "good123") { ispass = "yes"; } else { ispass = "no"; } } if (ispass=="yes") { GUI.Label(new Rect(120, 100, 50, 25), "正确"); SceneManager.LoadScene("fb2");//切换场景 } else if (ispass == "no") { GUI.Label(new Rect(120, 100, 50, 25), "错误"); } }// Use this for initializationvoid Start () {}// Update is called once per framevoid Update () {}}
0 0
- unity-随笔2
- Unity ShaderLab 光照随笔
- unity随笔-3
- unity随笔_unity存档
- 随笔------解决Ubuntu不能进入unity
- Unity shader随笔记(一)SurfaceShader
- Unity 游戏开发实战学习随笔
- 随笔2
- 随笔2
- 随笔2
- 随笔2
- 随笔2
- 随笔2
- 随笔2
- 随笔2
- 随笔2
- 随笔2
- 随笔2
- 排列在接口测试中的应用
- ios开发使用CGContextRef画图
- 应用Druid监控SQL语句的执行情况
- 小松博客修改成https
- iOS开发关于集成第三方短信通知
- unity-随笔2
- Hbase入门教程和分布式的安装部署
- glide:基本用法
- 任务
- 【Java JVM】Java 虚拟机类加载机制简单总结
- MySQL数据库引擎介绍、区别、创建和性能测试的深入分析
- Python的中文学习网址
- Spring mvc系列八之 页面静态化(二)
- 解决eclipse在创建maven项目时,不断加载问题