C# Class FairyGUI.GObject

Inheritance: EventDispatcher
Afficher le fichier Open project: fairygui/FairyGUI-unity Class Usage Examples

Méthodes publiques

Свойство Type Description
data object
dragBounds Rect?
group FairyGUI.GGroup
name string

Protected Properties

Свойство Type Description
_sizeImplType int
underConstruct bool

Private Properties

Свойство Type Description
DragBegin void
DragEnd void
InitDrag void
InternalSetParent void
Reset void
UpdateGearFromRelations void
__rollOut void
__rollOver void
__touchBegin void
__touchEnd void
__touchEnd2 void
__touchMove void
__touchMove2 void

Méthodes publiques

Méthode Description
AddRelation ( GObject target, RelationType relationType ) : void

AddRelation ( GObject target, RelationType relationType, bool usePercent ) : void

Center ( ) : void

Set the object in middle of the parent or GRoot if the parent is not set.

Center ( bool restraint ) : void

Set the object in middle of the parent or GRoot if the parent is not set.

ConstructFromResource ( ) : void
Dispose ( ) : void
GObject ( ) : System.Collections.Generic
GetGear ( int index ) : GearBase
GlobalToLocal ( Rect rect ) : Rect

GlobalToLocal ( Vector2 pt ) : Vector2

Transforms a point from global (Stage) coordinates to the local coordinate system.

HandleControllerChanged ( FairyGUI.Controller c ) : void
InvalidateBatchingState ( ) : void

Mark the fairy batching state is invalid.

LocalToGlobal ( Rect rect ) : Rect

LocalToGlobal ( Vector2 pt ) : Vector2

Transforms a point from the local coordinate system to global (Stage) coordinates.

LocalToRoot ( Vector2 pt, GRoot r ) : Vector2

Transforms a point from the local coordinate system to GRoot coordinates.

RemoveFromParent ( ) : void

RemoveRelation ( GObject target, RelationType relationType ) : void

RequestFocus ( ) : void

Request focus on this object.

RootToLocal ( Vector2 pt, GRoot r ) : Vector2

Transforms a point from the GRoot coordinate to local coordinates system.

SetHome ( GObject obj ) : void

SetPivot ( float xv, float yv ) : void

Change the x and y coordinates of the object's origin in its own coordinate space.

SetPivot ( float xv, float yv, bool asAnchor ) : void

Change the x and y coordinates of the object's origin in its own coordinate space.

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

change the x,y,z coordinates of the object relative to the local coordinates of the parent.

SetScale ( float wv, float hv ) : void

Change the scale factor.

SetSize ( float wv, float hv ) : void

Change size.

SetSize ( float wv, float hv, bool ignorePivot ) : void

Change size.

SetXY ( float xv, float yv ) : void

change the x and y coordinates of the object relative to the local coordinates of the parent.

Setup_AfterAdd ( XML xml ) : void
Setup_BeforeAdd ( XML xml ) : void
StartDrag ( ) : void

StartDrag ( int touchId ) : void

StopDrag ( ) : void

TransformPoint ( Vector2 pt, GObject targetSpace ) : Vector2

TransformRect ( Rect rect, GObject targetSpace ) : Rect

TweenFade ( float endValue, float duration ) : Tweener
TweenMove ( Vector2 endValue, float duration ) : Tweener
TweenMoveX ( float endValue, float duration ) : Tweener
TweenMoveY ( float endValue, float duration ) : Tweener
TweenResize ( Vector2 endValue, float duration ) : Tweener
TweenRotate ( float endValue, float duration ) : Tweener
TweenScale ( Vector2 endValue, float duration ) : Tweener
TweenScaleX ( float endValue, float duration ) : Tweener
TweenScaleY ( float endValue, float duration ) : Tweener
WorldToLocal ( Vector3 pt ) : Vector2

WorldToLocal ( Vector3 pt, Camera camera ) : Vector2

Méthodes protégées

Méthode Description
CreateDisplayObject ( ) : void
HandleGrayedChanged ( ) : void
HandlePositionChanged ( ) : void
HandleScaleChanged ( ) : void
HandleSizeChanged ( ) : void
SetSizeDirectly ( float wv, float hv ) : void
UpdateAlpha ( ) : void
UpdateGear ( int index ) : void

Private Methods

