* update filter

* add winning screen
This commit is contained in:
Mylloon 2023-02-26 19:09:57 +01:00
parent 59cb8370cb
commit deb9f6f1f7
Signed by: Anri
GPG key ID: A82D63DFF8D1317F
26 changed files with 88 additions and 140 deletions

BIN
Assets/cursor/0.png (Stored with Git LFS)

Binary file not shown.

View file

@ -20,7 +20,7 @@ compress/hdr_mode=0
compress/bptc_ldr=0 compress/bptc_ldr=0
compress/normal_map=0 compress/normal_map=0
flags/repeat=0 flags/repeat=0
flags/filter=true flags/filter=false
flags/mipmaps=false flags/mipmaps=false
flags/anisotropic=false flags/anisotropic=false
flags/srgb=2 flags/srgb=2

View file

@ -20,7 +20,7 @@ compress/hdr_mode=0
compress/bptc_ldr=0 compress/bptc_ldr=0
compress/normal_map=0 compress/normal_map=0
flags/repeat=0 flags/repeat=0
flags/filter=true flags/filter=false
flags/mipmaps=false flags/mipmaps=false
flags/anisotropic=false flags/anisotropic=false
flags/srgb=2 flags/srgb=2

View file

@ -20,7 +20,7 @@ compress/hdr_mode=0
compress/bptc_ldr=0 compress/bptc_ldr=0
compress/normal_map=0 compress/normal_map=0
flags/repeat=0 flags/repeat=0
flags/filter=true flags/filter=false
flags/mipmaps=false flags/mipmaps=false
flags/anisotropic=false flags/anisotropic=false
flags/srgb=2 flags/srgb=2

BIN
Assets/skin_assets/button_focus.png (Stored with Git LFS)

Binary file not shown.

View file

@ -1,35 +0,0 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/button_focus.png-e1981e994155ca422d4d953f4af77164.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://Assets/skin_assets/button_focus.png"
dest_files=[ "res://.import/button_focus.png-e1981e994155ca422d4d953f4af77164.stex" ]
[params]
compress/mode=0
compress/lossy_quality=0.7
compress/hdr_mode=0
compress/bptc_ldr=0
compress/normal_map=0
flags/repeat=0
flags/filter=true
flags/mipmaps=false
flags/anisotropic=false
flags/srgb=2
process/fix_alpha_border=true
process/premult_alpha=false
process/HDR_as_SRGB=false
process/invert_color=false
process/normal_map_invert_y=false
stream=false
size_limit=0
detect_3d=true
svg/scale=1.0

BIN
Assets/skin_assets/button_normal.png (Stored with Git LFS)

Binary file not shown.

View file

@ -1,35 +0,0 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/button_normal.png-7ceacf3d6625a4e76f581d0ae1258671.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://Assets/skin_assets/button_normal.png"
dest_files=[ "res://.import/button_normal.png-7ceacf3d6625a4e76f581d0ae1258671.stex" ]
[params]
compress/mode=0
compress/lossy_quality=0.7
compress/hdr_mode=0
compress/bptc_ldr=0
compress/normal_map=0
flags/repeat=0
flags/filter=true
flags/mipmaps=false
flags/anisotropic=false
flags/srgb=2
process/fix_alpha_border=true
process/premult_alpha=false
process/HDR_as_SRGB=false
process/invert_color=false
process/normal_map_invert_y=false
stream=false
size_limit=0
detect_3d=true
svg/scale=1.0

BIN
Assets/skin_assets/button_pressed.png (Stored with Git LFS)

Binary file not shown.

View file

@ -1,35 +0,0 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/button_pressed.png-501e49eae0845aa00c0264094791a5b9.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://Assets/skin_assets/button_pressed.png"
dest_files=[ "res://.import/button_pressed.png-501e49eae0845aa00c0264094791a5b9.stex" ]
[params]
compress/mode=0
compress/lossy_quality=0.7
compress/hdr_mode=0
compress/bptc_ldr=0
compress/normal_map=0
flags/repeat=0
flags/filter=true
flags/mipmaps=false
flags/anisotropic=false
flags/srgb=2
process/fix_alpha_border=true
process/premult_alpha=false
process/HDR_as_SRGB=false
process/invert_color=false
process/normal_map_invert_y=false
stream=false
size_limit=0
detect_3d=true
svg/scale=1.0

View file

@ -20,7 +20,7 @@ compress/hdr_mode=0
compress/bptc_ldr=0 compress/bptc_ldr=0
compress/normal_map=0 compress/normal_map=0
flags/repeat=0 flags/repeat=0
flags/filter=true flags/filter=false
flags/mipmaps=false flags/mipmaps=false
flags/anisotropic=false flags/anisotropic=false
flags/srgb=2 flags/srgb=2

View file

