首页 > 编程语言 > 详细

Unity multiplayer

时间:2017-06-24 09:26:06      阅读:279      评论:0      收藏:0      [点我收藏+]
using UnityEngine;
using System.Collections;


public class multiplayer_Button : MonoBehaviour {

void OnGUI()
{
const int buttonWidth = 150;
const int buttonHeight = 60;

// Determine the button‘s place on screen
// Center in X, 2/3 of the height in Y
Rect buttonRect = new Rect(
Screen.width / 2 - (buttonWidth / 2) +200,
(Screen.height / 2) - (buttonHeight / 2),
buttonWidth,
buttonHeight
);

GUIStyle invisibox;
invisibox = new GUIStyle ();
//invisibox.alignment = TextAnchor.MiddleCenter;
//invisibox.normal.textColor = new Color(0,100,0);
//invisibox.fontSize = 30;

if(GUI.Button(buttonRect,"",invisibox))
{
Application.LoadLevel("multSurvival");
}
}
}

Unity multiplayer

原文:http://www.cnblogs.com/llguanli/p/7072480.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!