C# Class FairyGUI.DisplayObject

Inheritance: EventDispatcher
ファイルを表示 Open project: fairygui/FairyGUI-unity Class Usage Examples

Public Properties

Property Type Description
gOwner GObject
id uint
name string
onPaint EventCallback0

Protected Properties

Property Type Description
_captureDelegate EventCallback0
_contentRect UnityEngine.Rect
_ownsGameObject bool
_paintingFlag int
_paintingMargin Margin
_paintingMode int
_requireUpdateMesh bool
_skipInFairyBatching bool
_touchDisabled bool
_transformMatrix Matrix4x4?

Public Methods

Method Description
ApplyPivot ( ) : void
Capture ( ) : void
DisplayObject ( ) : FairyGUI.Utils
Dispose ( ) : void
EnsureSizeCorrect ( ) : void
EnterPaintingMode ( int requestorId, Margin margin ) : void

进入绘画模式,整个对象将画到一张RenderTexture上,然后这种贴图将代替原有的显示内容。 可以在onPaint回调里对这张纹理进行进一步操作,实现特殊效果。 可能有多个地方要求进入绘画模式,这里用requestorId加以区别,取值是1、2、4、8、16以此类推。1024内内部保留。用户自定义的id从1024开始。

GetBounds ( DisplayObject targetSpace ) : Rect

GlobalToLocal ( Vector2 point ) : Vector2

将舞台坐标转换为本地坐标

InvalidateBatchingState ( ) : void

LeavePaintingMode ( int requestorId ) : void

离开绘画模式

LocalToGlobal ( Vector2 point ) : Vector2

将本地坐标转换为舞台坐标

RemoveFromParent ( ) : void

SetPosition ( float xv, float yv, float zv ) : void

SetScale ( float xv, float yv ) : void

SetSize ( float wv, float hv ) : void

SetXY ( float xv, float yv ) : void

TransformPoint ( Vector2 point, DisplayObject targetSpace ) : Vector2

TransformRect ( Rect rect, DisplayObject targetSpace ) : Rect

Update ( UpdateContext context ) : void
UpdateHierarchy ( ) : void
UpdatePivotOffset ( ) : void
UpdateTransformMatrix ( ) : void
WorldToLocal ( Vector3 worldPoint, Vector3 direction ) : Vector3

转换世界坐标点到等效的本地xy平面的点。等效的意思是他们在屏幕方向看到的位置一样。 返回的点是在对象的本地坐标空间,且z=0

Protected Methods

Method Description
CreateGameObject ( string gameObjectName ) : void
DestroyGameObject ( ) : void
HitTest ( ) : DisplayObject
InternalHitTest ( ) : DisplayObject
InternalHitTestMask ( ) : DisplayObject
OnSizeChanged ( bool widthChanged, bool heightChanged ) : void
SetGameObject ( GameObject gameObject ) : void
TransformRectPoint ( float px, float py, DisplayObject targetSpace, Rect &rect ) : void

Private Methods

Method Description
InternalSetParent ( Container value ) : void

Method Details

ApplyPivot() public method

public ApplyPivot ( ) : void
return void

Capture() public method

public Capture ( ) : void
return void

CreateGameObject() protected method

protected CreateGameObject ( string gameObjectName ) : void
gameObjectName string
return void

DestroyGameObject() protected method

protected DestroyGameObject ( ) : void
return void

DisplayObject() public method

public DisplayObject ( ) : FairyGUI.Utils
return FairyGUI.Utils

Dispose() public method

public Dispose ( ) : void
return void

EnsureSizeCorrect() public method

public EnsureSizeCorrect ( ) : void
return void

EnterPaintingMode() public method

进入绘画模式,整个对象将画到一张RenderTexture上,然后这种贴图将代替原有的显示内容。 可以在onPaint回调里对这张纹理进行进一步操作,实现特殊效果。 可能有多个地方要求进入绘画模式,这里用requestorId加以区别,取值是1、2、4、8、16以此类推。1024内内部保留。用户自定义的id从1024开始。
public EnterPaintingMode ( int requestorId, Margin margin ) : void
requestorId int
margin Margin 纹理四周的留空。如果特殊处理后的内容大于原内容,那么这里的设置可以使纹理扩大。
return void

GetBounds() public method

