Add spine and dialogic museums
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
[gd_scene format=3 uid="uid://bgdpghp11j3kg"]
|
||||
|
||||
[ext_resource type="SpineSkeletonDataResource" uid="uid://cb6rn6vonqbx0" path="res://docs/museums/spine/assets/spineboy/spineboy-data-res.tres" id="1"]
|
||||
[ext_resource type="Script" uid="uid://djgow48y0sfrs" path="res://docs/museums/spine/examples/04-simple-input/spineboy-simple-input.gd" id="2_nao5a"]
|
||||
|
||||
[node name="Node2D" type="Node2D" unique_id=674511270]
|
||||
|
||||
[node name="Spineboy" type="SpineSprite" parent="." unique_id=1820819420]
|
||||
skeleton_data_res = ExtResource("1")
|
||||
preview_skin = "Default"
|
||||
preview_animation = "-- Empty --"
|
||||
preview_frame = false
|
||||
preview_time = 0.0
|
||||
position = Vector2(501.503, 472.035)
|
||||
scale = Vector2(0.518624, 0.518624)
|
||||
script = ExtResource("2_nao5a")
|
||||
@@ -0,0 +1,19 @@
|
||||
extends SpineSprite
|
||||
|
||||
func _ready():
|
||||
get_animation_state().set_animation("idle", true, 0)
|
||||
|
||||
func _process(_delta):
|
||||
if Input.is_action_just_pressed("ui_left"):
|
||||
get_animation_state().set_animation("run", true, 0)
|
||||
get_skeleton().set_scale_x(-1)
|
||||
|
||||
if Input.is_action_just_released("ui_left"):
|
||||
get_animation_state().set_animation("idle", true, 0)
|
||||
|
||||
if (Input.is_action_just_pressed("ui_right")):
|
||||
get_animation_state().set_animation("run", true, 0)
|
||||
get_skeleton().set_scale_x(1)
|
||||
|
||||
if Input.is_action_just_released("ui_right"):
|
||||
get_animation_state().set_animation("idle", true, 0)
|
||||
@@ -0,0 +1 @@
|
||||
uid://djgow48y0sfrs
|
||||
Reference in New Issue
Block a user