fragola and bullet

This commit is contained in:
MaddoScientisto 2024-02-26 23:45:20 +01:00
commit b7fb003b70
14 changed files with 383 additions and 53 deletions

16
Scenes/bullet.tscn Normal file
View file

@ -0,0 +1,16 @@
[gd_scene load_steps=3 format=3 uid="uid://b1qnfiuokpvsr"]
[ext_resource type="Texture2D" uid="uid://cybpmpb0d8yva" path="res://Sprites/Projectile.png" id="1_2eu87"]
[sub_resource type="CircleShape2D" id="CircleShape2D_jxptd"]
radius = 2.23607
[node name="Bullet" type="Node2D"]
[node name="RigidBody2D" type="RigidBody2D" parent="."]
[node name="Sprite2D" type="Sprite2D" parent="RigidBody2D"]
texture = ExtResource("1_2eu87")
[node name="CollisionShape2D" type="CollisionShape2D" parent="RigidBody2D"]
shape = SubResource("CircleShape2D_jxptd")

79
Scenes/fragola.tscn Normal file
View file

@ -0,0 +1,79 @@
[gd_scene load_steps=10 format=3 uid="uid://rp4jhx0tuh24"]
[ext_resource type="Texture2D" uid="uid://cy5usvdeabi0t" path="res://Sprites/fragola.png" id="1_5wy11"]
[sub_resource type="AtlasTexture" id="AtlasTexture_j6kkb"]
atlas = ExtResource("1_5wy11")
region = Rect2(0, 0, 16, 16)
[sub_resource type="AtlasTexture" id="AtlasTexture_ahsj2"]
atlas = ExtResource("1_5wy11")
region = Rect2(16, 0, 16, 16)
[sub_resource type="AtlasTexture" id="AtlasTexture_b3l4k"]
atlas = ExtResource("1_5wy11")
region = Rect2(32, 0, 16, 16)
[sub_resource type="AtlasTexture" id="AtlasTexture_ignt2"]
atlas = ExtResource("1_5wy11")
region = Rect2(48, 0, 16, 16)
[sub_resource type="AtlasTexture" id="AtlasTexture_aqfk6"]
atlas = ExtResource("1_5wy11")
region = Rect2(64, 0, 16, 16)
[sub_resource type="AtlasTexture" id="AtlasTexture_rbhio"]
atlas = ExtResource("1_5wy11")
region = Rect2(80, 0, 16, 16)
[sub_resource type="SpriteFrames" id="SpriteFrames_7uyln"]
animations = [{
"frames": [{
"duration": 1.0,
"texture": SubResource("AtlasTexture_j6kkb")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_ahsj2")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_b3l4k")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_ignt2")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_aqfk6")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_rbhio")
}],
"loop": true,
"name": &"explode",
"speed": 5.0
}, {
"frames": [{
"duration": 1.0,
"texture": SubResource("AtlasTexture_j6kkb")
}],
"loop": true,
"name": &"idle",
"speed": 5.0
}]
[sub_resource type="CircleShape2D" id="CircleShape2D_bbnjh"]
radius = 7.0
[node name="Fragola" type="Node2D"]
[node name="Fragola" type="RigidBody2D" parent="."]
collision_layer = 4
collision_mask = 7
mass = 0.03
gravity_scale = 0.0
[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="Fragola"]
sprite_frames = SubResource("SpriteFrames_7uyln")
animation = &"idle"
[node name="CollisionShape2D" type="CollisionShape2D" parent="Fragola"]
shape = SubResource("CircleShape2D_bbnjh")

View file