Méthode Description
DragBegin ( int touchId ) : void
DragEnd ( ) : void
InitDrag ( ) : void
InternalSetParent ( GComponent value ) : void
Reset ( ) : void
UpdateGearFromRelations ( int index, float dx, float dy ) : void
__rollOut ( ) : void
__rollOver ( ) : void
__touchBegin ( EventContext context ) : void
__touchEnd ( EventContext context ) : void
__touchEnd2 ( EventContext context ) : void
__touchMove ( EventContext context ) : void
__touchMove2 ( EventContext context ) : void

Method Details

AddRelation() public méthode

public AddRelation ( GObject target, RelationType relationType ) : void
target GObject
relationType RelationType
Résultat void

AddRelation() public méthode

public AddRelation ( GObject target, RelationType relationType, bool usePercent ) : void
target GObject
relationType RelationType
usePercent bool
Résultat void

Center() public méthode

Set the object in middle of the parent or GRoot if the parent is not set.
public Center ( ) : void
Résultat void

Center() public méthode

Set the object in middle of the parent or GRoot if the parent is not set.
public Center ( bool restraint ) : void
restraint bool Add relations to maintain the center state.
Résultat void

ConstructFromResource() public méthode

public ConstructFromResource ( ) : void
Résultat void

CreateDisplayObject() protected méthode

protected CreateDisplayObject ( ) : void
Résultat void

Dispose() public méthode

public Dispose ( ) : void
Résultat void

GObject() public méthode

public GObject ( ) : System.Collections.Generic
Résultat System.Collections.Generic

GetGear() public méthode

public GetGear ( int index ) : GearBase
index int
Résultat GearBase

GlobalToLocal() public méthode

public GlobalToLocal ( Rect rect ) : Rect
rect UnityEngine.Rect
Résultat UnityEngine.Rect

GlobalToLocal() public méthode

Transforms a point from global (Stage) coordinates to the local coordinate system.
public GlobalToLocal ( Vector2 pt ) : Vector2
pt UnityEngine.Vector2
Résultat UnityEngine.Vector2

HandleControllerChanged() public méthode

public HandleControllerChanged ( FairyGUI.Controller c ) : void
c FairyGUI.Controller
Résultat void

HandleGrayedChanged() protected méthode

protected HandleGrayedChanged ( ) : void
Résultat void

HandlePositionChanged() protected méthode

protected HandlePositionChanged ( ) : void
Résultat void

HandleScaleChanged() protected méthode

protected HandleScaleChanged ( ) : void
Résultat void

HandleSizeChanged() protected méthode

protected HandleSizeChanged ( ) : void
Résultat void

InvalidateBatchingState() public méthode

Mark the fairy batching state is invalid.
public InvalidateBatchingState ( ) : void
Résultat void

LocalToGlobal() public méthode

public LocalToGlobal ( Rect rect ) : Rect
rect UnityEngine.Rect
Résultat UnityEngine.Rect

LocalToGlobal() public méthode

Transforms a point from the local coordinate system to global (Stage) coordinates.
public LocalToGlobal ( Vector2 pt ) : Vector2
pt UnityEngine.Vector2
Résultat UnityEngine.Vector2

LocalToRoot() public méthode

Transforms a point from the local coordinate system to GRoot coordinates.
public LocalToRoot ( Vector2 pt, GRoot r ) : Vector2
pt UnityEngine.Vector2
r GRoot
Résultat UnityEngine.Vector2

RemoveFromParent() public méthode

public RemoveFromParent ( ) : void
Résultat void

RemoveRelation() public méthode

public RemoveRelation ( GObject target, RelationType relationType ) : void
target GObject
relationType RelationType
Résultat void

RequestFocus() public méthode

Request focus on this object.
public RequestFocus ( ) : void
Résultat void

RootToLocal() public méthode

Transforms a point from the GRoot coordinate to local coordinates system.
public RootToLocal ( Vector2 pt, GRoot r ) : Vector2
pt UnityEngine.Vector2
r GRoot
Résultat UnityEngine.Vector2

SetHome() public méthode

public SetHome ( GObject obj ) : void
obj GObject
Résultat void

SetPivot() public méthode

Change the x and y coordinates of the object's origin in its own coordinate space.
public SetPivot ( float xv, float yv ) : void
xv float x value in ratio
yv float y value in ratio
Résultat void

SetPivot() public méthode

Change the x and y coordinates of the object's origin in its own coordinate space.
public SetPivot ( float xv, float yv, bool asAnchor ) : void
xv float x value in ratio
yv float y value in ratio
asAnchor bool If use the pivot as the anchor position
Résultat void

SetPosition() public méthode

