From 395c25b1fbe51f42decf402f97e51eabcc8c0a77 Mon Sep 17 00:00:00 2001 From: Daniel Weipert Date: Sun, 18 Jun 2023 16:43:22 +0200 Subject: Godot v3 -> v4 --- Characters/Duck.tscn | 124 +++++++++++++++++++++++++++++++-------------------- 1 file changed, 76 insertions(+), 48 deletions(-) (limited to 'Characters/Duck.tscn') diff --git a/Characters/Duck.tscn b/Characters/Duck.tscn index ef675d6..ea974d8 100644 --- a/Characters/Duck.tscn +++ b/Characters/Duck.tscn @@ -1,84 +1,112 @@ -[gd_scene load_steps=14 format=2] +[gd_scene load_steps=14 format=3 uid="uid://c5yfg1f4bgg52"] -[ext_resource path="res://Characters/Duck.gd" type="Script" id=1] -[ext_resource path="res://Assets/Characters/Duck/Fall1.png" type="Texture" id=2] -[ext_resource path="res://Assets/Characters/Duck/Slide.png" type="Texture" id=3] -[ext_resource path="res://Assets/Characters/Duck/Back.png" type="Texture" id=4] -[ext_resource path="res://Assets/Characters/Duck/Fall2Wings.png" type="Texture" id=5] -[ext_resource path="res://Assets/Characters/Duck/Wall.png" type="Texture" id=6] -[ext_resource path="res://Assets/Characters/Duck/Jump.png" type="Texture" id=7] -[ext_resource path="res://Assets/Characters/Duck/Walk2.png" type="Texture" id=8] -[ext_resource path="res://Assets/Characters/Duck/Walk1.png" type="Texture" id=9] -[ext_resource path="res://Assets/Characters/Duck/Fall1Wings.png" type="Texture" id=10] -[ext_resource path="res://Assets/Characters/Duck/Front.png" type="Texture" id=11] +[ext_resource type="Script" path="res://Characters/Duck.gd" id="1"] +[ext_resource type="Texture2D" uid="uid://1x88sprpx053" path="res://Assets/Characters/Duck/Fall1.png" id="2"] +[ext_resource type="Texture2D" uid="uid://bpw7aneapgwfr" path="res://Assets/Characters/Duck/Slide.png" id="3"] +[ext_resource type="Texture2D" uid="uid://cektwmgi1dspp" path="res://Assets/Characters/Duck/Back.png" id="4"] +[ext_resource type="Texture2D" uid="uid://cpyt71toxyag4" path="res://Assets/Characters/Duck/Fall2Wings.png" id="5"] +[ext_resource type="Texture2D" uid="uid://bgvorvxaiccfj" path="res://Assets/Characters/Duck/Wall.png" id="6"] +[ext_resource type="Texture2D" uid="uid://dfk20nuratgte" path="res://Assets/Characters/Duck/Jump.png" id="7"] +[ext_resource type="Texture2D" uid="uid://dn1xecq7vx3tm" path="res://Assets/Characters/Duck/Walk2.png" id="8"] +[ext_resource type="Texture2D" uid="uid://bekcxwxti2d8r" path="res://Assets/Characters/Duck/Walk1.png" id="9"] +[ext_resource type="Texture2D" uid="uid://cdfbqwj76p8rg" path="res://Assets/Characters/Duck/Fall1Wings.png" id="10"] +[ext_resource type="Texture2D" uid="uid://dibcyc08wpu0a" path="res://Assets/Characters/Duck/Front.png" id="11"] -[sub_resource type="SpriteFrames" id=1] -animations = [ { -"frames": [ ExtResource( 4 ) ], +[sub_resource type="SpriteFrames" id="1"] +animations = [{ +"frames": [{ +"duration": 1.0, +"texture": ExtResource("4") +}], "loop": true, -"name": "back", +"name": &"back", "speed": 5.0 }, { -"frames": [ ExtResource( 11 ) ], +"frames": [{ +"duration": 1.0, +"texture": ExtResource("2") +}], "loop": true, -"name": "idle", +"name": &"fall", "speed": 5.0 }, { -"frames": [ ExtResource( 7 ) ], -"loop": true, -"name": "jump", +"frames": [{ +"duration": 1.0, +"texture": ExtResource("10") +}], +"loop": false, +"name": &"fall_stop", "speed": 5.0 }, { -"frames": [ ExtResource( 9 ), ExtResource( 8 ) ], +"frames": [{ +"duration": 1.0, +"texture": ExtResource("5") +}], "loop": true, -"name": "walk", +"name": &"fall_stop_landing", "speed": 5.0 }, { -"frames": [ ExtResource( 5 ) ], +"frames": [{ +"duration": 1.0, +"texture": ExtResource("11") +}], "loop": true, -"name": "fall_stop_landing", +"name": &"idle", "speed": 5.0 }, { -"frames": [ ExtResource( 3 ) ], +"frames": [{ +"duration": 1.0, +"texture": ExtResource("7") +}], "loop": true, -"name": "run", +"name": &"jump", "speed": 5.0 }, { -"frames": [ ExtResource( 2 ) ], +"frames": [{ +"duration": 1.0, +"texture": ExtResource("3") +}], "loop": true, -"name": "fall", +"name": &"run", "speed": 5.0 }, { -"frames": [ ExtResource( 10 ) ], -"loop": false, -"name": "fall_stop", +"frames": [{ +"duration": 1.0, +"texture": ExtResource("9") +}, { +"duration": 1.0, +"texture": ExtResource("8") +}], +"loop": true, +"name": &"walk", "speed": 5.0 }, { -"frames": [ ExtResource( 6 ) ], +"frames": [{ +"duration": 1.0, +"texture": ExtResource("6") +}], "loop": true, -"name": "wall", +"name": &"wall", "speed": 5.0 -} ] +}] -[sub_resource type="RectangleShape2D" id=2] -extents = Vector2( 9.21901, 11.2317 ) +[sub_resource type="RectangleShape2D" id="2"] +size = Vector2(12, 19) -[node name="Duck" type="KinematicBody2D"] +[node name="Duck" type="CharacterBody2D"] collision_mask = 15 -script = ExtResource( 1 ) +script = ExtResource("1") -[node name="Sprite" type="AnimatedSprite" parent="."] -scale = Vector2( 0.7, 0.7 ) -frames = SubResource( 1 ) -animation = "idle" -playing = true +[node name="Sprite2D" type="AnimatedSprite2D" parent="."] +scale = Vector2(0.7, 0.7) +sprite_frames = SubResource("1") +animation = &"idle" [node name="CollisionShape2D" type="CollisionShape2D" parent="."] -shape = SubResource( 2 ) +position = Vector2(2.38419e-07, 0.5) +shape = SubResource("2") [node name="CheckFallStop" type="RayCast2D" parent="."] -enabled = true -cast_to = Vector2( 0, 150 ) +target_position = Vector2(0, 150) [node name="CheckFallLanding" type="RayCast2D" parent="."] -enabled = true -- cgit v1.2.3