C# Class UIRect, LoopScorllViewForNGUI

Inheritance: MonoBehaviour
Afficher le fichier Open project: tinyantstudio/LoopScorllViewForNGUI Class Usage Examples

Méthodes publiques

Свойство Type Description
bottomAnchor AnchorPoint,
leftAnchor AnchorPoint,
rightAnchor AnchorPoint,
topAnchor AnchorPoint,
updateAnchors AnchorUpdate

Protected Properties

Свойство Type Description
mChanged bool
mChildren BetterList
mGo GameObject
mParentFound bool
mStarted bool
mTrans Transform
mUpdateAnchors bool

Méthodes publiques

Méthode Description
CalculateFinalAlpha ( int frameID ) : float

Get the final cumulative alpha.

FindCameraFor ( AnchorPoint, ap ) : void

Helper function -- attempt to find the camera responsible for the specified anchor.

GetSides ( Transform relativeTo ) : Vector3[]

Get the sides of the rectangle relative to the specified transform. The order is left, top, right, bottom.

Invalidate ( bool includeChildren ) : void

Sets the local 'changed' flag, indicating that some parent value(s) are now be different, such as alpha for example.

ParentHasChanged ( ) : void

Call this function when the rectangle's parent has changed.

ResetAnchors ( ) : void

Ensure that all rect references are set correctly on the anchors.

ResetAndUpdateAnchors ( ) : void

Convenience method that resets and updates the anchors, all at once.

SetAnchor ( GameObject go ) : void

Anchor this rectangle to the specified transform. Note that this function will not keep the rectangle's current dimensions, but will instead assume the target's dimensions.

SetAnchor ( GameObject go, int left, int bottom, int right, int top ) : void

Anchor this rectangle to the specified transform.

SetAnchor ( Transform t ) : void

Anchor this rectangle to the specified transform. Note that this function will not keep the rectangle's current dimensions, but will instead assume the target's dimensions.

SetRect ( float x, float y, float width, float height ) : void

Set the rectangle manually.

Update ( ) : void

Rectangles need to update in a specific order -- parents before children. When deriving from this class, override its OnUpdate() function instead.

UpdateAnchors ( ) : void

Manually update anchored sides.

Méthodes protégées

Méthode Description
GetLocalPos ( AnchorPoint, ac, Transform trans ) : Vector3

Helper function that gets the specified anchor's position relative to the chosen transform.

OnAnchor ( ) : void

Update the dimensions of the rectangle using anchor points.

OnDisable ( ) : void

Clear the parent rectangle reference.

OnEnable ( ) : void

Automatically find the parent rectangle.

OnInit ( ) : void

Automatically find the parent rectangle.

OnStart ( ) : void

Abstract start functionality, ensured to happen after the anchor rect references have been set.

OnUpdate ( ) : void

Abstract update functionality, ensured to happen after the targeting anchors have been updated.

OnValidate ( ) : void

This callback is sent inside the editor notifying us that some property has changed.

Start ( ) : void

Set anchor rect references on start.

Method Details

CalculateFinalAlpha() public abstract méthode

Get the final cumulative alpha.
public abstract CalculateFinalAlpha ( int frameID ) : float
frameID int
Résultat float

FindCameraFor() public méthode

Helper function -- attempt to find the camera responsible for the specified anchor.
public FindCameraFor ( AnchorPoint, ap ) : void
ap AnchorPoint,
Résultat void

GetLocalPos() protected méthode

Helper function that gets the specified anchor's position relative to the chosen transform.
protected GetLocalPos ( AnchorPoint, ac, Transform trans ) : Vector3
ac AnchorPoint,
trans Transform
Résultat Vector3

GetSides() public méthode

Get the sides of the rectangle relative to the specified transform. The order is left, top, right, bottom.
public GetSides ( Transform relativeTo ) : Vector3[]
relativeTo Transform
Résultat Vector3[]

Invalidate() public méthode