@ -20,7 +20,7 @@ compress/hdr_mode=0
compress/bptc_ldr=0 compress/bptc_ldr=0
compress/normal_map=0 compress/normal_map=0
flags/repeat=0 flags/repeat=0
flags/filter=true flags/filter=false
flags/mipmaps=false flags/mipmaps=false
flags/anisotropic=false flags/anisotropic=false
flags/srgb=2 flags/srgb=2

BIN
Assets/victory/0.png (Stored with Git LFS) Executable file

Binary file not shown.

View file

@ -2,15 +2,15 @@
importer="texture" importer="texture"
type="StreamTexture" type="StreamTexture"
path="res://.import/windows.png-63993ca9c59f37e0ad00b5a6a909cb20.stex" path="res://.import/0.png-f61ab1ba888641d55763745d59bbb671.stex"
metadata={ metadata={
"vram_texture": false "vram_texture": false
} }
[deps] [deps]
source_file="res://Assets/windows/windows.png" source_file="res://Assets/victory/0.png"
dest_files=[ "res://.import/windows.png-63993ca9c59f37e0ad00b5a6a909cb20.stex" ] dest_files=[ "res://.import/0.png-f61ab1ba888641d55763745d59bbb671.stex" ]
[params] [params]

View file

@ -20,7 +20,7 @@ compress/hdr_mode=0
compress/bptc_ldr=0 compress/bptc_ldr=0
compress/normal_map=0 compress/normal_map=0
flags/repeat=0 flags/repeat=0
flags/filter=true flags/filter=false
flags/mipmaps=false flags/mipmaps=false
flags/anisotropic=false flags/anisotropic=false
flags/srgb=2 flags/srgb=2

View file

@ -20,7 +20,7 @@ compress/hdr_mode=0
compress/bptc_ldr=0 compress/bptc_ldr=0
compress/normal_map=0 compress/normal_map=0
flags/repeat=0 flags/repeat=0
flags/filter=true flags/filter=false
flags/mipmaps=false flags/mipmaps=false
flags/anisotropic=false flags/anisotropic=false
flags/srgb=2 flags/srgb=2

View file

@ -20,7 +20,7 @@ compress/hdr_mode=0
compress/bptc_ldr=0 compress/bptc_ldr=0
compress/normal_map=0 compress/normal_map=0
flags/repeat=0 flags/repeat=0
flags/filter=true flags/filter=false
flags/mipmaps=false flags/mipmaps=false
flags/anisotropic=false flags/anisotropic=false
flags/srgb=2 flags/srgb=2

BIN
Assets/windows/windows.png (Stored with Git LFS)

Binary file not shown.

View file

@ -10,3 +10,7 @@ func _on_Area2D_input_event(_viewport: Node, event: InputEvent, _shape_idx: int)
if event.pressed and event.button_index == BUTTON_LEFT: if event.pressed and event.button_index == BUTTON_LEFT:
screen.visible = true screen.visible = true
sprite.modulate = Color(0.66, 0.51, 0.85) # shade sprite.modulate = Color(0.66, 0.51, 0.85) # shade
var progress_screen = screen.get_node("Window2")
if progress_screen.visible:
progress_screen.play()
screen.get_node("Button2").etat = true

View file

