summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Spatial.gd6
-rw-r--r--explosion.pngbin0 -> 465877 bytes
-rw-r--r--magnet.pngbin0 -> 86330 bytes
-rw-r--r--powerup.gd9
-rw-r--r--swap.pngbin0 -> 528238 bytes
-rw-r--r--zombie.gd1
6 files changed, 9 insertions, 7 deletions
diff --git a/Spatial.gd b/Spatial.gd
index 8eb07a8..6f0a335 100644
--- a/Spatial.gd
+++ b/Spatial.gd
@@ -142,7 +142,7 @@ func create_powerup():
func _on_powerup_timeout():
create_powerup()
- $powerup_timer.start(randi() % 16 + 5)
+ $powerup_timer.start(randi() % 10 + 3)
func game_over():
$game_time.stop()
@@ -171,7 +171,7 @@ func _on_box_timeout():
team = t.Team.PINK
create_box(team)
- $box_timer.start(randi() % 16 + 5)
+ $box_timer.start(randi() % 10 + 3)
func start_game():
for z in zombies:
@@ -192,7 +192,7 @@ func _ready():
create_zombie(2, t.Team.PINK, Vector3(6.0, 0, -3))
create_zombie(3, t.Team.PINK, Vector3(6.0, 0, 3))
- for _i in range(randi() % 4 + 1):
+ for _i in range(randi() % 6 + 2):
create_powerup()
for _i in range(15):
diff --git a/explosion.png b/explosion.png
new file mode 100644
index 0000000..9584c5c
--- /dev/null
+++ b/explosion.png
Binary files differ
diff --git a/magnet.png b/magnet.png
new file mode 100644
index 0000000..ead70c3
--- /dev/null
+++ b/magnet.png
Binary files differ
diff --git a/powerup.gd b/powerup.gd
index 3f0210c..97b3f2d 100644
--- a/powerup.gd
+++ b/powerup.gd
@@ -33,20 +33,23 @@ func _physics_process(delta):
func _ready():
var color = Color(0, 0, 0, 0)
+ var material = $MeshInstance.get_active_material(0).duplicate()
match mytype:
Type.magnet:
color = Color(0, 0.8, 0.8, 1.0)
+ material.albedo_texture = load("res://magnet.png")
Type.explosion:
color = Color(0.8, 0, 0, 1.0)
+ material.albedo_texture = load("res://explosion.png")
Type.superspeed:
color = Color(0, 0.8, 0, 1.0)
+ material.albedo_texture = load("res://speed.png")
Type.swap:
color = Color(0.8, 0.8, 0.8, 1.0)
+ material.albedo_texture = load("res://swap.png")
- var material = $MeshInstance.get_active_material(0)
-
- material.albedo_texture = load("res://speed.png")
+ $MeshInstance.set_surface_material(0, material)
$light.light_color = color
initpos = global_transform.origin.y
diff --git a/swap.png b/swap.png
new file mode 100644
index 0000000..0158c52
--- /dev/null
+++ b/swap.png
Binary files differ
diff --git a/zombie.gd b/zombie.gd
index a8e6d8e..5c8beef 100644
--- a/zombie.gd
+++ b/zombie.gd
@@ -40,7 +40,6 @@ func _on_timer():
expired()
func set_can_move(value):
- print(self)
can_move = value
func _physics_process(delta):