Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 4 additions & 6 deletions README.ja.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,13 +67,11 @@

[examples フォルダ](./examples/) に SDK のテストプロジェクトに基づいたサンプルプロジェクトがあります。

- [Ringo](./examples/Ringo) — Ringo用のテスト
- [Ringo](./examples/Ringo) — Ringo用の基本クイックスタートテスト
- [Scripting](./examples/Scripting) — GDScriptを用いたアニメーション制御やシグナル受信のサンプル
- [allAttributeV7](./examples/allAttributeV7) — 全アトリビュートの機能テスト
- [allPartsV7](./examples/allPartsV7) — 全パーツ種の機能テスト
- [overall](./examples/overall) — 総合的な機能テスト
- [overall_gdextension](./examples/overall_gdextension) — GDExtension 版での総合テスト
- [ParticleEffect](./examples/ParticleEffect) — エフェクト機能のテスト
- [Override_Ringo](./examples/Override_Ringo) — アトリビュート・マテリアルのオーバーライドサンプル
- [overall](./examples/overall) — 総合的な機能テスト(カスタムモジュール版)
- [overall_gdextension](./examples/overall_gdextension) — 総合的な機能テスト(GDExtension版)

## 🔗 関連リポジトリ

Expand Down
10 changes: 4 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,13 +67,11 @@ For the data-flow diagram, key features, supported versions, and more, see the *

Sample projects based on SDK test projects are available under the [examples folder](./examples/).

- [Ringo](./examples/Ringo) — Test for Ringo
- [Ringo](./examples/Ringo) — Basic quickstart test for Ringo
- [Scripting](./examples/Scripting) — GDScript example for controlling animations and signals
- [allAttributeV7](./examples/allAttributeV7) — Functional test for all attributes
- [allPartsV7](./examples/allPartsV7) — Functional test for all part types
- [overall](./examples/overall) — Comprehensive functional test
- [overall_gdextension](./examples/overall_gdextension) — Comprehensive test for GDExtension
- [ParticleEffect](./examples/ParticleEffect) — Test for effect features
- [Override_Ringo](./examples/Override_Ringo) — Attribute/material override example
- [overall](./examples/overall) — Comprehensive functional test (Custom Module)
- [overall_gdextension](./examples/overall_gdextension) — Comprehensive functional test (GDExtension)

## 🔗 Related Repositories

Expand Down
11 changes: 5 additions & 6 deletions docs/en/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,12 +85,11 @@ Build and execution have been verified on Windows / macOS.

Sample projects based on SDK test projects are available under the `examples/` folder in the repository.