change the x,y,z coordinates of the object relative to the local coordinates of the parent.
public SetPosition ( float xv, float yv, float zv ) : void
xv float x value.
yv float y value.
zv float z value.
Résultat void

SetScale() public méthode

Change the scale factor.
public SetScale ( float wv, float hv ) : void
wv float The horizontal scale factor.
hv float The vertical scale factor
Résultat void

SetSize() public méthode

Change size.
public SetSize ( float wv, float hv ) : void
wv float Width value.
hv float Height value.
Résultat void

SetSize() public méthode

Change size.
public SetSize ( float wv, float hv, bool ignorePivot ) : void
wv float Width value.
hv float Height value.
ignorePivot bool If pivot is set, the object's positon will change when its size change. Set ignorePivot=false to keep the position.
Résultat void

SetSizeDirectly() protected méthode

protected SetSizeDirectly ( float wv, float hv ) : void
wv float
hv float
Résultat void

SetXY() public méthode

change the x and y coordinates of the object relative to the local coordinates of the parent.
public SetXY ( float xv, float yv ) : void
xv float x value.
yv float y value.
Résultat void

Setup_AfterAdd() public méthode

public Setup_AfterAdd ( XML xml ) : void
xml FairyGUI.Utils.XML
Résultat void

Setup_BeforeAdd() public méthode

public Setup_BeforeAdd ( XML xml ) : void
xml FairyGUI.Utils.XML
Résultat void

StartDrag() public méthode

public StartDrag ( ) : void
Résultat void

StartDrag() public méthode

public StartDrag ( int touchId ) : void
touchId int
Résultat void

StopDrag() public méthode

public StopDrag ( ) : void
Résultat void

TransformPoint() public méthode

public TransformPoint ( Vector2 pt, GObject targetSpace ) : Vector2
pt UnityEngine.Vector2
targetSpace GObject
Résultat UnityEngine.Vector2

TransformRect() public méthode

public TransformRect ( Rect rect, GObject targetSpace ) : Rect
rect UnityEngine.Rect
targetSpace GObject
Résultat UnityEngine.Rect

TweenFade() public méthode

public TweenFade ( float endValue, float duration ) : Tweener
endValue float
duration float
Résultat Tweener

TweenMove() public méthode

public TweenMove ( Vector2 endValue, float duration ) : Tweener
endValue UnityEngine.Vector2
duration float
Résultat Tweener

TweenMoveX() public méthode

public TweenMoveX ( float endValue, float duration ) : Tweener
endValue float
duration float
Résultat Tweener

TweenMoveY() public méthode

public TweenMoveY ( float endValue, float duration ) : Tweener
endValue float
duration float
Résultat Tweener

TweenResize() public méthode

public TweenResize ( Vector2 endValue, float duration ) : Tweener
endValue UnityEngine.Vector2
duration float
Résultat Tweener

TweenRotate() public méthode

public TweenRotate ( float endValue, float duration ) : Tweener
endValue float
duration float
Résultat Tweener

TweenScale() public méthode

public TweenScale ( Vector2 endValue, float duration ) : Tweener
endValue UnityEngine.Vector2
duration float
Résultat Tweener

TweenScaleX() public méthode

public TweenScaleX ( float endValue, float duration ) : Tweener
endValue float
duration float
Résultat Tweener

TweenScaleY() public méthode

public TweenScaleY ( float endValue, float duration ) : Tweener
endValue float
duration float
Résultat Tweener

UpdateAlpha() protected méthode

protected UpdateAlpha ( ) : void
Résultat void

UpdateGear() protected méthode

protected UpdateGear ( int index ) : void
index int
Résultat void

WorldToLocal() public méthode

public WorldToLocal ( Vector3 pt ) : Vector2
pt UnityEngine.Vector3
Résultat UnityEngine.Vector2

WorldToLocal() public méthode

public WorldToLocal ( Vector3 pt, Camera camera ) : Vector2
pt UnityEngine.Vector3
camera UnityEngine.Camera
Résultat UnityEngine.Vector2

Property Details

_sizeImplType protected_oe property

protected int _sizeImplType
Résultat int

data public_oe property

User defined data.
public object data
Résultat object

dragBounds public_oe property

Restricted range of dragging.
public Rect? dragBounds
Résultat Rect?

group public_oe property

Group belonging to.
public GGroup,FairyGUI group
Résultat FairyGUI.GGroup

name public_oe property

Name of the object.
public string name
Résultat string

underConstruct protected_oe property

protected bool underConstruct
Résultat bool