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/Elephant.tscn | 94 ++++++++++++++++++++++++++++++------------------ 1 file changed, 59 insertions(+), 35 deletions(-) (limited to 'Characters/Elephant.tscn') diff --git a/Characters/Elephant.tscn b/Characters/Elephant.tscn index 5c41e9d..d0f9c73 100644 --- a/Characters/Elephant.tscn +++ b/Characters/Elephant.tscn @@ -1,58 +1,82 @@ -[gd_scene load_steps=10 format=2] +[gd_scene load_steps=10 format=3 uid="uid://ba3do2dhi2m65"] -[ext_resource path="res://Characters/Tux.gd" type="Script" id=1] -[ext_resource path="res://Assets/Characters/Elephant/Walk2.png" type="Texture" id=2] -[ext_resource path="res://Assets/Characters/Elephant/Walk1.png" type="Texture" id=3] -[ext_resource path="res://Assets/Characters/Elephant/Back.png" type="Texture" id=4] -[ext_resource path="res://Assets/Characters/Elephant/Front.png" type="Texture" id=5] -[ext_resource path="res://Assets/Characters/Elephant/Wall.png" type="Texture" id=6] -[ext_resource path="res://Assets/Characters/Elephant/Jump.png" type="Texture" id=7] +[ext_resource type="Script" path="res://Characters/Tux.gd" id="1"] +[ext_resource type="Texture2D" uid="uid://b1ubrkswjkmg4" path="res://Assets/Characters/Elephant/Walk2.png" id="2"] +[ext_resource type="Texture2D" uid="uid://dhfj50q47tmr5" path="res://Assets/Characters/Elephant/Walk1.png" id="3"] +[ext_resource type="Texture2D" uid="uid://dggbekqiasbvp" path="res://Assets/Characters/Elephant/Back.png" id="4"] +[ext_resource type="Texture2D" uid="uid://bfr2ek0h8rveb" path="res://Assets/Characters/Elephant/Front.png" id="5"] +[ext_resource type="Texture2D" uid="uid://47xb7truren2" path="res://Assets/Characters/Elephant/Wall.png" id="6"] +[ext_resource type="Texture2D" uid="uid://cx8mq4nhpgn07" path="res://Assets/Characters/Elephant/Jump.png" id="7"] -[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( 5 ) ], +"frames": [{ +"duration": 1.0, +"texture": ExtResource("5") +}], "loop": true, -"name": "idle", +"name": &"idle", "speed": 5.0 }, { -"frames": [ ExtResource( 7 ) ], +"frames": [{ +"duration": 1.0, +"texture": ExtResource("7") +}], "loop": true, -"name": "jump", +"name": &"jump", "speed": 5.0 }, { -"frames": [ ExtResource( 6 ) ], +"frames": [{ +"duration": 1.0, +"texture": ExtResource("3") +}, { +"duration": 1.0, +"texture": ExtResource("2") +}], "loop": true, -"name": "wall", -"speed": 5.0 +"name": &"run", +"speed": 10.0 }, { -"frames": [ ExtResource( 3 ), ExtResource( 2 ) ], +"frames": [{ +"duration": 1.0, +"texture": ExtResource("3") +}, { +"duration": 1.0, +"texture": ExtResource("2") +}], "loop": true, -"name": "walk", +"name": &"walk", "speed": 5.0 }, { -"frames": [ ExtResource( 3 ), ExtResource( 2 ) ], +"frames": [{ +"duration": 1.0, +"texture": ExtResource("6") +}], "loop": true, -"name": "run", -"speed": 10.0 -} ] +"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, 17) -[node name="Elephant" type="KinematicBody2D"] +[node name="Elephant" 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, 1.5) +shape = SubResource("2") -- cgit v1.2.3