Add switch for CRT shader

This commit is contained in:
dariasteam 2018-02-28 18:34:20 +00:00
parent 8115f2adbb
commit 9f1ca530c6
8 changed files with 62 additions and 3 deletions

View file

@ -0,0 +1 @@
,darias,darias-laptop,28.02.2018 18:33,file:///home/darias/.config/libreoffice/4;

View file

@ -3,6 +3,7 @@ PLAY_GAME,Jugar,Play
SETTINGS,Ajustes,Settings
ABOUT,Info,About
SWITCH_SCREEN_CONTROLS,Usar botones táctiles,Use onsceen controls
SWITCH_RETRO_EFFECT,Emular pantalla retro,Simulate retro TV
BTTN_BACK,Volver,Back
TEXT_LICENSE,"El código fuente de este juego está licenciado bajo Geneal Public License versión 3. Todos los recursos gráficos, sonidos y música han sido creados por nosotos y están licenciados como Creative Commons Attribution-NonCommercial-ShareAlike 4.0. La tipografía utilizada es Press Start 2P creada por CodeMan38 (Open Font License)

1 id es en
3 SETTINGS Ajustes Settings
4 ABOUT Info About
5 SWITCH_SCREEN_CONTROLS Usar botones táctiles Use onsceen controls
6 SWITCH_RETRO_EFFECT Emular pantalla retro Simulate retro TV
7 BTTN_BACK Volver Back
8 TEXT_LICENSE El código fuente de este juego está licenciado bajo Geneal Public License versión 3. Todos los recursos gráficos, sonidos y música han sido creados por nosotos y están licenciados como Creative Commons Attribution-NonCommercial-ShareAlike 4.0. La tipografía utilizada es Press Start 2P creada por CodeMan38 (Open Font License) Puedes obtener el código fuente y los recusos en gitlab.com/dariasteam/cows-revenge Hecho en Godot Engine 2.1.5 (MIT) This game's code is licensed as General Public License version 3. All the graphics, sounds and music resources were made by us and are published as Creative Commons Attribution-onCommercial-ShareAlike 4.0 International. Font is Press Start 2P by CodeMan38 (Open Font License) You can get the source code and assets at gitlab.com/dariasteam/cows-revenge Made with Godot Engine 2.1.5 (MIT)
9 CHAPTERS Capítulos Chapters

Binary file not shown.

Binary file not shown.

View file

@ -1,4 +1,4 @@
[gd_scene load_steps=32 format=1]
[gd_scene load_steps=33 format=1]
[ext_resource path="res://Scenes/Menu/level_selector.gd" type="Script" id=1]
[ext_resource path="res://Scenes/Maps/map_0.tscn" type="PackedScene" id=2]
@ -89,6 +89,18 @@ func _on_Back_pressed():
get_node(\"in_game_menu\").show()
"
[sub_resource type="GDScript" id=5]
script/source = "extends TextureFrame
# class member variables go here, for example:
# var a = 2
# var b = \"textvar\"
func _ready():
set_hidden(global.retro_effect)
"
[node name="Global" type="Node2D" groups=[
"control",
]]
@ -396,6 +408,7 @@ margin/bottom = 686.0
[node name="ScanLine" parent="." instance=ExtResource( 27 )]
visibility/visible = false
script/script = SubResource( 5 )
[connection signal="pressed" from="Control/Buttons/Bttn_U" to="Control/Buttons" method="_on_Bttn_U_pressed"]

View file

@ -12,6 +12,7 @@ var hearts_buyed = 0
var milk_buyed = 0
var can_show_in_game_menu = true
var retro_effect = true
var level = 0
var unlocked_levels = 1
@ -74,7 +75,8 @@ func save_game():
max_life = max_life,
life = life,
milk_buyed = milk_buyed,
hearts_buyed = hearts_buyed
hearts_buyed = hearts_buyed,
retro_effect=retro_effect
}
save_game.store_line(data.to_json())
save_game.close()
@ -100,4 +102,6 @@ func load_game():
milk_buyed = current_line["milk_buyed"]
hearts_buyed = current_line["hearts_buyed"]
retro_effect = current_line["retro_effect"]

View file

@ -1,4 +1,4 @@
[gd_scene load_steps=6 format=1]
[gd_scene load_steps=7 format=1]
[ext_resource path="res://Fonts/pixelated_regular.fnt" type="BitmapFont" id=1]
[ext_resource path="res://Scenes/Menu/button_back.tscn" type="PackedScene" id=2]
@ -15,6 +15,24 @@ func _ready():
func _on_CheckButton_toggled( pressed ):
global.toggle_on_screen_buttons(pressed)
"
[sub_resource type="GDScript" id=2]
script/source = "extends CheckButton
# class member variables go here, for example:
# var a = 2
# var b = \"textvar\"
func _ready():
set_pressed(!global.retro_effect)
func _on_CheckButton1_toggled( pressed ):
global.retro_effect = !pressed
"
[node name="Control" type="Control"]
@ -76,6 +94,26 @@ flat = false
align = 0
script/script = SubResource( 1 )
[node name="CheckButton1" type="CheckButton" parent="Panel/VButtonArray"]
rect/scale = Vector2( 2, 2 )
focus/ignore_mouse = false
focus/stop_mouse = true
size_flags/horizontal = 2
size_flags/vertical = 2
margin/left = 96.0
margin/top = 54.0
margin/right = 502.0
margin/bottom = 93.0
custom_fonts/font = ExtResource( 1 )
toggle_mode = true
enabled_focus_mode = 2
shortcut = null
text = "SWITCH_RETRO_EFFECT"
flat = false
align = 0
script/script = SubResource( 2 )
[node name="Button" parent="Panel/VButtonArray" instance=ExtResource( 2 )]
margin/left = 372.0
@ -104,4 +142,6 @@ max_lines_visible = -1
[connection signal="toggled" from="Panel/VButtonArray/CheckButton" to="Panel/VButtonArray/CheckButton" method="_on_CheckButton_toggled"]
[connection signal="toggled" from="Panel/VButtonArray/CheckButton1" to="Panel/VButtonArray/CheckButton1" method="_on_CheckButton1_toggled"]

BIN
icon.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 KiB