From e7baae8e9c9017e003cdbac9ff54e1b6863fbe8c Mon Sep 17 00:00:00 2001 From: Thomas Lavocat Date: Sun, 4 Jun 2023 19:35:35 +0200 Subject: [PATCH] cubey: ajout du personnage Pour l'instant il ne sait rien faire tout seul, mais on pourra le coder dans le futur --- caracters/cubey.tscn | 90 +++++++++++++++++++++++++++++++++ sprite/cubey_walking.png.import | 34 +++++++++++++ 2 files changed, 124 insertions(+) create mode 100644 caracters/cubey.tscn create mode 100644 sprite/cubey_walking.png.import diff --git a/caracters/cubey.tscn b/caracters/cubey.tscn new file mode 100644 index 0000000..a0f1981 --- /dev/null +++ b/caracters/cubey.tscn @@ -0,0 +1,90 @@ +[gd_scene load_steps=12 format=3 uid="uid://q38h0apsm2fy"] + +[ext_resource type="Texture2D" uid="uid://cn2emsgmbno8i" path="res://sprite/cubey_walking.png" id="1_4m3bv"] + +[sub_resource type="AtlasTexture" id="AtlasTexture_v0wdq"] +atlas = ExtResource("1_4m3bv") +region = Rect2(0, 0, 24, 24) + +[sub_resource type="AtlasTexture" id="AtlasTexture_6d0aa"] +atlas = ExtResource("1_4m3bv") +region = Rect2(0, 96, 24, 24) + +[sub_resource type="AtlasTexture" id="AtlasTexture_8q6vi"] +atlas = ExtResource("1_4m3bv") +region = Rect2(0, 0, 24, 24) + +[sub_resource type="AtlasTexture" id="AtlasTexture_jg3yk"] +atlas = ExtResource("1_4m3bv") +region = Rect2(0, 24, 24, 24) + +[sub_resource type="AtlasTexture" id="AtlasTexture_fbodr"] +atlas = ExtResource("1_4m3bv") +region = Rect2(0, 48, 24, 24) + +[sub_resource type="AtlasTexture" id="AtlasTexture_grlpb"] +atlas = ExtResource("1_4m3bv") +region = Rect2(0, 72, 24, 24) + +[sub_resource type="AtlasTexture" id="AtlasTexture_pncho"] +atlas = ExtResource("1_4m3bv") +region = Rect2(0, 96, 24, 24) + +[sub_resource type="AtlasTexture" id="AtlasTexture_j0kil"] +atlas = ExtResource("1_4m3bv") +region = Rect2(0, 120, 24, 24) + +[sub_resource type="SpriteFrames" id="SpriteFrames_06qoc"] +animations = [{ +"frames": [{ +"duration": 1.0, +"texture": SubResource("AtlasTexture_v0wdq") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_6d0aa") +}], +"loop": true, +"name": &"idle", +"speed": 1.0 +}, { +"frames": [{ +"duration": 1.0, +"texture": SubResource("AtlasTexture_8q6vi") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_jg3yk") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_fbodr") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_grlpb") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_pncho") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_j0kil") +}], +"loop": true, +"name": &"walking", +"speed": 10.0 +}] + +[sub_resource type="CapsuleShape2D" id="CapsuleShape2D_pgu85"] +radius = 6.0 +height = 20.0 + +[node name="Cubey" type="Node2D"] + +[node name="CharacterBody2D" type="CharacterBody2D" parent="."] + +[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="CharacterBody2D"] +sprite_frames = SubResource("SpriteFrames_06qoc") +animation = &"idle" +autoplay = "idle" +frame_progress = 0.501787 + +[node name="CollisionShape2D" type="CollisionShape2D" parent="CharacterBody2D"] +position = Vector2(0, 2) +shape = SubResource("CapsuleShape2D_pgu85") diff --git a/sprite/cubey_walking.png.import b/sprite/cubey_walking.png.import new file mode 100644 index 0000000..e4b293d --- /dev/null +++ b/sprite/cubey_walking.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://cn2emsgmbno8i" +path="res://.godot/imported/cubey_walking.png-e14fe781f08e12dd2b24173063076c55.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://sprite/cubey_walking.png" +dest_files=["res://.godot/imported/cubey_walking.png-e14fe781f08e12dd2b24173063076c55.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1