-
-
Notifications
You must be signed in to change notification settings - Fork 304
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Optimize drag
and click
of Pointer
#2042
base: main
Are you sure you want to change the base?
Changes from 10 commits
7e49bb6
17c631b
f86007e
3a2d07a
dc12511
02c3ec1
544696d
16abb71
ddcc37d
5454fd6
1068d34
5248421
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -148,12 +148,29 @@ export class Script extends Component { | |||||
onPointerExit(pointer: Pointer): void {} | ||||||
|
||||||
/** | ||||||
* Called when the pointer is down while over the ColliderShape and is still holding down. | ||||||
* This function will be called when the pointer is pressed on the collider. | ||||||
* @param pointer | ||||||
*/ | ||||||
onPointerStartDrag(pointer: Pointer): void {} | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Method naming consistency The previous comment suggests renaming - onPointerStartDrag(pointer: Pointer): void {}
+ onPointerBeginDrag(pointer: Pointer): void {} Committable suggestion
Suggested change
|
||||||
|
||||||
/** | ||||||
* When a drag collision occurs on the pointer, this function will be called every time it moves. | ||||||
* @param pointer - The pointer that triggered | ||||||
* @remarks onPointerDrag is called every frame while the pointer is down. | ||||||
*/ | ||||||
onPointerDrag(pointer: Pointer): void {} | ||||||
|
||||||
/** | ||||||
* This function will be called when the pointer is released while dragging. | ||||||
* @param pointer - The pointer that triggered | ||||||
*/ | ||||||
onPointerEndDrag(pointer: Pointer): void {} | ||||||
|
||||||
/** | ||||||
* This function will be called when the pointer is lifted on the collider. | ||||||
* @param pointer - The pointer that triggered | ||||||
*/ | ||||||
onPointerDrop(pointer: Pointer): void {} | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Are you sure the comments is right and clearly |
||||||
|
||||||
/** | ||||||
* Called when be disabled. | ||||||
*/ | ||||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use
onPointerBeginDrag
name, likeonBeginRender
aneonEndRender