NGUI v2.0 UI_3:UICamera UI摄像机类
来源:互联网 发布:中信证券手机版软件 编辑:程序博客网 时间:2024/06/17 18:58
UICamera
This script should be attached to each camera that's used to draw the objects with UI components on them. This may mean only one camera (main camera or your UI camera), or multiple cameras if you happen to have multiple viewports. Failing to attach this script simply means that objects drawn by this camera won't receive UI notifications:More...
这个脚本应该连接到每个相机,用来绘制对象与UI组件的相机。这可能意味着只有一个相机(主相机或你的UI相机),或多个摄像头如果你碰巧有多个视窗。未能将此脚本只是意味着对象受到这相机不会接收UI的通知:更多…
List of all members.所有成员的列表。
Classes
class Highlightedclass MouseOrTouchStatic Public Member Functions静态公共成员函数
staticUICamera FindCameraForLayer (int layer) Find the camera responsible for handling events on objects of the specified layer.Public Attributes公共属性
bool useMouse = true Whether the mouse input is used.是否使用鼠标输入。bool useTouch = true Whether the touch-based input is used.
是否使用触摸屏。bool useKeyboard = true Whether the keyboard events will be processed.
操纵杆和控制器的事件是否将会被处理。LayerMask eventReceiverMask = -1 Which layers will receive events.
延迟多久 显示工具提示。string scrollAxisName = "Mouse ScrollWheel" Name of the axis used for scrolling.
用于滚动的轴名。
Static Public Attributes静态公共属性
static Camera lastCamera Last camera active prior to sending out the event. This will always be the camera that actually sent out the event.鼠标或触摸最后在屏幕坐标发送事件最后的位置。static int lastTouchID = -1 ID of the touch or mouse operation prior to sending out the event. Mouse ID is '-1' for left, '-2' for right mouse button, '-3' for middle.
ID触碰或鼠标操作之前,发送事件。鼠标ID ' -1 '用于左,' -2 '为鼠标右键,‘-3’为中间。static GameObject fallThrough If events don't get handled, they will be forwarded to this game object.
Properties属性
Camera cachedCamera [get]
Caching is always preferable for performance. 缓存的性能总是更可取的。static GameObject hoveredObject
[get]
The object the mouse is hovering over. Results may be somewhat odd on touch-based devices. [get, set]
Option to manually set the selected game object. 选择手动设置选定的游戏对象。static Camera mainCamera
[get]
Convenience function that returns the main HUD camera. 便利函数,它返回主HUD相机。staticUICamera eventHandler
[get]
Event handler for all types of events. 对所有类型的事件事件处理程序。
Detailed Description详细描述
This script should be attached to each camera that's used to draw the objects with UI components on them. This may mean only one camera (main camera or your UI camera), or multiple cameras if you happen to have multiple viewports. Failing to attach this script simply means that objects drawn by this camera won't receive UI notifications:
这个脚本应该连接到每个相机,用来绘制对象与UI组件构成的。这可能意味着只有一个相机(主相机或你的UI相机),或多个摄像头如果你碰巧有多个视窗。未能将此脚本只是意味着对象受到这相机不会接收UI的通知:
- OnHover (isOver) is sent when the mouse hovers over a collider or moves away.
- OnPress (isDown) is sent when a mouse button gets pressed on the collider.
- OnSelect (selected) is sent when a mouse button is released on the same object as it was pressed on.
- OnClick (int button) is sent with the same conditions as OnSelect, with the added check to see if the mouse has not moved much.
- OnDrag (delta) is sent when a mouse or touch gets pressed on a collider and starts dragging it.
- OnDrop (gameObject) is sent when the mouse or touch get released on a different collider than the one that was being dragged.
- OnInput (text) is sent when typing (after selecting a collider by clicking on it).
- OnTooltip (show) is sent when the mouse hovers over a collider for some time without moving.
- OnScroll (float delta) is sent out when the mouse scroll wheel is moved.
- OnKey (KeyCode key) is sent when keyboard or controller input is used.
Member Function Documentation成员函数文档
[static]
Find the camera responsible for handling events on objects of the specified layer. 找到照相机负责事件处理对象指定的层。
Member Data Documentation成员数据的文档
Which layers will receive events.
[static]
If events don't get handled, they will be forwarded to this game object.
[static]
Last camera active prior to sending out the event. This will always be the camera that actually sent out the event.(上面已有 不再重复)
[static]
Last raycast hit prior to sending out the event. This is useful if you want detailed information about what was actually hit in your OnClick, OnHover, and other event functions.
[static]
ID of the touch or mouse operation prior to sending out the event. Mouse ID is '-1' for left, '-2' for right mouse button, '-3' for middle.
[static]
Last mouse or touch position in screen coordinates prior to sending out the event.
Name of the axis used for scrolling.
How long of a delay to expect before showing the tooltip.
Whether the joystick and controller events will be processed.
Whether the keyboard events will be processed.
Whether the mouse input is used.
Whether the touch-based input is used.
Property Documentation属性的文档
[get]
Caching is always preferable for performance.
[static, get]
Event handler for all types of events.
[static, get]
The object the mouse is hovering over. Results may be somewhat odd on touch-based devices.
[static, get]
Convenience function that returns the main HUD camera.
[static, get, set]
Option to manually set the selected game object.
- Assets/NGUI/Scripts/UI/UICamera.cs
- NGUI v2.0 UI_3:UICamera UI摄像机类
- NGUI v2.0 Interaction_13:UIDragCamera UI拖拽摄像机类
- NGUI v2.0 Interaction_14:UIDraggableCamera UI可拖拽摄像机类
- NGUI v2.0 UI_1:UIAnchor UI锚定类
- NGUI v2.0 UI_4:UIFilledSprite UI填充精灵类
- NGUI v2.0 Interaction_2:UIButtonColor UI按钮颜色类
- NGUI v2.0 Interaction_3:UIButtonKeys UI按钮按键类
- NGUI v2.0 Interaction_4:UIButtonMessage UI按钮消息类
- NGUI v2.0 Interaction_5:UIButtonOffset UI按钮偏移类
- NGUI v2.0 Interaction_6:UIButtonPlayAnimation UI按钮播放动画类
- NGUI v2.0 Interaction_7:UIButtonRotation UI按钮旋转类
- NGUI -- UICamera
- NGUI--UICamera
- NGUI:UICamera
- NGUI v2.0 UI_2:UIAtlas UI图集类
- NGUI v2.0 Tweening_7:UITweener UI间补类
- NGUI v2.0 Interaction_8_9:UIButtonScale UI按钮缩放类 || UIButtonSound UI按钮声音类
- NGUI v2.0 Interaction_12:UICheckboxControlledComponent UI复选框可控组件类
- RedHat(rhel5.5_x86-client)下配置CUDA开发环境
- 利用eclipse构建和部署maven工程
- 56 Expression: (unsigned)(c + 1) <= 256
- create job
- 黑马程序员—c#基础知识。。
- NGUI v2.0 UI_3:UICamera UI摄像机类
- 利用eclipse构建和部署maven工程
- codewarrior动态内存分配问题解决
- openlayers vector marker
- JAVA中的快速排序及冒泡排序算法
- MVC模式购物车举例
- C#委托事件及自定义事件的处理
- windows下my.ini的"named pipe"或"TCP/IP"配置案例
- 利用Hog特征和SVM分类器进行行人检测