Compare commits
No commits in common. "e71115be849d74589ad451c91e259071c9406094" and "dc8e3a7902eb6de935580eaf50345409e06bc8b6" have entirely different histories.
e71115be84
...
dc8e3a7902
7 changed files with 11 additions and 30 deletions
|
@ -241,6 +241,7 @@ bus = &"Crash"
|
||||||
[node name="NoInputTimer" type="Timer" parent="CharacterBody_Car"]
|
[node name="NoInputTimer" type="Timer" parent="CharacterBody_Car"]
|
||||||
wait_time = 15.0
|
wait_time = 15.0
|
||||||
one_shot = true
|
one_shot = true
|
||||||
|
autostart = true
|
||||||
|
|
||||||
[connection signal="timeout" from="CharacterBody_Car/resetTimer" to="CharacterBody_Car" method="_on_reset_timer_timeout"]
|
[connection signal="timeout" from="CharacterBody_Car/resetTimer" to="CharacterBody_Car" method="_on_reset_timer_timeout"]
|
||||||
[connection signal="timeout" from="CharacterBody_Car/collisionEnableTimer" to="CharacterBody_Car" method="_on_collision_enable_timer_timeout"]
|
[connection signal="timeout" from="CharacterBody_Car/collisionEnableTimer" to="CharacterBody_Car" method="_on_collision_enable_timer_timeout"]
|
||||||
|
|
|
@ -122,6 +122,7 @@ collision_mask = 4
|
||||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="area_cp3"]
|
[node name="CollisionShape2D" type="CollisionShape2D" parent="area_cp3"]
|
||||||
position = Vector2(6807.55, 249.841)
|
position = Vector2(6807.55, 249.841)
|
||||||
rotation = 0.23911
|
rotation = 0.23911
|
||||||
|
scale = Vector2(1, 1)
|
||||||
shape = SubResource("RectangleShape2D_j11df")
|
shape = SubResource("RectangleShape2D_j11df")
|
||||||
|
|
||||||
[node name="area_cp4" type="Area2D" parent="."]
|
[node name="area_cp4" type="Area2D" parent="."]
|
||||||
|
|
|
@ -110,7 +110,6 @@ var finalTime=-1
|
||||||
func _ready() -> void:
|
func _ready() -> void:
|
||||||
collision_shape.disabled=true #disable collisions on start. also to avoid collision when initially setting position
|
collision_shape.disabled=true #disable collisions on start. also to avoid collision when initially setting position
|
||||||
finalTime=-1
|
finalTime=-1
|
||||||
no_input_timer.wait_time=Gamestate.getRemoveCarsTimeout()
|
|
||||||
|
|
||||||
|
|
||||||
func _physics_process(delta: float) -> void:
|
func _physics_process(delta: float) -> void:
|
||||||
|
@ -254,7 +253,7 @@ func get_input(delta:float):
|
||||||
if key_accelerator_pressed:
|
if key_accelerator_pressed:
|
||||||
no_input_timer.stop()
|
no_input_timer.stop()
|
||||||
else:
|
else:
|
||||||
if Gamestate.getRemoveCarsTimeout()>0 and no_input_timer.is_stopped() and !no_input_timeout_flag: #reset timer
|
if no_input_timer.is_stopped() and !no_input_timeout_flag: #reset timer
|
||||||
no_input_timer.start()
|
no_input_timer.start()
|
||||||
|
|
||||||
if key_accelerator_pressed:
|
if key_accelerator_pressed:
|
||||||
|
|
|
@ -10,8 +10,6 @@ func _ready() -> void:
|
||||||
|
|
||||||
config.set_value("video", "fullscreen", false)
|
config.set_value("video", "fullscreen", false)
|
||||||
|
|
||||||
config.set_value("general", "remove_cars_timeout", 15)
|
|
||||||
|
|
||||||
config.save(SETTINGS_FILE_PATH)
|
config.save(SETTINGS_FILE_PATH)
|
||||||
else:
|
else:
|
||||||
config.load(SETTINGS_FILE_PATH)
|
config.load(SETTINGS_FILE_PATH)
|
||||||
|
@ -23,13 +21,6 @@ func save_video_setting(key: String, value):
|
||||||
func get_video_setting(key: String):
|
func get_video_setting(key: String):
|
||||||
return config.get_value("video", key)
|
return config.get_value("video", key)
|
||||||
|
|
||||||
func save_general_setting(key: String, value):
|
|
||||||
config.set_value("general", key,value)
|
|
||||||
config.save(SETTINGS_FILE_PATH)
|
|
||||||
|
|
||||||
func get_general_setting(key: String):
|
|
||||||
return config.get_value("general", key)
|
|
||||||
|
|
||||||
func get_keywhitelist_setting():
|
func get_keywhitelist_setting():
|
||||||
var keywhitelist=[]
|
var keywhitelist=[]
|
||||||
if config.get_value("keywhitelist", "enabled"):
|
if config.get_value("keywhitelist", "enabled"):
|
||||||
|
|
|
@ -16,8 +16,6 @@ var map_scene_name_postfix=".tscn"
|
||||||
|
|
||||||
var rounds=3
|
var rounds=3
|
||||||
|
|
||||||
var remove_cars_timeout=true
|
|
||||||
|
|
||||||
var automatic_map_change_in_start=5
|
var automatic_map_change_in_start=5
|
||||||
var automatic_map_change_in=automatic_map_change_in_start #change map when this reaches 0
|
var automatic_map_change_in=automatic_map_change_in_start #change map when this reaches 0
|
||||||
|
|
||||||
|
@ -30,14 +28,6 @@ func setRounds(r):
|
||||||
print("Rounds set to "+str(r))
|
print("Rounds set to "+str(r))
|
||||||
rounds=r
|
rounds=r
|
||||||
|
|
||||||
func getRemoveCarsTimeout():
|
|
||||||
return remove_cars_timeout
|
|
||||||
|
|
||||||
func setRemoveCarsTimeout(s):
|
|
||||||
print("remove_cars_timeout set to "+str(s))
|
|
||||||
remove_cars_timeout=s
|
|
||||||
|
|
||||||
|
|
||||||
func getSelectedMap(): #return only short map name "00"
|
func getSelectedMap(): #return only short map name "00"
|
||||||
return map_scene_name
|
return map_scene_name
|
||||||
|
|
||||||
|
|
|
@ -16,7 +16,6 @@ func _ready():
|
||||||
btn_fullscreen.button_pressed=DisplayServer.window_get_mode(0)==DisplayServer.WINDOW_MODE_FULLSCREEN #toogle fullscreen switch to correct init state
|
btn_fullscreen.button_pressed=DisplayServer.window_get_mode(0)==DisplayServer.WINDOW_MODE_FULLSCREEN #toogle fullscreen switch to correct init state
|
||||||
|
|
||||||
btn_fullscreen.button_pressed=ConfigFileHandler.get_video_setting("fullscreen")
|
btn_fullscreen.button_pressed=ConfigFileHandler.get_video_setting("fullscreen")
|
||||||
Gamestate.setRemoveCarsTimeout(ConfigFileHandler.get_general_setting("remove_cars_timeout"))
|
|
||||||
|
|
||||||
keywhitelist=ConfigFileHandler.get_keywhitelist_setting() #empty list if disabled
|
keywhitelist=ConfigFileHandler.get_keywhitelist_setting() #empty list if disabled
|
||||||
btn_save_whitelist.disabled=keywhitelist.size()>0 #whitelist enabled, then disable save whitelist button
|
btn_save_whitelist.disabled=keywhitelist.size()>0 #whitelist enabled, then disable save whitelist button
|
||||||
|
|
|
@ -20,7 +20,7 @@ vec3 blur(sampler2D sp, vec2 uv, vec2 scale) {
|
||||||
float accum = 0.0;
|
float accum = 0.0;
|
||||||
float weight;
|
float weight;
|
||||||
vec2 offset;
|
vec2 offset;
|
||||||
|
|
||||||
for (int x = -samples / 2; x < samples / 2; ++x) {
|
for (int x = -samples / 2; x < samples / 2; ++x) {
|
||||||
for (int y = -samples / 2; y < samples / 2; ++y) {
|
for (int y = -samples / 2; y < samples / 2; ++y) {
|
||||||
offset = vec2(float(x), float(y));
|
offset = vec2(float(x), float(y));
|
||||||
|
@ -29,7 +29,7 @@ vec3 blur(sampler2D sp, vec2 uv, vec2 scale) {
|
||||||
accum += weight;
|
accum += weight;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return col / accum;
|
return col / accum;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -39,22 +39,22 @@ vec2 rotateUV(vec2 uv, vec2 pivot, float rotation) {
|
||||||
uv -= pivot;
|
uv -= pivot;
|
||||||
return vec2(
|
return vec2(
|
||||||
cosa * uv.x - sina * uv.y,
|
cosa * uv.x - sina * uv.y,
|
||||||
cosa * uv.y + sina * uv.x
|
cosa * uv.y + sina * uv.x
|
||||||
) + pivot;
|
) + pivot;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void fragment() {
|
void fragment() {
|
||||||
|
|
||||||
vec2 uv = UV ;
|
vec2 uv = UV ;
|
||||||
vec2 rotuv=rotateUV(uv,rotationpivot,TIME*speed);
|
vec2 rotuv=rotateUV(uv,rotationpivot,TIME*speed);
|
||||||
|
|
||||||
float _strength=abs(0.47-uv.y)*strength;
|
float _strength=abs(0.47-uv.y)*strength;
|
||||||
vec2 ps = vec2(1.0) / iResolution.xy * .000001 * _strength;
|
vec2 ps = vec2(1.0) / iResolution.xy * .000001 * _strength;
|
||||||
|
|
||||||
|
|
||||||
//COLOR.rgb=texture(iChannel0, uv).rgb;
|
//COLOR.rgb=texture(iChannel0, uv).rgb;
|
||||||
|
|
||||||
COLOR.rgb = blur(iChannel0, rotuv, ps );
|
COLOR.rgb = blur(iChannel0, rotuv, ps );
|
||||||
COLOR.a = 1.0;
|
COLOR.a = 1.0;
|
||||||
}
|
}
|
Loading…
Add table
Reference in a new issue