今天开始Unity
脚本手册中的Runtime Classes
(运行类)
这一部分我会继续为大家提供Unity的脚本手册的中文翻译(纯属个人行为,没有商业目的,原版翻译,版权所有,转载切记!)和我自己在学习Unity过程中自己的见解,希望用我自己的力量抵制网络上的“业余翻译”,人间正道是沧桑。
ADBannerView广告横幅视图(广告窗)
于飞
翻译 unity
ADBannerView is a wrapper around the ADBannerView class found in the Apple iAd framework and is only available on iPhone/iPad/iPod Touch.
ADBannerView是一个在Apple iAd框架中发现的 ADBannerView类的包装并且仅仅只能用于iPhone/iPad/iPod Touch。
于飞
翻译 unity
It provides a view that displays banner advertisements to the user.
它向用户提供了一个展示横幅广告的试图(广告位)
private var banner : ADBannerView = null;
function ShowBanner() {
//当广告位没有上载,并且出现错误,就无法显示(显示为空)
while (!banner.loaded && banner.error == null)
yield;
//错误为空,则正常显示;否则显示为空
if (banner.error == null)
banner.Show();
else banner = null;
}
function OnGUI() {
//GUI:用户图形界面
//使用GUI组件
//如果banner判断为空,GUI.enabled值为“true”,GUI被激活(三元运算符)
//如果banner判断为“非空”,GUI.enabled值为“false”,GUI不被激活
GUI.enabled = (banner == null ? true : false);
//定义"Show Banner"按键
//定义广告位
if (GUILayout.Button("Show Banner")) {
banner = new ADBannerView();
banner.autoSize = true;
banner.autoPosition = ADPosition.Bottom;
StartCoroutine(ShowBanner());
}
}
于飞
翻译 unity
Variables变量
requiredSizeIdentifiers
必要的尺寸标识符(用于识别变量的标识符)
|
Identifiers for the sizes of advertisements that the banner view can display.
广告横幅视图可显示的尺寸(大小)标识符
|
currentSizeIdentifier
当前尺寸标识符
|
The current size of the advertisement displayed in the banner view.
显示在广告横幅视图内广告的当前尺寸
|
autoSize
自动尺寸(大小)
|
If enabled, current banner's size is set automatically according to current screen orientation. It is disabled by default.
如果是可行的(被激活),当前横幅的尺寸的尺寸会根据屏幕自动适应。(该功能)在默认情况下(缺省设置)是被禁止的
|
position
位置
|
The position of the banner view.
横幅视图的位置
|
autoPosition
自动位置
|
Enables the banner view to be positioned automatically.
允许将横幅视图自动定位
|
visible
可见
|
Is the banner view visible? (Read Only)
横幅视图是否可见(只读型)
|
loaded
下载(已完成的下载)
|
Has the banner view downloaded an advertisement? (Read Only)
广告横幅视图是否下载广告?(只读型)
|
actionInProgress
进程中的行为
|
Is the banner currently executing a user-triggered action? (Read Only)
横幅当前正在执行用户的触发动作么?(只读型)
|
error
错误
|
An advertisement error. (Read Only)
广告报错(只读型)
|
于飞
翻译 unity
Constructors构造函数
于飞
翻译 unity
Functions函数(方法/功能)
Show
显示
|
Shows the banner view.
显示横幅视图
|
Hide
隐藏
|
Hides the banner view.
隐藏横幅视图
|
CancelAction
取消操作
|
Cancels an executing banner view action.
取消执行横幅视图操作
|
Class Functions类函数(类方法)
于飞
翻译 unity
于飞 翻译 unity脚本手册
于飞新浪微博

于飞 unity3d微信公共平台
于飞网易 http://m18945656221.blog.163.com/
于飞新浪
http://blog.sina.com.cn/runyixiansheng
|