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")
|
||||
}
|
||||
Reference in New Issue
Block a user