- [Ringo](https://github.com/cri-middleware/SSPlayerForGodot/tree/main/examples/Ringo) — Test for Ringo
- [allAttributeV7](https://github.com/cri-middleware/SSPlayerForGodot/tree/main/examples/allAttributeV7) — Functional test for all attributes
- [allPartsV7](https://github.com/cri-middleware/SSPlayerForGodot/tree/main/examples/allPartsV7) — Functional test for all part types
- [overall](https://github.com/cri-middleware/SSPlayerForGodot/tree/main/examples/overall) — Comprehensive functional test
- [overall_gdextension](https://github.com/cri-middleware/SSPlayerForGodot/tree/main/examples/overall_gdextension) — Comprehensive test for GDExtension
- [ParticleEffect](https://github.com/cri-middleware/SSPlayerForGodot/tree/main/examples/ParticleEffect) — Test for effect features
- [Ringo](https://github.com/cri-middleware/SSPlayerForGodot/tree/main/examples/Ringo) — Basic quickstart test for Ringo
- [Scripting](https://github.com/cri-middleware/SSPlayerForGodot/tree/main/examples/Scripting) — GDScript example for controlling animations and signals
- [Override_Ringo](https://github.com/cri-middleware/SSPlayerForGodot/tree/main/examples/Override_Ringo) — Attribute/material override example
- [overall](https://github.com/cri-middleware/SSPlayerForGodot/tree/main/examples/overall) — Comprehensive functional test (Custom Module)
- [overall_gdextension](https://github.com/cri-middleware/SSPlayerForGodot/tree/main/examples/overall_gdextension) — Comprehensive functional test (GDExtension)

## Related Repositories

Expand Down
11 changes: 5 additions & 6 deletions docs/ja/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,12 +85,11 @@ Windows / macOS でのビルドおよび実行を確認しています。

リポジトリの `examples/` フォルダに SDK のテストプロジェクトに基づいたサンプルプロジェクトがあります。

- [Ringo](https://github.com/cri-middleware/SSPlayerForGodot/tree/main/examples/Ringo) — 「りんご」のテスト
- [allAttributeV7](https://github.com/cri-middleware/SSPlayerForGodot/tree/main/examples/allAttributeV7) — 全属性の機能テスト
- [allPartsV7](https://github.com/cri-middleware/SSPlayerForGodot/tree/main/examples/allPartsV7) — 全パーツ種の機能テスト
- [overall](https://github.com/cri-middleware/SSPlayerForGodot/tree/main/examples/overall) — 総合的な機能テスト
- [overall_gdextension](https://github.com/cri-middleware/SSPlayerForGodot/tree/main/examples/overall_gdextension) — GDExtension 版での総合テスト
- [ParticleEffect](https://github.com/cri-middleware/SSPlayerForGodot/tree/main/examples/ParticleEffect) — エフェクト機能のテスト
- [Ringo](https://github.com/cri-middleware/SSPlayerForGodot/tree/main/examples/Ringo) — Ringo用の基本クイックスタートテスト
- [Scripting](https://github.com/cri-middleware/SSPlayerForGodot/tree/main/examples/Scripting) — GDScriptを用いたアニメーション制御やシグナル受信のサンプル
- [Override_Ringo](https://github.com/cri-middleware/SSPlayerForGodot/tree/main/examples/Override_Ringo) — アトリビュート・マテリアルのオーバーライドサンプル
- [overall](https://github.com/cri-middleware/SSPlayerForGodot/tree/main/examples/overall) — 総合的な機能テスト(カスタムモジュール版)
- [overall_gdextension](https://github.com/cri-middleware/SSPlayerForGodot/tree/main/examples/overall_gdextension) — 総合的な機能テスト(GDExtension版)

## 関連リポジトリ

Expand Down
47 changes: 0 additions & 47 deletions examples/ParticleEffect/.ssplayer_sources.cfg

This file was deleted.

14 changes: 0 additions & 14 deletions examples/ParticleEffect/e001.tscn

This file was deleted.

3 changes: 0 additions & 3 deletions examples/ParticleEffect/icon.svg

This file was deleted.

43 changes: 0 additions & 43 deletions examples/ParticleEffect/icon.svg.import

This file was deleted.

10 changes: 0 additions & 10 deletions examples/ParticleEffect/node_2d.tscn

This file was deleted.

28 changes: 0 additions & 28 deletions examples/ParticleEffect/project.godot

This file was deleted.

33 changes: 24 additions & 9 deletions examples/Scripting/Main.gd
Original file line number Diff line number Diff line change
@@ -1,23 +1,25 @@
extends Node2D

@onready var player = $Ringo
@onready var label = $Label
@onready var player: SpriteStudioPlayer2D = $Ringo
@onready var label: Label = $Label

var anims = ["attack1", "walk", "wait"]
var current_anim_index = 0

func _ready() -> void:
# Connect to SpriteStudioPlayer2D signals
# Connect to SpriteStudioPlayer2D signals to demonstrate script control
player.animation_started.connect(_on_animation_started)
player.animation_finished.connect(_on_animation_finished)
# If the animation contains user data, you can catch it here:
# player.user_data.connect(_on_user_data)
player.animation_looped.connect(_on_animation_looped)
player.signal_emitted.connect(_on_signal_emitted)
player.user_data.connect(_on_user_data)

play_current()
update_label()

func _input(event: InputEvent) -> void:
# Change animation on Click or Enter
if event.is_action_pressed("ui_accept") or (event is InputEventMouseButton and event.pressed):
# Change animation on Left Click or Enter / Space
if event.is_action_pressed("ui_accept") or (event is InputEventMouseButton and event.pressed and event.button_index == MOUSE_BUTTON_LEFT):
current_anim_index = (current_anim_index + 1) % anims.size()
play_current()
update_label()
Expand All @@ -37,16 +39,29 @@ func _input(event: InputEvent) -> void:
func play_current() -> void:
var anim_name = anims[current_anim_index]
player.animation = anim_name
player.playing = true
player.play()

func update_label() -> void:
if label:
label.text = "--- SpriteStudioPlayer2D GDScript Example ---\n\n"
label.text += "Click or Press Enter: Change Animation\n"
label.text += "Click or Press Enter/Space: Change Animation\n"
label.text += "Up/Down Arrows: Change Speed\n"
label.text += "Right Arrow: Flip Horizontal\n\n"
label.text += "Current Animation: " + player.animation + "\n"
label.text += "Speed Scale: " + str(player.speed_scale) + "\n"

func _on_animation_started(anim_name: String) -> void:
print("Animation started: ", anim_name)

func _on_animation_finished(anim_name: String) -> void:
print("Animation finished: ", anim_name)

func _on_animation_looped(anim_name: String) -> void:
print("Animation looped: ", anim_name)

func _on_signal_emitted(command: String, value: Dictionary) -> void:
print("Signal emitted: ", command, " value: ", value)

func _on_user_data(payload: Dictionary) -> void:
print("User data: ", payload)

1 change: 1 addition & 0 deletions examples/Scripting/Main.gd.uid
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
uid://b3cq851ps63hy
17 changes: 9 additions & 8 deletions examples/Scripting/Ringo.tscn
Original file line number Diff line number Diff line change
@@ -1,19 +1,20 @@
[gd_scene load_steps=3 format=3 uid="uid://dxr71lkltwqb6"]
[gd_scene format=3 uid="uid://dxr71lkltwqb6"]

[ext_resource type="SSABResource" uid="uid://cmjtnhtns0pal" path="res://ssab_generated/Ringo/Ringo.ssab" id="1_w6qk1"]
[ext_resource type="Script" path="res://Main.gd" id="2_script"]
[ext_resource type="SSABResource" uid="uid://8gkvbx11moo7" path="res://ssab_generated/Ringo/Ringo.ssab" id="1_w6qk1"]
[ext_resource type="Script" uid="uid://b3cq851ps63hy" path="res://Main.gd" id="2_script"]

[node name="Node2D" type="Node2D"]
[node name="Node2D" type="Node2D" unique_id=1253394950]
script = ExtResource("2_script")

[node name="Ringo" type="SpriteStudioPlayer2D" parent="."]
position = Vector2(400, 300)
[node name="Ringo" type="SpriteStudioPlayer2D" parent="." unique_id=318940931]
position = Vector2(560, 567)
ssab = ExtResource("1_w6qk1")
animation = "attack1"
playing = true
sub_frame_enabled = true
animation_section_end = 19
cellmaps/Ringo = null

[node name="Label" type="Label" parent="."]
[node name="Label" type="Label" parent="." unique_id=1577769087]
offset_left = 30.0
offset_top = 30.0
offset_right = 400.0
Expand Down
Loading
Loading