Skip to content

Commit 01abfbd

Browse files
committed
Ported to 3.5 and fixed bugs.
1 parent 6de4c7a commit 01abfbd

File tree

3 files changed

+8
-6
lines changed

3 files changed

+8
-6
lines changed

Scenes/Game.tscn

+2-2
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ tracks = [ ExtResource( 19 ), ExtResource( 18 ), ExtResource( 21 ), ExtResource(
7474
volumes = {
7575
ExtResource( 19 ): 6.0,
7676
ExtResource( 18 ): 0.0,
77-
ExtResource( 21 ): -6.0,
7877
ExtResource( 22 ): 0.0,
79-
ExtResource( 20 ): 0.0
78+
ExtResource( 20 ): 0.0,
79+
ExtResource( 21 ): -6.0
8080
}

Scenes/UI/GUI/Crosshair.tscn

+3-3
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ uniform vec2 center = vec2(0.5);
1414
uniform vec4 color : hint_color;
1515
void fragment(){
1616
//Default to transparent
17-
COLOR.a = 0f;
17+
COLOR.a = 0.0f;
1818

1919
//Wanna calculate like Position(0,0) is in the middle not the upper left corner
2020
float uv_x=UV.x-0.5;
@@ -28,8 +28,8 @@ void fragment(){
2828
float curr_coord = uv_x*uv_x+uv_y*uv_y;
2929
float dist = distance(center,UV);
3030
float amplitude = abs(dist-radius)-start_fading;
31-
if (amplitude < 0f){
32-
amplitude = 0f;
31+
if (amplitude < 0.0f){
32+
amplitude = 0.0f;
3333
}
3434
//COLOR.a = 1.0-dist;
3535
if (amplitude <= width){

Scripts/Spawner.gd

+3-1
Original file line numberDiff line numberDiff line change
@@ -101,14 +101,16 @@ func handle_enemy_spawning(delta)->void:
101101
return
102102

103103
func spawn_at(scene,pos,apply_difficulty=false):
104+
call_deferred("_spawn_at",scene,pos,apply_difficulty)
105+
106+
func _spawn_at(scene,pos,apply_difficulty=false):
104107
var _obj = scene.instance()
105108
game.add_child(_obj)
106109
_obj.global_position = pos
107110
if apply_difficulty and _obj.is_in_group("ENEMIES"):
108111
_obj.set_damage(_obj.damage * enemy_damage_mult)
109112
_obj.set_speed(_obj.speed * enemy_speed_mult)
110113
_obj.set_max_health(_obj.max_health * enemy_speed_mult)
111-
pass
112114

113115
func spawn(scene):
114116
var _obj = scene.instance()

0 commit comments

Comments
 (0)