mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-02-06 23:34:53 +08:00
[godot] Refactor example file layout.
This commit is contained in:
parent
25e55b4009
commit
b01acf49fd
@ -1,4 +1,4 @@
|
||||
extends SpineSprite
|
||||
|
||||
func _ready():
|
||||
get_animation_state().set_animation("walk", true, 0);
|
||||
func _ready():
|
||||
get_animation_state().set_animation("walk", true, 0)
|
||||
|
||||
@ -0,0 +1,10 @@
|
||||
[gd_resource type="SpineSkeletonDataResource" load_steps=3 format=2]
|
||||
|
||||
[ext_resource path="res://assets/mix-and-match/mix-and-match.atlas" type="SpineAtlasResource" id=1]
|
||||
[ext_resource path="res://assets/mix-and-match/mix-and-match-pro.json" type="SpineSkeletonFileResource" id=2]
|
||||
|
||||
[resource]
|
||||
atlas_res = ExtResource( 1 )
|
||||
skeleton_file_res = ExtResource( 2 )
|
||||
animations = null
|
||||
skins = null
|
||||
@ -0,0 +1,13 @@
|
||||
[remap]
|
||||
|
||||
importer="spine.json"
|
||||
type="SpineSkeletonFileResource"
|
||||
path="res://.import/mix-and-match-pro.json-57325a5014e6fd56fc4a86824bc458ea.spjson"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://assets/mix-and-match/mix-and-match-pro.json"
|
||||
dest_files=[ "res://.import/mix-and-match-pro.json-57325a5014e6fd56fc4a86824bc458ea.spjson" ]
|
||||
|
||||
[params]
|
||||
|
||||
@ -0,0 +1,14 @@
|
||||
[remap]
|
||||
|
||||
importer="spine.atlas"
|
||||
type="SpineAtlasResource"
|
||||
path="res://.import/mix-and-match.atlas-3d349b543ecdcc01fb29033adaef0841.spatlas"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://assets/mix-and-match/mix-and-match.atlas"
|
||||
dest_files=[ "res://.import/mix-and-match.atlas-3d349b543ecdcc01fb29033adaef0841.spatlas" ]
|
||||
|
||||
[params]
|
||||
|
||||
normal_texture_prefix="n"
|
||||
|
Before Width: | Height: | Size: 340 KiB After Width: | Height: | Size: 340 KiB |
@ -2,15 +2,15 @@
|
||||
|
||||
importer="texture"
|
||||
type="StreamTexture"
|
||||
path="res://.import/mix-and-match.png-9b5652df6ad1d929562c4c4464642a95.stex"
|
||||
path="res://.import/mix-and-match.png-c2d8e28d9f2efc380ff8b95a22dadcc3.stex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://mix-and-match/mix-and-match.png"
|
||||
dest_files=[ "res://.import/mix-and-match.png-9b5652df6ad1d929562c4c4464642a95.stex" ]
|
||||
source_file="res://assets/mix-and-match/mix-and-match.png"
|
||||
dest_files=[ "res://.import/mix-and-match.png-c2d8e28d9f2efc380ff8b95a22dadcc3.stex" ]
|
||||
|
||||
[params]
|
||||
|
||||
10
spine-godot/example/assets/raptor/raprot-data.tres
Normal file
10
spine-godot/example/assets/raptor/raprot-data.tres
Normal file
@ -0,0 +1,10 @@
|
||||
[gd_resource type="SpineSkeletonDataResource" load_steps=3 format=2]
|
||||
|
||||
[ext_resource path="res://assets/raptor/raptor.atlas" type="SpineAtlasResource" id=1]
|
||||
[ext_resource path="res://assets/raptor/raptor-pro.skel" type="SpineSkeletonFileResource" id=2]
|
||||
|
||||
[resource]
|
||||
atlas_res = ExtResource( 1 )
|
||||
skeleton_file_res = ExtResource( 2 )
|
||||
animations = null
|
||||
skins = null
|
||||
13
spine-godot/example/assets/raptor/raptor-pro.skel.import
Normal file
13
spine-godot/example/assets/raptor/raptor-pro.skel.import
Normal file
@ -0,0 +1,13 @@
|
||||
[remap]
|
||||
|
||||
importer="spine.skel"
|
||||
type="SpineSkeletonFileResource"
|
||||
path="res://.import/raptor-pro.skel-022e23a5f5581547a2d7faa9fb2c54e3.spskel"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://assets/raptor/raptor-pro.skel"
|
||||
dest_files=[ "res://.import/raptor-pro.skel-022e23a5f5581547a2d7faa9fb2c54e3.spskel" ]
|
||||
|
||||
[params]
|
||||
|
||||
14
spine-godot/example/assets/raptor/raptor.atlas.import
Normal file
14
spine-godot/example/assets/raptor/raptor.atlas.import
Normal file
@ -0,0 +1,14 @@
|
||||
[remap]
|
||||
|
||||
importer="spine.atlas"
|
||||
type="SpineAtlasResource"
|
||||
path="res://.import/raptor.atlas-66da4b831eebf404341993162ba3ddb8.spatlas"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://assets/raptor/raptor.atlas"
|
||||
dest_files=[ "res://.import/raptor.atlas-66da4b831eebf404341993162ba3ddb8.spatlas" ]
|
||||
|
||||
[params]
|
||||
|
||||
normal_texture_prefix="n"
|
||||
|
Before Width: | Height: | Size: 411 KiB After Width: | Height: | Size: 411 KiB |
@ -2,15 +2,15 @@
|
||||
|
||||
importer="texture"
|
||||
type="StreamTexture"
|
||||
path="res://.import/raptor.png-420f3263481783832181f91be3310d7c.stex"
|
||||
path="res://.import/raptor.png-505be50f63fd1d0fb9175a9efbb9776c.stex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://raptor/raptor.png"
|
||||
dest_files=[ "res://.import/raptor.png-420f3263481783832181f91be3310d7c.stex" ]
|
||||
source_file="res://assets/raptor/raptor.png"
|
||||
dest_files=[ "res://.import/raptor.png-505be50f63fd1d0fb9175a9efbb9776c.stex" ]
|
||||
|
||||
[params]
|
||||
|
||||
10
spine-godot/example/assets/spineboy/spineboy-data.tres
Normal file
10
spine-godot/example/assets/spineboy/spineboy-data.tres
Normal file
@ -0,0 +1,10 @@
|
||||
[gd_resource type="SpineSkeletonDataResource" load_steps=3 format=2]
|
||||
|
||||
[ext_resource path="res://assets/spineboy/spineboy.atlas" type="SpineAtlasResource" id=1]
|
||||
[ext_resource path="res://assets/spineboy/spineboy-pro.json" type="SpineSkeletonFileResource" id=2]
|
||||
|
||||
[resource]
|
||||
atlas_res = ExtResource( 1 )
|
||||
skeleton_file_res = ExtResource( 2 )
|
||||
animations = null
|
||||
skins = null
|
||||
13
spine-godot/example/assets/spineboy/spineboy-pro.json.import
Normal file
13
spine-godot/example/assets/spineboy/spineboy-pro.json.import
Normal file
@ -0,0 +1,13 @@
|
||||
[remap]
|
||||
|
||||
importer="spine.json"
|
||||
type="SpineSkeletonFileResource"
|
||||
path="res://.import/spineboy-pro.json-60444223fe3960c6d4c33b92d7495419.spjson"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://assets/spineboy/spineboy-pro.json"
|
||||
dest_files=[ "res://.import/spineboy-pro.json-60444223fe3960c6d4c33b92d7495419.spjson" ]
|
||||
|
||||
[params]
|
||||
|
||||
13
spine-godot/example/assets/spineboy/spineboy-pro.skel.import
Normal file
13
spine-godot/example/assets/spineboy/spineboy-pro.skel.import
Normal file
@ -0,0 +1,13 @@
|
||||
[remap]
|
||||
|
||||
importer="spine.skel"
|
||||
type="SpineSkeletonFileResource"
|
||||
path="res://.import/spineboy-pro.skel-52781a88227740d2a80cb8d7636ea22e.spskel"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://assets/spineboy/spineboy-pro.skel"
|
||||
dest_files=[ "res://.import/spineboy-pro.skel-52781a88227740d2a80cb8d7636ea22e.spskel" ]
|
||||
|
||||
[params]
|
||||
|
||||
14
spine-godot/example/assets/spineboy/spineboy.atlas.import
Normal file
14
spine-godot/example/assets/spineboy/spineboy.atlas.import
Normal file
@ -0,0 +1,14 @@
|
||||
[remap]
|
||||
|
||||
importer="spine.atlas"
|
||||
type="SpineAtlasResource"
|
||||
path="res://.import/spineboy.atlas-54c12b5ff1cdaaa1b4e452a7d0d868c9.spatlas"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://assets/spineboy/spineboy.atlas"
|
||||
dest_files=[ "res://.import/spineboy.atlas-54c12b5ff1cdaaa1b4e452a7d0d868c9.spatlas" ]
|
||||
|
||||
[params]
|
||||
|
||||
normal_texture_prefix="n"
|
||||
|
Before Width: | Height: | Size: 238 KiB After Width: | Height: | Size: 238 KiB |
@ -2,15 +2,15 @@
|
||||
|
||||
importer="texture"
|
||||
type="StreamTexture"
|
||||
path="res://.import/spineboy.png-a63588ec3a5ca6e83ef256edf38d798a.stex"
|
||||
path="res://.import/spineboy.png-436dbd6da2b707b6828ede17b7871f43.stex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://spineboy/spineboy.png"
|
||||
dest_files=[ "res://.import/spineboy.png-a63588ec3a5ca6e83ef256edf38d798a.stex" ]
|
||||
source_file="res://assets/spineboy/spineboy.png"
|
||||
dest_files=[ "res://.import/spineboy.png-436dbd6da2b707b6828ede17b7871f43.stex" ]
|
||||
|
||||
[params]
|
||||
|
||||
@ -14,5 +14,5 @@ func _ready():
|
||||
customSkin.add_skin(data.find_skin("accessories/bag"))
|
||||
customSkin.add_skin(data.find_skin("accessories/hat-red-yellow"))
|
||||
get_skeleton().set_skin(customSkin);
|
||||
|
||||
|
||||
get_animation_state().set_animation("dance", true, 0)
|
||||
|
||||
@ -1,10 +0,0 @@
|
||||
[gd_resource type="SpineSkeletonDataResource" load_steps=3 format=2]
|
||||
|
||||
[ext_resource path="res://mix-and-match/mix-and-match.atlas" type="SpineAtlasResource" id=1]
|
||||
[ext_resource path="res://mix-and-match/mix-and-match-pro.json" type="SpineSkeletonFileResource" id=2]
|
||||
|
||||
[resource]
|
||||
atlas_res = ExtResource( 1 )
|
||||
skeleton_file_res = ExtResource( 2 )
|
||||
animations = null
|
||||
skins = null
|
||||
@ -1,13 +0,0 @@
|
||||
[remap]
|
||||
|
||||
importer="spine.json"
|
||||
type="SpineSkeletonFileResource"
|
||||
path="res://.import/mix-and-match-pro.json-5ca1b9fd6cb1c37bf492ced0be2e27b8.spjson"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://mix-and-match/mix-and-match-pro.json"
|
||||
dest_files=[ "res://.import/mix-and-match-pro.json-5ca1b9fd6cb1c37bf492ced0be2e27b8.spjson" ]
|
||||
|
||||
[params]
|
||||
|
||||
@ -1,14 +0,0 @@
|
||||
[remap]
|
||||
|
||||
importer="spine.atlas"
|
||||
type="SpineAtlasResource"
|
||||
path="res://.import/mix-and-match.atlas-0bbed47d1d8e8f4ac037195dc25c9fd9.spatlas"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://mix-and-match/mix-and-match.atlas"
|
||||
dest_files=[ "res://.import/mix-and-match.atlas-0bbed47d1d8e8f4ac037195dc25c9fd9.spatlas" ]
|
||||
|
||||
[params]
|
||||
|
||||
normal_texture_prefix="n"
|
||||
@ -1,10 +0,0 @@
|
||||
[gd_resource type="SpineSkeletonDataResource" load_steps=3 format=2]
|
||||
|
||||
[ext_resource path="res://raptor/raptor.atlas" type="SpineAtlasResource" id=1]
|
||||
[ext_resource path="res://raptor/raptor-pro.skel" type="SpineSkeletonFileResource" id=2]
|
||||
|
||||
[resource]
|
||||
atlas_res = ExtResource( 1 )
|
||||
skeleton_file_res = ExtResource( 2 )
|
||||
animations = null
|
||||
skins = null
|
||||
@ -1,13 +0,0 @@
|
||||
[remap]
|
||||
|
||||
importer="spine.skel"
|
||||
type="SpineSkeletonFileResource"
|
||||
path="res://.import/raptor-pro.skel-081da74993f6ecc0a4d44df29812228b.spskel"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://raptor/raptor-pro.skel"
|
||||
dest_files=[ "res://.import/raptor-pro.skel-081da74993f6ecc0a4d44df29812228b.spskel" ]
|
||||
|
||||
[params]
|
||||
|
||||
@ -1,14 +0,0 @@
|
||||
[remap]
|
||||
|
||||
importer="spine.atlas"
|
||||
type="SpineAtlasResource"
|
||||
path="res://.import/raptor.atlas-583a25d9ded86c934bc106fc3b7bf122.spatlas"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://raptor/raptor.atlas"
|
||||
dest_files=[ "res://.import/raptor.atlas-583a25d9ded86c934bc106fc3b7bf122.spatlas" ]
|
||||
|
||||
[params]
|
||||
|
||||
normal_texture_prefix="n"
|
||||
@ -1,10 +1,10 @@
|
||||
[gd_scene load_steps=9 format=2]
|
||||
|
||||
[ext_resource path="res://Spineboy.gd" type="Script" id=1]
|
||||
[ext_resource path="res://spineboy/spineboy-data.tres" type="SpineSkeletonDataResource" id=2]
|
||||
[ext_resource path="res://mix-and-match/mix-and-match-data.tres" type="SpineSkeletonDataResource" id=3]
|
||||
[ext_resource path="res://assets/spineboy/spineboy-data.tres" type="SpineSkeletonDataResource" id=2]
|
||||
[ext_resource path="res://assets/mix-and-match/mix-and-match-data.tres" type="SpineSkeletonDataResource" id=3]
|
||||
[ext_resource path="res://mix-and-match.gd" type="Script" id=5]
|
||||
[ext_resource path="res://raptor/raprot-data.tres" type="SpineSkeletonDataResource" id=6]
|
||||
[ext_resource path="res://assets/raptor/raprot-data.tres" type="SpineSkeletonDataResource" id=6]
|
||||
|
||||
[sub_resource type="SpineAnimationStateDataResource" id=2]
|
||||
skeleton = ExtResource( 2 )
|
||||
@ -29,7 +29,7 @@ scale = Vector2( 0.5, 0.5 )
|
||||
animation_state_data_res = SubResource( 3 )
|
||||
script = ExtResource( 5 )
|
||||
|
||||
[node name="SpineSprite" type="SpineSprite" parent="."]
|
||||
[node name="Raptor" type="SpineSprite" parent="."]
|
||||
position = Vector2( 261.223, 541.504 )
|
||||
scale = Vector2( 0.5, 0.5 )
|
||||
animation_state_data_res = SubResource( 5 )
|
||||
|
||||
@ -1,10 +0,0 @@
|
||||
[gd_resource type="SpineSkeletonDataResource" load_steps=3 format=2]
|
||||
|
||||
[ext_resource path="res://spineboy/spineboy.atlas" type="SpineAtlasResource" id=1]
|
||||
[ext_resource path="res://spineboy/spineboy-pro.json" type="SpineSkeletonFileResource" id=2]
|
||||
|
||||
[resource]
|
||||
atlas_res = ExtResource( 1 )
|
||||
skeleton_file_res = ExtResource( 2 )
|
||||
animations = null
|
||||
skins = null
|
||||
@ -1,13 +0,0 @@
|
||||
[remap]
|
||||
|
||||
importer="spine.json"
|
||||
type="SpineSkeletonFileResource"
|
||||
path="res://.import/spineboy-pro.json-32eeb9972a49130cf636442038541a01.spjson"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://spineboy/spineboy-pro.json"
|
||||
dest_files=[ "res://.import/spineboy-pro.json-32eeb9972a49130cf636442038541a01.spjson" ]
|
||||
|
||||
[params]
|
||||
|
||||
@ -1,13 +0,0 @@
|
||||
[remap]
|
||||
|
||||
importer="spine.skel"
|
||||
type="SpineSkeletonFileResource"
|
||||
path="res://.import/spineboy-pro.skel-88c7de1bbf310b7c70ac742b725847b2.spskel"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://spineboy/spineboy-pro.skel"
|
||||
dest_files=[ "res://.import/spineboy-pro.skel-88c7de1bbf310b7c70ac742b725847b2.spskel" ]
|
||||
|
||||
[params]
|
||||
|
||||
@ -1,14 +0,0 @@
|
||||
[remap]
|
||||
|
||||
importer="spine.atlas"
|
||||
type="SpineAtlasResource"
|
||||
path="res://.import/spineboy.atlas-0160ebf51649da264b83de15c13561f4.spatlas"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://spineboy/spineboy.atlas"
|
||||
dest_files=[ "res://.import/spineboy.atlas-0160ebf51649da264b83de15c13561f4.spatlas" ]
|
||||
|
||||
[params]
|
||||
|
||||
normal_texture_prefix="n"
|
||||
@ -1,7 +1,7 @@
|
||||
[gd_scene load_steps=56 format=2]
|
||||
|
||||
[ext_resource path="res://tests/unit-tests.gd" type="Script" id=1]
|
||||
[ext_resource path="res://spineboy/spineboy-data.tres" type="SpineSkeletonDataResource" id=2]
|
||||
[ext_resource path="res://assets/spineboy/spineboy-data.tres" type="SpineSkeletonDataResource" id=2]
|
||||
|
||||
[sub_resource type="SpineAnimationStateDataResource" id=1]
|
||||
skeleton = ExtResource( 2 )
|
||||
|
||||
@ -37,7 +37,7 @@ void SpineSprite::_bind_methods() {
|
||||
ClassDB::bind_method(D_METHOD("get_animation_state_data_res"), &SpineSprite::get_animation_state_data_res);
|
||||
ClassDB::bind_method(D_METHOD("_on_animation_data_created"), &SpineSprite::_on_animation_data_created);
|
||||
ClassDB::bind_method(D_METHOD("get_skeleton"), &SpineSprite::get_skeleton);
|
||||
ClassDB::bind_method(D_METHOD("get_spine_object"), &SpineSprite::get_animation_state);
|
||||
ClassDB::bind_method(D_METHOD("get_animation_state"), &SpineSprite::get_animation_state);
|
||||
ClassDB::bind_method(D_METHOD("_on_animation_data_changed"), &SpineSprite::_on_animation_data_changed);
|
||||
|
||||
ClassDB::bind_method(D_METHOD("get_bind_slot_nodes"), &SpineSprite::get_bind_slot_nodes);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user