@ -1,31 +1,74 @@
[gd_scene load_steps=21 format=3 uid="uid://bv451a8wgty4u"]
[gd_scene load_steps=25 format=3 uid="uid://bv451a8wgty4u"]
[ext_resource type="Script" path="res://Scripts/PlayerMovement.cs" id="1_fwei5"]
[ext_resource type="Texture2D" uid="uid://dowueaq2rixdk" path="res://Sprites/Cirno2.0.png" id="2_uhufh"]
[ext_resource type="Texture2D" uid="uid://c6yjjxhp2hj1d" path="res://Sprites/Cirno2.1.png" id="3_bixcs"]
[ext_resource type="Texture2D" uid="uid://dhxr6y4318myo" path="res://Sprites/Cirno2.2.png" id="4_mwt28"]
[ext_resource type="Texture2D" uid="uid://7cvh3mmocc5v" path="res://Sprites/Cirno2.3.png" id="5_04174"]
[ext_resource type="Texture2D" uid="uid://cgv3cvw3jpjbm" path="res://Sprites/Cirno2.8.png" id="6_oy6vt"]
[ext_resource type="Texture2D" uid="uid://sficqk0a81pa" path="res://Sprites/Cirno2.9.png" id="7_5fs74"]
[ext_resource type="Texture2D" uid="uid://bc8ayjrtm7gj0" path="res://Sprites/Cirno2.10.png" id="8_klw6k"]
[ext_resource type="Texture2D" uid="uid://1ssa5a3of3ev" path="res://Sprites/Cirno2.11.png" id="9_72uad"]
[ext_resource type="Texture2D" uid="uid://dllmicsylbi43" path="res://Sprites/Cirno2.4.png" id="10_3pt04"]
[ext_resource type="Texture2D" uid="uid://gv36lxe1yg1u" path="res://Sprites/Cirno2.5.png" id="11_a2fi2"]
[ext_resource type="Texture2D" uid="uid://br4sks70xogjv" path="res://Sprites/Cirno2.6.png" id="12_ej2t4"]
[ext_resource type="Texture2D" uid="uid://crty86347gh4f" path="res://Sprites/Cirno2.7.png" id="13_kvwm8"]
[ext_resource type="Texture2D" uid="uid://ibn5d1fal13g" path="res://Sprites/Cirno2.12.png" id="14_e1x71"]
[ext_resource type="Texture2D" uid="uid://bulqenrcafawr" path="res://Sprites/Cirno2.13.png" id="15_dx3o0"]
[ext_resource type="Texture2D" uid="uid://cu8yj5f0r0hq0" path="res://Sprites/Cirno2.14.png" id="16_gcac2"]
[ext_resource type="Texture2D" uid="uid://dgnbwg4my1jfe" path="res://Sprites/Cirno2.15.png" id="17_et2yp"]
[ext_resource type="Texture2D" uid="uid://la06powu57hu" path="res://Sprites/Cirno_Big.png" id="2_7wt5q"]
[ext_resource type="PackedScene" uid="uid://b1qnfiuokpvsr" path="res://Scenes/bullet.tscn" id="4_nwkfm"]
[ext_resource type="PackedScene" uid="uid://rp4jhx0tuh24" path="res://Scenes/fragola.tscn" id="4_s7wq6"]
[sub_resource type="AtlasTexture" id="AtlasTexture_46wey"]
atlas = ExtResource("2_7wt5q")
region = Rect2(0, 0, 8, 16)
[sub_resource type="RectangleShape2D" id="RectangleShape2D_2gpmr"]
size = Vector2(6, 8)
[sub_resource type="AtlasTexture" id="AtlasTexture_pdst4"]
atlas = ExtResource("2_7wt5q")
region = Rect2(0, 0, 8, 16)
[sub_resource type="AtlasTexture" id="AtlasTexture_s7dqe"]
atlas = ExtResource("2_7wt5q")
region = Rect2(0, 0, 8, 16)
[sub_resource type="AtlasTexture" id="AtlasTexture_irmjj"]
atlas = ExtResource("2_7wt5q")
region = Rect2(8, 0, 8, 16)
[sub_resource type="AtlasTexture" id="AtlasTexture_chuua"]
atlas = ExtResource("2_7wt5q")
region = Rect2(16, 0, 8, 16)
[sub_resource type="AtlasTexture" id="AtlasTexture_nhxfa"]
atlas = ExtResource("2_7wt5q")
region = Rect2(0, 32, 8, 16)
[sub_resource type="AtlasTexture" id="AtlasTexture_tnyrl"]
atlas = ExtResource("2_7wt5q")
region = Rect2(8, 32, 8, 16)
[sub_resource type="AtlasTexture" id="AtlasTexture_awe4i"]
atlas = ExtResource("2_7wt5q")
region = Rect2(16, 32, 8, 16)
[sub_resource type="AtlasTexture" id="AtlasTexture_n0dww"]
atlas = ExtResource("2_7wt5q")
region = Rect2(0, 48, 8, 16)
[sub_resource type="AtlasTexture" id="AtlasTexture_pq4ul"]
atlas = ExtResource("2_7wt5q")
region = Rect2(8, 48, 8, 16)
[sub_resource type="AtlasTexture" id="AtlasTexture_w3vni"]
atlas = ExtResource("2_7wt5q")
region = Rect2(16, 48, 8, 16)
[sub_resource type="AtlasTexture" id="AtlasTexture_kg1c7"]
atlas = ExtResource("2_7wt5q")
region = Rect2(0, 16, 8, 16)
[sub_resource type="AtlasTexture" id="AtlasTexture_qe0jv"]
atlas = ExtResource("2_7wt5q")
region = Rect2(8, 16, 8, 16)
[sub_resource type="AtlasTexture" id="AtlasTexture_6pgul"]
atlas = ExtResource("2_7wt5q")
region = Rect2(16, 16, 8, 16)
[sub_resource type="SpriteFrames" id="SpriteFrames_ur7bf"]
animations = [{
"frames": [{
"duration": 1.0,
"texture": ExtResource("2_uhufh")
"texture": SubResource("AtlasTexture_pdst4")
}],
"loop": true,
"name": &"idle",
@ -33,16 +76,13 @@ animations = [{
}, {
"frames": [{
"duration": 1.0,
"texture": ExtResource("2_uhufh")
"texture": SubResource("AtlasTexture_s7dqe")
}, {
"duration": 1.0,
"texture": ExtResource("3_bixcs")
"texture": SubResource("AtlasTexture_irmjj")
}, {
"duration": 1.0,
"texture": ExtResource("4_mwt28")
}, {
"duration": 1.0,
"texture": ExtResource("5_04174")
"texture": SubResource("AtlasTexture_chuua")
}],
"loop": true,
"name": &"walk_down",
@ -50,16 +90,13 @@ animations = [{
}, {
"frames": [{
"duration": 1.0,
"texture": ExtResource("6_oy6vt")
"texture": SubResource("AtlasTexture_nhxfa")
}, {
"duration": 1.0,
"texture": ExtResource("7_5fs74")
"texture": SubResource("AtlasTexture_tnyrl")
}, {
"duration": 1.0,
"texture": ExtResource("8_klw6k")
}, {
"duration": 1.0,
"texture": ExtResource("9_72uad")
"texture": SubResource("AtlasTexture_awe4i")
}],
"loop": true,
"name": &"walk_left",
@ -67,16 +104,13 @@ animations = [{
}, {
"frames": [{
"duration": 1.0,
"texture": ExtResource("10_3pt04")
"texture": SubResource("AtlasTexture_n0dww")
}, {
"duration": 1.0,
"texture": ExtResource("11_a2fi2")
"texture": SubResource("AtlasTexture_pq4ul")
}, {
"duration": 1.0,
"texture": ExtResource("12_ej2t4")
}, {
"duration": 1.0,
"texture": ExtResource("13_kvwm8")
"texture": SubResource("AtlasTexture_w3vni")
}],
"loop": true,
"name": &"walk_right",
@ -84,16 +118,13 @@ animations = [{
}, {
"frames": [{
"duration": 1.0,
"texture": ExtResource("14_e1x71")
"texture": SubResource("AtlasTexture_kg1c7")
}, {
"duration": 1.0,
"texture": ExtResource("15_dx3o0")
"texture": SubResource("AtlasTexture_qe0jv")
}, {
"duration": 1.0,
"texture": ExtResource("16_gcac2")
}, {
"duration": 1.0,
"texture": ExtResource("17_et2yp")
"texture": SubResource("AtlasTexture_6pgul")
}],
"loop": true,
"name": &"walk_up",
@ -103,25 +134,44 @@ animations = [{
[sub_resource type="RectangleShape2D" id="RectangleShape2D_qui05"]
size = Vector2(20, 153)
[sub_resource type="RectangleShape2D" id="RectangleShape2D_v0c0p"]
size = Vector2(141, 13)
[sub_resource type="RectangleShape2D" id="RectangleShape2D_5ir3o"]
size = Vector2(9, 70)
[sub_resource type="RectangleShape2D" id="RectangleShape2D_e3rcm"]
size = Vector2(134, 7)
[node name="Node2D" type="Node2D"]
position = Vector2(38, 39)
[node name="CharacterBody2D" type="CharacterBody2D" parent="."]
[node name="Polygon2D" type="Polygon2D" parent="."]
position = Vector2(41, -4.31633)
scale = Vector2(1, 1.23469)
color = Color(0.278431, 0.8, 0.396078, 1)
polygon = PackedVector2Array(95, 57, 46, 58, -83, 61, -91, -37, 88, -37, 114, -1)
[node name="Player" type="CharacterBody2D" parent="."]
collision_layer = 2
collision_mask = 3
script = ExtResource("1_fwei5")
Speed = 1600
Speed = 1800
[node name="Sprite2D" type="Sprite2D" parent="CharacterBody2D"]
[node name="Sprite2D" type="Sprite2D" parent="Player"]
visible = false
texture = ExtResource("2_uhufh")
scale = Vector2(2.5, 1.75)
texture = SubResource("AtlasTexture_46wey")
hframes = 3
vframes = 4
frame = 1
[node name="CollisionShape2D" type="CollisionShape2D" parent="CharacterBody2D"]
[node name="CollisionShape2D" type="CollisionShape2D" parent="Player"]
shape = SubResource("RectangleShape2D_2gpmr")
[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="CharacterBody2D"]
[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="Player"]
sprite_frames = SubResource("SpriteFrames_ur7bf")
animation = &"walk_down"
frame = 1
frame_progress = 0.964336
animation = &"walk_left"
[node name="StaticBody2D" type="StaticBody2D" parent="."]
@ -130,4 +180,26 @@ position = Vector2(113, 54.5)
shape = SubResource("RectangleShape2D_qui05")
[node name="Polygon2D" type="Polygon2D" parent="StaticBody2D"]
position = Vector2(0, -14.5556)
scale = Vector2(1, 1.11111)
polygon = PackedVector2Array(103, -21, 123, -22, 122, 131, 105, 131)
[node name="Muro 2" type="StaticBody2D" parent="."]
[node name="CollisionShape2D" type="CollisionShape2D" parent="Muro 2"]
position = Vector2(32.5, 37.5)
shape = SubResource("RectangleShape2D_v0c0p")
[node name="CollisionShape2D2" type="CollisionShape2D" parent="Muro 2"]
position = Vector2(-34.5, -4)
shape = SubResource("RectangleShape2D_5ir3o")
[node name="CollisionShape2D3" type="CollisionShape2D" parent="Muro 2"]
position = Vector2(37, -35.5)
shape = SubResource("RectangleShape2D_e3rcm")
[node name="Bullet" parent="." instance=ExtResource("4_nwkfm")]
position = Vector2(36, 2)
[node name="Fragola" parent="." instance=ExtResource("4_s7wq6")]
position = Vector2(62, 10)