public GetBounds ( DisplayObject targetSpace ) : Rect
targetSpace DisplayObject
return UnityEngine.Rect

GlobalToLocal() public method

将舞台坐标转换为本地坐标
public GlobalToLocal ( Vector2 point ) : Vector2
point UnityEngine.Vector2
return UnityEngine.Vector2

HitTest() protected method

protected HitTest ( ) : DisplayObject
return DisplayObject

InternalHitTest() protected method

protected InternalHitTest ( ) : DisplayObject
return DisplayObject

InternalHitTestMask() protected method

protected InternalHitTestMask ( ) : DisplayObject
return DisplayObject

InvalidateBatchingState() public method

public InvalidateBatchingState ( ) : void
return void

LeavePaintingMode() public method

离开绘画模式
public LeavePaintingMode ( int requestorId ) : void
requestorId int
return void

LocalToGlobal() public method

将本地坐标转换为舞台坐标
public LocalToGlobal ( Vector2 point ) : Vector2
point UnityEngine.Vector2
return UnityEngine.Vector2

OnSizeChanged() protected method

protected OnSizeChanged ( bool widthChanged, bool heightChanged ) : void
widthChanged bool
heightChanged bool
return void

RemoveFromParent() public method

public RemoveFromParent ( ) : void
return void

SetGameObject() protected method

protected SetGameObject ( GameObject gameObject ) : void
gameObject UnityEngine.GameObject
return void

SetPosition() public method

public SetPosition ( float xv, float yv, float zv ) : void
xv float
yv float
zv float
return void

SetScale() public method

public SetScale ( float xv, float yv ) : void
xv float
yv float
return void

SetSize() public method

public SetSize ( float wv, float hv ) : void
wv float
hv float
return void

SetXY() public method

public SetXY ( float xv, float yv ) : void
xv float
yv float
return void

TransformPoint() public method

public TransformPoint ( Vector2 point, DisplayObject targetSpace ) : Vector2
point UnityEngine.Vector2
targetSpace DisplayObject null if to world space
return UnityEngine.Vector2

TransformRect() public method

public TransformRect ( Rect rect, DisplayObject targetSpace ) : Rect
rect UnityEngine.Rect
targetSpace DisplayObject null if to world space
return UnityEngine.Rect

TransformRectPoint() protected method

protected TransformRectPoint ( float px, float py, DisplayObject targetSpace, Rect &rect ) : void
px float
py float
targetSpace DisplayObject
rect UnityEngine.Rect
return void

Update() public method

public Update ( UpdateContext context ) : void
context UpdateContext
return void

UpdateHierarchy() public method

public UpdateHierarchy ( ) : void
return void

UpdatePivotOffset() public method

public UpdatePivotOffset ( ) : void
return void

UpdateTransformMatrix() public method

public UpdateTransformMatrix ( ) : void
return void

WorldToLocal() public method

转换世界坐标点到等效的本地xy平面的点。等效的意思是他们在屏幕方向看到的位置一样。 返回的点是在对象的本地坐标空间,且z=0
public WorldToLocal ( Vector3 worldPoint, Vector3 direction ) : Vector3
worldPoint UnityEngine.Vector3
direction UnityEngine.Vector3
return UnityEngine.Vector3

Property Details

_captureDelegate protected_oe property

protected EventCallback0 _captureDelegate
return EventCallback0

_contentRect protected_oe property

protected Rect,UnityEngine _contentRect
return UnityEngine.Rect

_ownsGameObject protected_oe property

protected bool _ownsGameObject
return bool

_paintingFlag protected_oe property

protected int _paintingFlag
return int

_paintingMargin protected_oe property

protected Margin,FairyGUI _paintingMargin
return Margin

_paintingMode protected_oe property

protected int _paintingMode
return int

_requireUpdateMesh protected_oe property

protected bool _requireUpdateMesh
return bool

_skipInFairyBatching protected_oe property

protected bool _skipInFairyBatching
return bool

_touchDisabled protected_oe property

protected bool _touchDisabled
return bool

_transformMatrix protected_oe property

protected Matrix4x4? _transformMatrix
return Matrix4x4?

gOwner public_oe property

public GObject,FairyGUI gOwner
return GObject

id public_oe property

public uint id
return uint

name public_oe property

public string name
return string

onPaint public_oe property

public EventCallback0 onPaint
return EventCallback0