@ -39,3 +39,7 @@ func _on_Area2D2_input_event(_viewport: Node, event: InputEvent, _shape_idx: int
drag_change_state() drag_change_state()
window.visible = false window.visible = false
folder_icon.modulate = Color(1, 1, 1) # reset shade folder_icon.modulate = Color(1, 1, 1) # reset shade
var progress_screen = window.get_node("Window2")
if progress_screen.visible:
progress_screen.stop()
window.get_node("Button2").etat = false

View file

@ -16,9 +16,9 @@ extents = Vector2( 38.75, 38.75 )
[sub_resource type="SpriteFrames" id=3] [sub_resource type="SpriteFrames" id=3]
animations = [ { animations = [ {
"frames": [ ExtResource( 6 ), ExtResource( 3 ), ExtResource( 4 ), ExtResource( 5 ) ], "frames": [ ExtResource( 6 ), ExtResource( 3 ), ExtResource( 4 ), ExtResource( 5 ) ],
"loop": true, "loop": false,
"name": "default", "name": "default",
"speed": 5.0 "speed": 1.0
} ] } ]
[node name="Node2D" type="Node2D"] [node name="Node2D" type="Node2D"]
@ -50,8 +50,6 @@ visible = false
position = Vector2( 56, -12 ) position = Vector2( 56, -12 )
scale = Vector2( 0.4, 0.4 ) scale = Vector2( 0.4, 0.4 )
frames = SubResource( 3 ) frames = SubResource( 3 )
frame = 2
playing = true
[node name="Area2D" type="Area2D" parent="Window2"] [node name="Area2D" type="Area2D" parent="Window2"]
position = Vector2( 487.5, -490 ) position = Vector2( 487.5, -490 )

2
Musics/wav/defeat.wav.import Normal file → Executable file
View file

@ -17,7 +17,7 @@ force/max_rate=false
force/max_rate_hz=44100 force/max_rate_hz=44100
edit/trim=false edit/trim=false
edit/normalize=false edit/normalize=false
edit/loop_mode=1 edit/loop_mode=2
edit/loop_begin=0 edit/loop_begin=0
edit/loop_end=-1 edit/loop_end=-1
compress/mode=0 compress/mode=0

2
Musics/wav/victory.wav.import Normal file → Executable file
View file

@ -17,7 +17,7 @@ force/max_rate=false
force/max_rate_hz=44100 force/max_rate_hz=44100
edit/trim=false edit/trim=false
edit/normalize=false edit/normalize=false
edit/loop_mode=0 edit/loop_mode=2
edit/loop_begin=0 edit/loop_begin=0
edit/loop_end=-1 edit/loop_end=-1
compress/mode=0 compress/mode=0

View file

@ -3,7 +3,7 @@ extends Button
onready var villain = $"../../../Villain/AnimatedSprite" onready var villain = $"../../../Villain/AnimatedSprite"
onready var villain_animations = $"../../../Villain" onready var villain_animations = $"../../../Villain"
var etat = false export(bool) var etat = false
var remplissage = 0 var remplissage = 0
const texture_pressed = preload("res://Assets/tres_button/hover-pressed.png") const texture_pressed = preload("res://Assets/tres_button/hover-pressed.png")
const texture_released = preload("res://Assets/tres_button/normal.png") const texture_released = preload("res://Assets/tres_button/normal.png")

View file

@ -35,9 +35,8 @@ func _ready() -> void:
# Background (window) # Background (window)
window.get_node("Window").visible = false window.get_node("Window").visible = false
window.get_node("Window2").visible = true window.get_node("Window2").visible = true
# Change button text # Change button visibility
button_window.text = "." button_window.visible = false
button_window.focus_mode = Button.FOCUS_NONE button_window.focus_mode = Button.FOCUS_NONE
dossier.position = Vector2(dossier.position.x, dossier.position.y + 150 * (i + 1)) dossier.position = Vector2(dossier.position.x, dossier.position.y + 150 * (i + 1))
@ -58,3 +57,14 @@ func _process(_delta) -> void:
else: else:
mainMusic.set_volume_db(0) mainMusic.set_volume_db(0)
eyeMusic.set_volume_db(-80) eyeMusic.set_volume_db(-80)
var end = true
for i in self.get_children():
if "Directory" in i.name:
if i.visible:
end = false
if end:
mainMusic.set_volume_db(-80)
eyeMusic.set_volume_db(-80)
assert(get_tree().change_scene("res://Scenes/victory.tscn") == OK)

46
Scenes/victory.tscn Executable file
View file

@ -0,0 +1,46 @@
[gd_scene load_steps=9 format=2]
[ext_resource path="res://Scenes/Scripts/GameOver.gd" type="Script" id=1]
[ext_resource path="res://Assets/victory/0.png" type="Texture" id=2]
[ext_resource path="res://Assets/tres_button/normal.tres" type="StyleBox" id=3]
[ext_resource path="res://Assets/tres_button/pressed.tres" type="StyleBox" id=4]
[ext_resource path="res://Assets/tres_button/hover.tres" type="StyleBox" id=5]
[ext_resource path="res://Musics/sound effect/hower.wav" type="AudioStream" id=6]
[ext_resource path="res://Assets/skin_assets/menu_font.tres" type="DynamicFont" id=7]
[ext_resource path="res://Musics/wav/victory.wav" type="AudioStream" id=8]
[node name="Node2D" type="Node2D"]
script = ExtResource( 1 )
[node name="Windows" type="Sprite" parent="."]
position = Vector2( 512, 360 )
scale = Vector2( 0.5, 0.5 )
z_index = -2
texture = ExtResource( 2 )
[node name="RestartButton" type="Button" parent="."]
margin_left = 312.0
margin_top = 632.0
margin_right = 724.0
margin_bottom = 693.0
focus_mode = 0
custom_colors/font_color = Color( 1, 1, 1, 1 )
custom_colors/font_color_hover = Color( 0.941176, 0.690196, 0.403922, 1 )
custom_fonts/font = ExtResource( 7 )
custom_styles/hover = ExtResource( 5 )
custom_styles/pressed = ExtResource( 4 )
custom_styles/normal = ExtResource( 3 )
text = "Back to main menu"
__meta__ = {
"_edit_use_anchors_": true
}
[node name="VictoryMusic" type="AudioStreamPlayer" parent="."]
stream = ExtResource( 8 )
autoplay = true
[node name="Hover" type="AudioStreamPlayer" parent="."]
stream = ExtResource( 6 )
[connection signal="mouse_entered" from="RestartButton" to="." method="_on_RestartButton_mouse_entered"]
[connection signal="pressed" from="RestartButton" to="." method="_on_RestartButton_pressed"]