Sets the local 'changed' flag, indicating that some parent value(s) are now be different, such as alpha for example.
public Invalidate ( bool includeChildren ) : void
includeChildren bool
Résultat void

OnAnchor() protected abstract méthode

Update the dimensions of the rectangle using anchor points.
protected abstract OnAnchor ( ) : void
Résultat void

OnDisable() protected méthode

Clear the parent rectangle reference.
protected OnDisable ( ) : void
Résultat void

OnEnable() protected méthode

Automatically find the parent rectangle.
protected OnEnable ( ) : void
Résultat void

OnInit() protected méthode

Automatically find the parent rectangle.
protected OnInit ( ) : void
Résultat void

OnStart() protected abstract méthode

Abstract start functionality, ensured to happen after the anchor rect references have been set.
protected abstract OnStart ( ) : void
Résultat void

OnUpdate() protected méthode

Abstract update functionality, ensured to happen after the targeting anchors have been updated.
protected OnUpdate ( ) : void
Résultat void

OnValidate() protected méthode

This callback is sent inside the editor notifying us that some property has changed.
protected OnValidate ( ) : void
Résultat void

ParentHasChanged() public méthode

Call this function when the rectangle's parent has changed.
public ParentHasChanged ( ) : void
Résultat void

ResetAnchors() public méthode

Ensure that all rect references are set correctly on the anchors.
public ResetAnchors ( ) : void
Résultat void

ResetAndUpdateAnchors() public méthode

Convenience method that resets and updates the anchors, all at once.
public ResetAndUpdateAnchors ( ) : void
Résultat void

SetAnchor() public méthode

Anchor this rectangle to the specified transform. Note that this function will not keep the rectangle's current dimensions, but will instead assume the target's dimensions.
public SetAnchor ( GameObject go ) : void
go GameObject
Résultat void

SetAnchor() public méthode

Anchor this rectangle to the specified transform.
public SetAnchor ( GameObject go, int left, int bottom, int right, int top ) : void
go GameObject
left int
bottom int
right int
top int
Résultat void

SetAnchor() public méthode

Anchor this rectangle to the specified transform. Note that this function will not keep the rectangle's current dimensions, but will instead assume the target's dimensions.
public SetAnchor ( Transform t ) : void
t Transform
Résultat void

SetRect() public abstract méthode

Set the rectangle manually.
public abstract SetRect ( float x, float y, float width, float height ) : void
x float
y float
width float
height float
Résultat void

Start() protected méthode

Set anchor rect references on start.
protected Start ( ) : void
Résultat void

Update() public méthode

Rectangles need to update in a specific order -- parents before children. When deriving from this class, override its OnUpdate() function instead.
public Update ( ) : void
Résultat void

UpdateAnchors() public méthode

Manually update anchored sides.
public UpdateAnchors ( ) : void
Résultat void

Property Details

bottomAnchor public_oe property

Bottom side anchor.
public AnchorPoint, bottomAnchor
Résultat AnchorPoint,

leftAnchor public_oe property

Left side anchor.
public AnchorPoint, leftAnchor
Résultat AnchorPoint,

mChanged protected_oe property

protected bool mChanged
Résultat bool

mChildren protected_oe property

protected BetterList mChildren
Résultat BetterList

mGo protected_oe property

protected GameObject mGo
Résultat GameObject

mParentFound protected_oe property

protected bool mParentFound
Résultat bool

mStarted protected_oe property

protected bool mStarted
Résultat bool

mTrans protected_oe property

protected Transform mTrans
Résultat Transform

mUpdateAnchors protected_oe property

protected bool mUpdateAnchors
Résultat bool

rightAnchor public_oe property

Right side anchor.
public AnchorPoint, rightAnchor
Résultat AnchorPoint,

topAnchor public_oe property

Top side anchor.
public AnchorPoint, topAnchor
Résultat AnchorPoint,

updateAnchors public_oe property

Whether anchors will be recalculated on every update.
public AnchorUpdate updateAnchors
Résultat AnchorUpdate