Cursor look state machine
This commit is contained in:
parent
bf0ddce8a5
commit
2eef87c163
1 changed files with 11 additions and 0 deletions
|
@ -136,6 +136,17 @@ func cursorClick():
|
|||
hoveredObject.on_click()
|
||||
|
||||
func cursor_look():
|
||||
if (grabbedSticker ):
|
||||
currentCursorState = CURSOR_STATE.GRABBED
|
||||
elif (hoveredSticker):
|
||||
if (!($GrabTimer.is_stopped())):
|
||||
currentCursorState = CURSOR_STATE.GRABBED
|
||||
else:
|
||||
currentCursorState = CURSOR_STATE.GRAB
|
||||
elif (!($GrabTimer.is_stopped())):
|
||||
currentCursorState = CURSOR_STATE.CLICK
|
||||
else:
|
||||
currentCursorState = CURSOR_STATE.DEFAULT
|
||||
|
||||
if (currentCursorState != oldCursorState):
|
||||
oldCursorState = currentCursorState
|
||||
|
|
Loading…
Reference in a new issue