C# Class UIDraggableCamera, Hero.Coli

Inheritance: MonoBehaviour
Afficher le fichier Open project: CyberCRI/Hero.Coli Class Usage Examples

Méthodes publiques

Свойство Type Description
dragEffect UIDragObject.DragEffect
momentumAmount float
rootForBounds Transform
scale Vector2
scrollWheelFactor float
smoothDragStart bool

Méthodes publiques

Méthode Description
Awake ( ) : void

Cache the common components.

ConstrainToBounds ( bool immediate ) : bool

Constrain the current camera's position to be within the viewable area's bounds.

Drag ( Vector2 delta ) : void

Drag event receiver.

Press ( bool isPressed ) : void

Calculate the bounds of all widgets under this game object.

Scroll ( float delta ) : void

If the object should support the scroll wheel, do it.

Start ( ) : void

Cache the root.

Update ( ) : void

Apply the dragging momentum.

Private Methods

Méthode Description
CalculateConstrainOffset ( ) : Vector3

Calculate the offset needed to be constrained within the panel's bounds.

Method Details

Awake() public méthode

Cache the common components.
public Awake ( ) : void
Résultat void

ConstrainToBounds() public méthode

Constrain the current camera's position to be within the viewable area's bounds.
public ConstrainToBounds ( bool immediate ) : bool
immediate bool
Résultat bool

Drag() public méthode

Drag event receiver.
public Drag ( Vector2 delta ) : void
delta Vector2
Résultat void

Press() public méthode

Calculate the bounds of all widgets under this game object.
public Press ( bool isPressed ) : void
isPressed bool
Résultat void

Scroll() public méthode

If the object should support the scroll wheel, do it.
public Scroll ( float delta ) : void
delta float
Résultat void

Start() public méthode

Cache the root.
public Start ( ) : void
Résultat void

Update() public méthode

Apply the dragging momentum.
public Update ( ) : void
Résultat void

Property Details

dragEffect public_oe property

Effect to apply when dragging.
public UIDragObject.DragEffect dragEffect
Résultat UIDragObject.DragEffect

momentumAmount public_oe property

How much momentum gets applied when the press is released after dragging.
public float momentumAmount
Résultat float

rootForBounds public_oe property

Root object that will be used for drag-limiting bounds.
public Transform rootForBounds
Résultat Transform

scale public_oe property

Scale value applied to the drag delta. Set X or Y to 0 to disallow dragging in that direction.
public Vector2 scale
Résultat Vector2

scrollWheelFactor public_oe property

Effect the scroll wheel will have on the momentum.
public float scrollWheelFactor
Résultat float

smoothDragStart public_oe property

Whether the drag operation will be started smoothly, or if if it will be precise (but will have a noticeable "jump").
public bool smoothDragStart
Résultat bool