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
|
1
guide_examples/virtual_cursor/pointable/pointable.gd.uid
Normal file
1
guide_examples/virtual_cursor/pointable/pointable.gd.uid
Normal file
@ -0,0 +1 @@
|
||||
uid://dghhpx6mxb4lr
|
17
guide_examples/virtual_cursor/pointable/pointable.tscn
Normal file
17
guide_examples/virtual_cursor/pointable/pointable.tscn
Normal file
@ -0,0 +1,17 @@
|
||||
[gd_scene load_steps=4 format=3 uid="uid://ca51sup6v0qr1"]
|
||||
|
||||
[ext_resource type="Script" path="res://guide_examples/virtual_cursor/pointable/pointable.gd" id="1_ujxlw"]
|
||||
[ext_resource type="Texture2D" uid="uid://byjxtsekdl8t2" path="res://guide_examples/shared/godot_logo.svg" id="2_i12oa"]
|
||||
|
||||
[sub_resource type="RectangleShape2D" id="RectangleShape2D_cccqq"]
|
||||
size = Vector2(128, 128)
|
||||
|
||||
[node name="Pointable" type="Area2D"]
|
||||
monitoring = false
|
||||
script = ExtResource("1_ujxlw")
|
||||
|
||||
[node name="GodotLogo" type="Sprite2D" parent="."]
|
||||
texture = ExtResource("2_i12oa")
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
|
||||
shape = SubResource("RectangleShape2D_cccqq")
|
Reference in New Issue
Block a user