niveau_0: ajouter des lumières!
Le niveau 0 a maintenant des lumières. Rajout des torches et des fenêtres.
This commit is contained in:
24
items/fenêtre.tscn
Normal file
24
items/fenêtre.tscn
Normal file
@@ -0,0 +1,24 @@
|
||||
[gd_scene load_steps=3 format=3 uid="uid://cikp03d4p47s3"]
|
||||
|
||||
[ext_resource type="Texture2D" uid="uid://dgsn3ixn46anc" path="res://sprite/light.png" id="1_vhw6h"]
|
||||
|
||||
[sub_resource type="OccluderPolygon2D" id="OccluderPolygon2D_vi24c"]
|
||||
polygon = PackedVector2Array(1, -5, -16, 11, -16, 64, -15, 64, -15, 11, 1, -4, 17, 11, 17, 64, 18, 64, 18, 11)
|
||||
|
||||
[node name="Fenêtre" type="Node2D"]
|
||||
position = Vector2(-95, -154)
|
||||
|
||||
[node name="PointLight2D" type="PointLight2D" parent="."]
|
||||
position = Vector2(-1, -31)
|
||||
scale = Vector2(0.0587078, 0.0472203)
|
||||
energy = 1.63
|
||||
blend_mode = 2
|
||||
shadow_enabled = true
|
||||
shadow_filter = 1
|
||||
shadow_filter_smooth = 11.0
|
||||
texture = ExtResource("1_vhw6h")
|
||||
texture_scale = 5.5
|
||||
|
||||
[node name="LightOccluder2D" type="LightOccluder2D" parent="."]
|
||||
position = Vector2(-2, -34)
|
||||
occluder = SubResource("OccluderPolygon2D_vi24c")
|
||||
7
items/torche.gd
Normal file
7
items/torche.gd
Normal file
@@ -0,0 +1,7 @@
|
||||
extends Node2D
|
||||
|
||||
@onready var anim := $AnimationPlayer as AnimationPlayer
|
||||
|
||||
|
||||
func _ready() -> void:
|
||||
anim.play("DEFAULT")
|
||||
138
items/torche.tscn
Normal file
138
items/torche.tscn
Normal file
@@ -0,0 +1,138 @@
|
||||
[gd_scene load_steps=16 format=3 uid="uid://dichswip4ynan"]
|
||||
|
||||
[ext_resource type="Texture2D" uid="uid://dgsn3ixn46anc" path="res://sprite/light.png" id="1_q8iya"]
|
||||
[ext_resource type="Script" path="res://items/torche.gd" id="1_x7gvi"]
|
||||
[ext_resource type="Texture2D" uid="uid://dpy5ui56yufab" path="res://sprite/torch.png" id="2_pxxox"]
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_aylw7"]
|
||||
atlas = ExtResource("2_pxxox")
|
||||
region = Rect2(0, 0, 30, 80)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_dgmn0"]
|
||||
atlas = ExtResource("2_pxxox")
|
||||
region = Rect2(30, 0, 30, 80)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_wsmmi"]
|
||||
atlas = ExtResource("2_pxxox")
|
||||
region = Rect2(60, 0, 30, 80)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_rdcj2"]
|
||||
atlas = ExtResource("2_pxxox")
|
||||
region = Rect2(90, 0, 30, 80)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_1kx36"]
|
||||
atlas = ExtResource("2_pxxox")
|
||||
region = Rect2(120, 0, 30, 80)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_v33ms"]
|
||||
atlas = ExtResource("2_pxxox")
|
||||
region = Rect2(150, 0, 30, 80)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_1qp15"]
|
||||
atlas = ExtResource("2_pxxox")
|
||||
region = Rect2(180, 0, 30, 80)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_3v3ae"]
|
||||
atlas = ExtResource("2_pxxox")
|
||||
region = Rect2(210, 0, 30, 80)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_vh34d"]
|
||||
atlas = ExtResource("2_pxxox")
|
||||
region = Rect2(240, 0, 30, 80)
|
||||
|
||||
[sub_resource type="SpriteFrames" id="SpriteFrames_4ltyi"]
|
||||
animations = [{
|
||||
"frames": [{
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_aylw7")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_dgmn0")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_wsmmi")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_rdcj2")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_1kx36")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_v33ms")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_1qp15")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_3v3ae")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_vh34d")
|
||||
}],
|
||||
"loop": true,
|
||||
"name": &"default",
|
||||
"speed": 5.0
|
||||
}]
|
||||
|
||||
[sub_resource type="Animation" id="Animation_yxolu"]
|
||||
resource_name = "DEFAULT"
|
||||
length = 2.0
|
||||
loop_mode = 1
|
||||
tracks/0/type = "value"
|
||||
tracks/0/imported = false
|
||||
tracks/0/enabled = true
|
||||
tracks/0/path = NodePath("PointLight2D:offset")
|
||||
tracks/0/interp = 1
|
||||
tracks/0/loop_wrap = true
|
||||
tracks/0/keys = {
|
||||
"times": PackedFloat32Array(0, 1.1, 2),
|
||||
"transitions": PackedFloat32Array(1, 1, 1),
|
||||
"update": 0,
|
||||
"values": [Vector2(0, 0), Vector2(10, -10), Vector2(0, 0)]
|
||||
}
|
||||
tracks/1/type = "value"
|
||||
tracks/1/imported = false
|
||||
tracks/1/enabled = true
|
||||
tracks/1/path = NodePath("PointLight2D:color")
|
||||
tracks/1/interp = 1
|
||||
tracks/1/loop_wrap = true
|
||||
tracks/1/keys = {
|
||||
"times": PackedFloat32Array(0, 1.1, 2),
|
||||
"transitions": PackedFloat32Array(1, 1, 1),
|
||||
"update": 0,
|
||||
"values": [Color(1, 0.890196, 0.796078, 1), Color(0.921569, 0.658824, 0.490196, 1), Color(1, 0.890196, 0.796078, 1)]
|
||||
}
|
||||
|
||||
[sub_resource type="AnimationLibrary" id="AnimationLibrary_7jwq8"]
|
||||
_data = {
|
||||
"DEFAULT": SubResource("Animation_yxolu")
|
||||
}
|
||||
|
||||
[node name="Torche" type="Node2D"]
|
||||
position = Vector2(-223, -32)
|
||||
script = ExtResource("1_x7gvi")
|
||||
|
||||
[node name="PointLight2D" type="PointLight2D" parent="."]
|
||||
position = Vector2(-0.499997, 4)
|
||||
scale = Vector2(0.139648, 0.136719)
|
||||
color = Color(1, 0.838671, 0.693027, 1)
|
||||
range_z_min = -2048
|
||||
range_z_max = 2048
|
||||
shadow_enabled = true
|
||||
texture = ExtResource("1_q8iya")
|
||||
offset = Vector2(2.57627, -2.57627)
|
||||
texture_scale = 1.67
|
||||
|
||||
[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="."]
|
||||
z_index = -1
|
||||
position = Vector2(1.52588e-05, 0)
|
||||
scale = Vector2(0.25, 0.25)
|
||||
sprite_frames = SubResource("SpriteFrames_4ltyi")
|
||||
autoplay = "default"
|
||||
frame_progress = 0.919544
|
||||
|
||||
[node name="AnimationPlayer" type="AnimationPlayer" parent="."]
|
||||
libraries = {
|
||||
"": SubResource("AnimationLibrary_7jwq8")
|
||||
}
|
||||
File diff suppressed because one or more lines are too long
@@ -1,4 +1,4 @@
|
||||
[gd_scene load_steps=43 format=3 uid="uid://dv0mokf4eogm7"]
|
||||
[gd_scene load_steps=42 format=3 uid="uid://dv0mokf4eogm7"]
|
||||
|
||||
[ext_resource type="Script" path="res://princesse.gd" id="1_dkp7s"]
|
||||
[ext_resource type="Texture2D" uid="uid://dr7fyh2rufsyj" path="res://sprite/princess_falling_direction.png" id="2_hholp"]
|
||||
@@ -7,6 +7,7 @@
|
||||
[ext_resource type="Texture2D" uid="uid://b1624w7katr05" path="res://sprite/princess_jumping_impulsion.png" id="5_njcte"]
|
||||
[ext_resource type="Texture2D" uid="uid://c2xtcu5ysgi7o" path="res://sprite/princess_jumping.png" id="6_srvje"]
|
||||
[ext_resource type="Texture2D" uid="uid://d23lmsjrjw1mk" path="res://sprite/princess_wall_stick.png" id="7_8dix4"]
|
||||
[ext_resource type="Texture2D" uid="uid://dgsn3ixn46anc" path="res://sprite/light.png" id="8_8c83t"]
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_i248f"]
|
||||
atlas = ExtResource("2_hholp")
|
||||
@@ -240,7 +241,7 @@ animations = [{
|
||||
|
||||
[sub_resource type="CapsuleShape2D" id="CapsuleShape2D_6r7th"]
|
||||
radius = 4.33333
|
||||
height = 39.3333
|
||||
height = 42.0
|
||||
|
||||
[sub_resource type="Animation" id="Animation_uo4aj"]
|
||||
resource_name = "death"
|
||||
@@ -286,18 +287,6 @@ height = 1024
|
||||
fill = 1
|
||||
fill_from = Vector2(0.482759, 0.508621)
|
||||
|
||||
[sub_resource type="Gradient" id="Gradient_srny4"]
|
||||
interpolation_mode = 2
|
||||
offsets = PackedFloat32Array(0, 0.0828402, 0.698225)
|
||||
colors = PackedColorArray(0.61339, 0.61339, 0.61339, 1, 0.47788, 0.47788, 0.47788, 1, 0, 0, 0, 1)
|
||||
|
||||
[sub_resource type="GradientTexture2D" id="GradientTexture2D_irtut"]
|
||||
gradient = SubResource("Gradient_srny4")
|
||||
width = 512
|
||||
height = 512
|
||||
fill = 1
|
||||
fill_from = Vector2(0.5, 0.5)
|
||||
|
||||
[node name="Princesse" type="CharacterBody2D"]
|
||||
scale = Vector2(0.6, 0.6)
|
||||
collision_mask = 241
|
||||
@@ -319,7 +308,7 @@ target_position = Vector2(-6, 0)
|
||||
collision_mask = 16
|
||||
|
||||
[node name="wall_detect_left2" type="RayCast2D" parent="."]
|
||||
position = Vector2(0, -16)
|
||||
position = Vector2(0, -12)
|
||||
target_position = Vector2(-6, 0)
|
||||
collision_mask = 16
|
||||
|
||||
@@ -329,17 +318,17 @@ target_position = Vector2(-6, 0)
|
||||
collision_mask = 16
|
||||
|
||||
[node name="wall_detect_right" type="RayCast2D" parent="."]
|
||||
target_position = Vector2(8, 0)
|
||||
target_position = Vector2(6, 0)
|
||||
collision_mask = 16
|
||||
|
||||
[node name="wall_detect_right2" type="RayCast2D" parent="."]
|
||||
position = Vector2(0, -16)
|
||||
target_position = Vector2(8, 0)
|
||||
position = Vector2(0, -12)
|
||||
target_position = Vector2(6, 0)
|
||||
collision_mask = 16
|
||||
|
||||
[node name="wall_detect_right3" type="RayCast2D" parent="."]
|
||||
position = Vector2(0, 22)
|
||||
target_position = Vector2(8, 0)
|
||||
target_position = Vector2(6, 0)
|
||||
collision_mask = 16
|
||||
|
||||
[node name="Camera2D" type="Camera2D" parent="."]
|
||||
@@ -350,7 +339,7 @@ drag_horizontal_enabled = true
|
||||
drag_vertical_enabled = true
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
|
||||
position = Vector2(0, 5)
|
||||
position = Vector2(0, 4)
|
||||
shape = SubResource("CapsuleShape2D_6r7th")
|
||||
|
||||
[node name="ground_far_detect" type="RayCast2D" parent="."]
|
||||
@@ -369,17 +358,19 @@ libraries = {
|
||||
}
|
||||
|
||||
[node name="vignetting" type="PointLight2D" parent="."]
|
||||
visible = false
|
||||
energy = 1.8
|
||||
blend_mode = 1
|
||||
texture = SubResource("GradientTexture2D_t1uxd")
|
||||
texture_scale = 1.85
|
||||
|
||||
[node name="light" type="PointLight2D" parent="."]
|
||||
position = Vector2(3, -0.187502)
|
||||
scale = Vector2(0.628453, 0.586182)
|
||||
color = Color(1, 0.85098, 0.862745, 1)
|
||||
energy = 0.4
|
||||
texture = SubResource("GradientTexture2D_irtut")
|
||||
texture_scale = 1.29
|
||||
position = Vector2(0, 1.66669)
|
||||
scale = Vector2(0.163303, 0.193631)
|
||||
energy = 0.74
|
||||
blend_mode = 2
|
||||
shadow_enabled = true
|
||||
texture = ExtResource("8_8c83t")
|
||||
texture_scale = 0.44
|
||||
|
||||
[connection signal="animation_finished" from="Death player" to="." method="_on_death_player_animation_finished"]
|
||||
|
||||
BIN
sprite/light.png
Normal file
BIN
sprite/light.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 156 KiB |
34
sprite/light.png.import
Normal file
34
sprite/light.png.import
Normal file
@@ -0,0 +1,34 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://dgsn3ixn46anc"
|
||||
path="res://.godot/imported/light.png-6b03d718e6ebfa2b64c18c597d9b562b.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://sprite/light.png"
|
||||
dest_files=["res://.godot/imported/light.png-6b03d718e6ebfa2b64c18c597d9b562b.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
|
||||
BIN
sprite/torch.gif
Normal file
BIN
sprite/torch.gif
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.6 KiB |
BIN
sprite/torch.png
Normal file
BIN
sprite/torch.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.3 KiB |
34
sprite/torch.png.import
Normal file
34
sprite/torch.png.import
Normal file
@@ -0,0 +1,34 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://dpy5ui56yufab"
|
||||
path="res://.godot/imported/torch.png-6ab738930cde7da0d3ef86627a680519.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://sprite/torch.png"
|
||||
dest_files=["res://.godot/imported/torch.png-6ab738930cde7da0d3ef86627a680519.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
|
||||
Reference in New Issue
Block a user