码迷,mamicode.com
首页 > 编程语言 > 详细

Unity multiplayer

时间:2017-06-24 10:08:57      阅读:142      评论:0      收藏:0      [点我收藏+]

标签:article   play   extc   size   alignment   .text   term   ddl   level   

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

标签:article   play   extc   size   alignment   .text   term   ddl   level   

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

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!