light effects ?
This commit is contained in:
parent
3631e21127
commit
5925b02fe7
11 changed files with 59 additions and 23 deletions
|
@ -28,7 +28,7 @@
|
|||
0/z_index = 0
|
||||
|
||||
[node name="FakeSolidsTileMap" type="TileMap"]
|
||||
z_index = 10
|
||||
z_index = 1
|
||||
tile_set = SubResource( 35 )
|
||||
cell_size = Vector2( 16, 16 )
|
||||
collision_layer = 9
|
||||
|
|
|
@ -104,6 +104,7 @@ AudioManager="*res://src/Singletons/AudioManager.tscn"
|
|||
GameState="*res://src/Singletons/GameState.gd"
|
||||
Utils="*res://src/Singletons/Utils.gd"
|
||||
Stage="*res://src/Singletons/Stage.tscn"
|
||||
AmbiantLighting="*res://src/GameWorld/AmbiantLighting.tscn"
|
||||
|
||||
[display]
|
||||
|
||||
|
|
|
@ -1,8 +1,13 @@
|
|||
[gd_scene load_steps=3 format=2]
|
||||
[gd_scene load_steps=4 format=2]
|
||||
|
||||
[ext_resource path="res://src/HUD/HUD.tscn" type="PackedScene" id=1]
|
||||
[ext_resource path="res://src/GameWorld/GameWorld.gd" type="Script" id=5]
|
||||
|
||||
[sub_resource type="Environment" id=1]
|
||||
background_mode = 4
|
||||
fog_sun_amount = 0.16
|
||||
glow_enabled = true
|
||||
|
||||
[node name="GameWorld" type="Node2D"]
|
||||
script = ExtResource( 5 )
|
||||
|
||||
|
@ -10,3 +15,6 @@ script = ExtResource( 5 )
|
|||
layer = 2
|
||||
|
||||
[node name="Level" type="Node2D" parent="."]
|
||||
|
||||
[node name="WorldEnvironment" type="WorldEnvironment" parent="."]
|
||||
environment = SubResource( 1 )
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
extends Level
|
||||
|
||||
func ready() -> void:
|
||||
$AmbiantLighting.change_light("AREA1")
|
||||
# func ready() -> void:
|
||||
|
||||
|
||||
func _enter_tree() -> void:
|
||||
AudioManager.play_music(AudioManager.Music.Abandon)
|
||||
AudioManager.play_music(AudioManager.Music.Abandon)
|
||||
AmbiantLighting.change_light("AREA1")
|
File diff suppressed because one or more lines are too long
|
@ -40,6 +40,6 @@ func _on_OldDudeIntroArea_body_entered(body: Node) -> void:
|
|||
func _process(delta: float) -> void:
|
||||
if is_active_level:
|
||||
if _player.position.x > 330:
|
||||
$AmbiantLighting.change_light("NIGHT")
|
||||
AmbiantLighting.change_light("NIGHT")
|
||||
else:
|
||||
$AmbiantLighting.change_light("DAY")
|
||||
AmbiantLighting.change_light("DAY")
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
[gd_scene load_steps=30 format=2]
|
||||
[gd_scene load_steps=29 format=2]
|
||||
|
||||
[ext_resource path="res://src/GameWorld/Levels/PreGame.gd" type="Script" id=1]
|
||||
[ext_resource path="res://assets/Tiles/background_0.png" type="Texture" id=2]
|
||||
|
@ -13,7 +13,6 @@
|
|||
[ext_resource path="res://assets/Tiles/tileset.png" type="Texture" id=11]
|
||||
[ext_resource path="res://assets/Tiles/SolidsTileMap.tscn" type="PackedScene" id=12]
|
||||
[ext_resource path="res://src/Actors/WiseOldDude/WiseOldDude.tscn" type="PackedScene" id=13]
|
||||
[ext_resource path="res://src/GameWorld/AmbiantLighting.tscn" type="PackedScene" id=14]
|
||||
[ext_resource path="res://src/Scripts/WarpZone.tscn" type="PackedScene" id=15]
|
||||
[ext_resource path="res://src/Hazards/SpikeTrap.tscn" type="PackedScene" id=16]
|
||||
[ext_resource path="res://src/Items/Spring.tscn" type="PackedScene" id=17]
|
||||
|
@ -268,14 +267,14 @@ position = Vector2( 281, -12 )
|
|||
[node name="Coin3" parent="Coins" instance=ExtResource( 9 )]
|
||||
position = Vector2( 122, 107 )
|
||||
|
||||
[node name="AmbiantLighting" parent="." instance=ExtResource( 14 )]
|
||||
|
||||
[node name="WarpZone" parent="." instance=ExtResource( 15 )]
|
||||
position = Vector2( 723, 225 )
|
||||
to_level_coord = Vector2( 0, 1 )
|
||||
|
||||
[node name="SpikeTrap" parent="." instance=ExtResource( 16 )]
|
||||
position = Vector2( 352, 208 )
|
||||
direction = 1
|
||||
cooldown_timeout = 2.0
|
||||
|
||||
[node name="Spring" parent="." instance=ExtResource( 17 )]
|
||||
position = Vector2( 134, 240 )
|
||||
|
@ -297,7 +296,6 @@ position = Vector2( 217, 167 )
|
|||
to_point = Vector2( 0, 65 )
|
||||
duration = 0.5
|
||||
delay = 0.2
|
||||
g = "UP_DOWN"
|
||||
|
||||
[node name="BrakableVase" parent="." instance=ExtResource( 19 )]
|
||||
position = Vector2( 295, 240 )
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
[gd_scene load_steps=7 format=2]
|
||||
[gd_scene load_steps=8 format=2]
|
||||
|
||||
[ext_resource path="res://assets/Traps/arrow.png" type="Texture" id=1]
|
||||
[ext_resource path="res://src/Hazards/Arrow.gd" type="Script" id=2]
|
||||
[ext_resource path="res://assets/Items/torch_ligt_texture.png" type="Texture" id=3]
|
||||
|
||||
[sub_resource type="RectangleShape2D" id=1]
|
||||
extents = Vector2( 2.5, 2.5 )
|
||||
|
@ -38,6 +39,18 @@ tracks/1/keys = {
|
|||
"method": "queue_free"
|
||||
} ]
|
||||
}
|
||||
tracks/2/type = "value"
|
||||
tracks/2/path = NodePath("Light2D:energy")
|
||||
tracks/2/interp = 1
|
||||
tracks/2/loop_wrap = true
|
||||
tracks/2/imported = false
|
||||
tracks/2/enabled = true
|
||||
tracks/2/keys = {
|
||||
"times": PoolRealArray( 0, 0.1 ),
|
||||
"transitions": PoolRealArray( 1, 1 ),
|
||||
"update": 0,
|
||||
"values": [ 1.44, 0.0 ]
|
||||
}
|
||||
|
||||
[sub_resource type="Animation" id=4]
|
||||
resource_name = "idle"
|
||||
|
@ -82,5 +95,14 @@ shape = SubResource( 2 )
|
|||
autoplay = "idle"
|
||||
anims/fade_out = SubResource( 3 )
|
||||
anims/idle = SubResource( 4 )
|
||||
|
||||
[node name="Light2D" type="Light2D" parent="."]
|
||||
position = Vector2( -7, -0.5 )
|
||||
scale = Vector2( 1.84, 0.28 )
|
||||
texture = ExtResource( 3 )
|
||||
color = Color( 0.976471, 0.282353, 0.282353, 1 )
|
||||
energy = 1.44
|
||||
range_item_cull_mask = 1071
|
||||
shadow_enabled = true
|
||||
[connection signal="body_entered" from="HitZone" to="." method="_on_HitZone_body_entered"]
|
||||
[connection signal="body_entered" from="PinZone" to="." method="_on_PinZone_body_entered"]
|
||||
|
|
|
@ -69,6 +69,7 @@ tracks/0/keys = {
|
|||
}
|
||||
|
||||
[node name="MaskTrap" type="Node2D"]
|
||||
z_index = 1
|
||||
script = ExtResource( 2 )
|
||||
|
||||
[node name="Sprite" type="Sprite" parent="."]
|
||||
|
|
|
@ -82,7 +82,6 @@ tracks/0/keys = {
|
|||
light_mask = 8
|
||||
position = Vector2( 0, -12 )
|
||||
frames = SubResource( 13 )
|
||||
frame = 5
|
||||
playing = true
|
||||
|
||||
[node name="Light2D" type="Light2D" parent="AnimatedSprite"]
|
||||
|
@ -90,7 +89,7 @@ position = Vector2( 0, -5 )
|
|||
texture = ExtResource( 2 )
|
||||
texture_scale = 5.285
|
||||
color = Color( 0.945098, 0.419608, 0.160784, 1 )
|
||||
range_item_cull_mask = 1033
|
||||
range_item_cull_mask = 1037
|
||||
shadow_enabled = true
|
||||
shadow_item_cull_mask = 1038
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
[gd_scene load_steps=16 format=2]
|
||||
[gd_scene load_steps=17 format=2]
|
||||
|
||||
[ext_resource path="res://assets/Tiles/background_0.png" type="Texture" id=1]
|
||||
[ext_resource path="res://assets/Tiles/background_2.png" type="Texture" id=2]
|
||||
|
@ -122,6 +122,11 @@ tracks/5/keys = {
|
|||
"values": [ Color( 1, 1, 1, 1 ), Color( 0.952941, 0.341176, 0.00784314, 1 ), Color( 0.952941, 0.0313726, 0.0117647, 1 ), Color( 1, 1, 1, 1 ) ]
|
||||
}
|
||||
|
||||
[sub_resource type="Environment" id=9]
|
||||
background_mode = 4
|
||||
glow_enabled = true
|
||||
glow_blend_mode = 0
|
||||
|
||||
[node name="MainMenu" type="Node2D"]
|
||||
script = ExtResource( 6 )
|
||||
|
||||
|
@ -228,6 +233,9 @@ stretch_mode = 5
|
|||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="WorldEnvironment" type="WorldEnvironment" parent="."]
|
||||
environment = SubResource( 9 )
|
||||
[connection signal="pressed" from="CanvasLayer/Control/VBoxContainer/NewGameBtn" to="." method="_on_NewGameBtn_pressed"]
|
||||
[connection signal="pressed" from="CanvasLayer/Control/VBoxContainer/ControlsBtn" to="." method="_on_ControlsBtn_pressed"]
|
||||
[connection signal="pressed" from="CanvasLayer/Control/VBoxContainer/ExitGameBtn" to="." method="_on_ExitGameBtn_pressed"]
|
||||
|
|
Loading…
Reference in a new issue