gd: added input addon
This commit is contained in:
@ -0,0 +1,11 @@
|
||||
extends Node2D
|
||||
|
||||
@export var action:GUIDEAction
|
||||
@export var texture:Texture2D
|
||||
|
||||
@onready var _animation_player:AnimationPlayer = %AnimationPlayer
|
||||
@onready var _sprite_2d:Sprite2D = %Sprite2D
|
||||
|
||||
func _ready():
|
||||
_sprite_2d.texture = texture
|
||||
action.triggered.connect(_animation_player.play.bind("run"))
|
@ -0,0 +1 @@
|
||||
uid://b3h0rac24v3l0
|
@ -0,0 +1,79 @@
|
||||
[gd_scene load_steps=6 format=3 uid="uid://cx8f0hljh5dhs"]
|
||||
|
||||
[ext_resource type="Texture2D" uid="uid://dbwgq8udtj2hp" path="res://guide_examples/action_priority/icons/enchant-acid-3.png" id="1_7l2hh"]
|
||||
[ext_resource type="Script" path="res://guide_examples/action_priority/spell_indicator/spell_indicator.gd" id="1_hpegm"]
|
||||
|
||||
[sub_resource type="Animation" id="Animation_j3vtt"]
|
||||
length = 0.001
|
||||
tracks/0/type = "value"
|
||||
tracks/0/imported = false
|
||||
tracks/0/enabled = true
|
||||
tracks/0/path = NodePath("Sprite2D:position")
|
||||
tracks/0/interp = 1
|
||||
tracks/0/loop_wrap = true
|
||||
tracks/0/keys = {
|
||||
"times": PackedFloat32Array(0),
|
||||
"transitions": PackedFloat32Array(1),
|
||||
"update": 0,
|
||||
"values": [Vector2(0, 0)]
|
||||
}
|
||||
tracks/1/type = "value"
|
||||
tracks/1/imported = false
|
||||
tracks/1/enabled = true
|
||||
tracks/1/path = NodePath("Sprite2D:modulate")
|
||||
tracks/1/interp = 1
|
||||
tracks/1/loop_wrap = true
|
||||
tracks/1/keys = {
|
||||
"times": PackedFloat32Array(0),
|
||||
"transitions": PackedFloat32Array(1),
|
||||
"update": 0,
|
||||
"values": [Color(1, 1, 1, 0)]
|
||||
}
|
||||
|
||||
[sub_resource type="Animation" id="Animation_4iqo1"]
|
||||
resource_name = "run"
|
||||
tracks/0/type = "value"
|
||||
tracks/0/imported = false
|
||||
tracks/0/enabled = true
|
||||
tracks/0/path = NodePath("Sprite2D:position")
|
||||
tracks/0/interp = 1
|
||||
tracks/0/loop_wrap = true
|
||||
tracks/0/keys = {
|
||||
"times": PackedFloat32Array(0, 1),
|
||||
"transitions": PackedFloat32Array(1, 1),
|
||||
"update": 0,
|
||||
"values": [Vector2(0, 0), Vector2(0, -346)]
|
||||
}
|
||||
tracks/1/type = "value"
|
||||
tracks/1/imported = false
|
||||
tracks/1/enabled = true
|
||||
tracks/1/path = NodePath("Sprite2D:modulate")
|
||||
tracks/1/interp = 1
|
||||
tracks/1/loop_wrap = true
|
||||
tracks/1/keys = {
|
||||
"times": PackedFloat32Array(0, 1),
|
||||
"transitions": PackedFloat32Array(1, 0.176777),
|
||||
"update": 0,
|
||||
"values": [Color(1, 1, 1, 1), Color(1, 1, 1, 0)]
|
||||
}
|
||||
|
||||
[sub_resource type="AnimationLibrary" id="AnimationLibrary_h1go0"]
|
||||
_data = {
|
||||
"RESET": SubResource("Animation_j3vtt"),
|
||||
"run": SubResource("Animation_4iqo1")
|
||||
}
|
||||
|
||||
[node name="SpellIndicator" type="Node2D"]
|
||||
script = ExtResource("1_hpegm")
|
||||
|
||||
[node name="Sprite2D" type="Sprite2D" parent="."]
|
||||
unique_name_in_owner = true
|
||||
modulate = Color(1, 1, 1, 0)
|
||||
scale = Vector2(0.5, 0.5)
|
||||
texture = ExtResource("1_7l2hh")
|
||||
|
||||
[node name="AnimationPlayer" type="AnimationPlayer" parent="."]
|
||||
unique_name_in_owner = true
|
||||
libraries = {
|
||||
"": SubResource("AnimationLibrary_h1go0")
|
||||
}
|
Reference in New Issue
Block a user