gd: added input addon
This commit is contained in:
15
guide_examples/virtual_cursor/pointable/pointable.gd
Normal file
15
guide_examples/virtual_cursor/pointable/pointable.gd
Normal file
@ -0,0 +1,15 @@
|
||||
extends Area2D
|
||||
|
||||
|
||||
var _is_spinning:bool = false
|
||||
|
||||
func spin():
|
||||
if _is_spinning:
|
||||
return
|
||||
_is_spinning = true
|
||||
var tween := create_tween()
|
||||
tween.tween_property(self, "rotation_degrees", 360, 0.5)
|
||||
await tween.finished
|
||||
|
||||
rotation_degrees = 0
|
||||
_is_spinning = false
|
Reference in New Issue
Block a user