summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Spatial.gd24
-rw-r--r--Spatial.tscn19
-rw-r--r--cat.gd2
-rw-r--r--cat/c0.pngbin11875 -> 38070 bytes
-rw-r--r--cat/c1.pngbin9273 -> 47034 bytes
-rw-r--r--cat/c10.pngbin12606 -> 37615 bytes
-rw-r--r--cat/c11.pngbin9979 -> 38594 bytes
-rw-r--r--cat/c12.pngbin11942 -> 41245 bytes
-rw-r--r--cat/c13.pngbin12669 -> 41021 bytes
-rw-r--r--cat/c14.pngbin10801 -> 38341 bytes
-rw-r--r--cat/c15.pngbin11594 -> 38341 bytes
-rw-r--r--cat/c16.pngbin12821 -> 37576 bytes
-rw-r--r--cat/c17.pngbin10899 -> 38838 bytes
-rw-r--r--cat/c18.pngbin13781 -> 38159 bytes
-rw-r--r--cat/c19.pngbin12899 -> 37493 bytes
-rw-r--r--cat/c2.pngbin11317 -> 45730 bytes
-rw-r--r--cat/c3.pngbin11958 -> 45730 bytes
-rw-r--r--cat/c4.pngbin10173 -> 41845 bytes
-rw-r--r--cat/c5.pngbin10862 -> 37285 bytes
-rw-r--r--cat/c6.pngbin12236 -> 43474 bytes
-rw-r--r--cat/c7.pngbin10199 -> 41021 bytes
-rw-r--r--cat/c8.pngbin13026 -> 38744 bytes
-rw-r--r--cat/c9.pngbin12213 -> 38058 bytes
-rw-r--r--jail.tscn11
-rw-r--r--project.godot8
25 files changed, 45 insertions, 19 deletions
diff --git a/Spatial.gd b/Spatial.gd
index c14041d..521046e 100644
--- a/Spatial.gd
+++ b/Spatial.gd
@@ -11,6 +11,8 @@ var pink_points = 0
var jailpos: Vector3
var zombies = []
var boxes = []
+var done = false
+var finalpos
signal new_points
@@ -23,7 +25,9 @@ func set_points(box, points):
pink_points += points
on_points()
- jailpos -= Vector3(0, points * 0.375, 0)
+ # jailpos -= Vector3(0, points * 0.375, 0)
+ # jailpos -= Vector3(0, points * 0.45, 0)
+ jailpos -= Vector3(0, points * 3, 0)
func _entered(box):
set_points(box, 1)
@@ -35,14 +39,26 @@ func on_points():
$CanvasLayer/blue.text = "Team Blue: %d" % blue_points
$CanvasLayer/pink.text = "Team Pink: %d" % pink_points
+func _create_cat():
+ var cat = load("res://cat.tscn").instance()
+ add_child(cat)
+
func _physics_process(delta):
var jail = get_node("jail")
+
+ if done:
+ jail.global_transform.origin = finalpos
+ return
+
var pos = jail.global_transform.origin
var diff = jailpos.y - lerp(jailpos.y, pos.y, delta)
- jail.translate(Vector3(0, diff, 0))
-
- # jail.move_and_collide()
+ if !jail.get_colliding_bodies().size():
+ jail.translate(Vector3(0, diff, 0))
+ else:
+ done = true
+ _create_cat()
+ finalpos = jail.global_transform.origin
for z in zombies:
z.run_powerup(boxes, zombies)
diff --git a/Spatial.tscn b/Spatial.tscn
index 04ec6c7..01ed524 100644
--- a/Spatial.tscn
+++ b/Spatial.tscn
@@ -123,35 +123,36 @@ shadow_enabled = true
[node name="jail" parent="." instance=ExtResource( 3 )]
transform = Transform( -4.37114e-08, 0, 1, 0, 1, 0, -1, 0, -4.37114e-08, 0, 15.315, 0 )
-continuous_cd = true
+contacts_reported = 3
+contact_monitor = true
[node name="reserved" type="RigidBody" parent="."]
-collision_layer = 4
-collision_mask = 4
+collision_layer = 3
+collision_mask = 3
mode = 1
continuous_cd = true
can_sleep = false
[node name="CollisionShape" type="CollisionShape" parent="reserved"]
-transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -1.16622, 0 )
+transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -0.482761, 0 )
shape = SubResource( 9 )
[node name="MeshInstance" type="MeshInstance" parent="reserved"]
-transform = Transform( 1.8, 0, 0, 0, 1.8, 0, 0, 0, 1.81, 0, -2.50616, 0 )
+transform = Transform( 1.8, 0, 0, 0, 1.8, 0, 0, 0, 1.81, 0, -2.65038, 0 )
mesh = SubResource( 10 )
[node name="reserved2" type="RigidBody" parent="."]
-collision_layer = 3
-collision_mask = 3
+collision_layer = 4
+collision_mask = 4
mode = 1
continuous_cd = true
[node name="CollisionShape" type="CollisionShape" parent="reserved2"]
-transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.248234, 0 )
+transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -1.01591, 0 )
shape = SubResource( 9 )
[node name="MeshInstance" type="MeshInstance" parent="reserved2"]
-transform = Transform( 1.8, 0, 0, 0, 1.8, 0, 0, 0, 1.81, 0, -2.50616, 0 )
+transform = Transform( 1.8, 0, 0, 0, 1.8, 0, 0, 0, 1.81, 0, -2.53708, 0 )
mesh = SubResource( 10 )
[node name="StaticBody" type="StaticBody" parent="."]
diff --git a/cat.gd b/cat.gd
index 4520782..7547bc4 100644
--- a/cat.gd
+++ b/cat.gd
@@ -1,4 +1,4 @@
-extends MeshInstance
+class_name Cat extends MeshInstance
var images: Dictionary = {}
var frame_i = 0
diff --git a/cat/c0.png b/cat/c0.png
index 89d24ad..8ab4d79 100644
--- a/cat/c0.png
+++ b/cat/c0.png
Binary files differ
diff --git a/cat/c1.png b/cat/c1.png
index d79cadb..09fdc70 100644
--- a/cat/c1.png
+++ b/cat/c1.png
Binary files differ
diff --git a/cat/c10.png b/cat/c10.png
index d579ceb..0d8f49d 100644
--- a/cat/c10.png
+++ b/cat/c10.png
Binary files differ
diff --git a/cat/c11.png b/cat/c11.png
index 2c030c2..156b58c 100644
--- a/cat/c11.png
+++ b/cat/c11.png
Binary files differ
diff --git a/cat/c12.png b/cat/c12.png
index 39089b7..d918d1e 100644
--- a/cat/c12.png
+++ b/cat/c12.png
Binary files differ
diff --git a/cat/c13.png b/cat/c13.png
index dd8796a..09c868c 100644
--- a/cat/c13.png
+++ b/cat/c13.png
Binary files differ
diff --git a/cat/c14.png b/cat/c14.png
index f726cfa..6fa51c4 100644
--- a/cat/c14.png
+++ b/cat/c14.png
Binary files differ
diff --git a/cat/c15.png b/cat/c15.png
index 80d49e1..6fa51c4 100644
--- a/cat/c15.png
+++ b/cat/c15.png
Binary files differ
diff --git a/cat/c16.png b/cat/c16.png
index 18979aa..8c7a535 100644
--- a/cat/c16.png
+++ b/cat/c16.png
Binary files differ
diff --git a/cat/c17.png b/cat/c17.png
index 4702423..5554842 100644
--- a/cat/c17.png
+++ b/cat/c17.png
Binary files differ
diff --git a/cat/c18.png b/cat/c18.png
index b24097d..3a7761c 100644
--- a/cat/c18.png
+++ b/cat/c18.png
Binary files differ
diff --git a/cat/c19.png b/cat/c19.png
index 91fa9e6..5a79233 100644
--- a/cat/c19.png
+++ b/cat/c19.png
Binary files differ
diff --git a/cat/c2.png b/cat/c2.png
index 5454da9..7e239f6 100644
--- a/cat/c2.png
+++ b/cat/c2.png
Binary files differ
diff --git a/cat/c3.png b/cat/c3.png
index ac797bf..7e239f6 100644
--- a/cat/c3.png
+++ b/cat/c3.png
Binary files differ
diff --git a/cat/c4.png b/cat/c4.png
index 0996f74..2cb7e55 100644
--- a/cat/c4.png
+++ b/cat/c4.png
Binary files differ
diff --git a/cat/c5.png b/cat/c5.png
index f735f1f..d730a61 100644
--- a/cat/c5.png
+++ b/cat/c5.png
Binary files differ
diff --git a/cat/c6.png b/cat/c6.png
index d28b127..56ea1db 100644
--- a/cat/c6.png
+++ b/cat/c6.png
Binary files differ
diff --git a/cat/c7.png b/cat/c7.png
index d5aac8a..09c868c 100644
--- a/cat/c7.png
+++ b/cat/c7.png
Binary files differ
diff --git a/cat/c8.png b/cat/c8.png
index 000a9d8..9d3f7ae 100644
--- a/cat/c8.png
+++ b/cat/c8.png
Binary files differ
diff --git a/cat/c9.png b/cat/c9.png
index c6dc056..64fb589 100644
--- a/cat/c9.png
+++ b/cat/c9.png
Binary files differ
diff --git a/jail.tscn b/jail.tscn
index 2899b1f..2593bdb 100644
--- a/jail.tscn
+++ b/jail.tscn
@@ -8,11 +8,14 @@ size = Vector2( 2, 12 )
[sub_resource type="SpatialMaterial" id=2]
flags_transparent = true
+flags_unshaded = true
albedo_texture = ExtResource( 1 )
[sub_resource type="PlaneMesh" id=4]
+size = Vector2( 3, 3 )
[sub_resource type="SpatialMaterial" id=5]
+flags_transparent = true
[sub_resource type="BoxShape" id=3]
extents = Vector3( 0.1, 10.75, 2 )
@@ -20,8 +23,9 @@ extents = Vector3( 0.1, 10.75, 2 )
[node name="RigidBody" type="RigidBody"]
collision_layer = 4
collision_mask = 4
-mode = 1
gravity_scale = 0.0
+continuous_cd = true
+can_sleep = false
[node name="Spatial" type="Spatial" parent="."]
transform = Transform( 2, 0, 0, 0, 2, 0, 0, 0, 2, 0, 0, 0 )
@@ -31,9 +35,10 @@ transform = Transform( 1.31134e-07, -1, 3.82137e-15, 4.37114e-08, 1.91069e-15, -
mesh = SubResource( 1 )
material/0 = SubResource( 2 )
-[node name="cat" type="MeshInstance" parent="Spatial/MeshInstance"]
-transform = Transform( 0.5, 0, 0, 0, 0.5, -2.11758e-22, 0, 6.35275e-22, 0.5, 0.0201623, -0.1, 5.11694 )
+[node name="cat" type="MeshInstance" parent="Spatial"]
+transform = Transform( 6.55671e-08, -0.5, 1.91069e-15, 2.18557e-08, 9.55342e-16, -0.5, 0.5, 6.55671e-08, 2.18557e-08, 0.430103, -5.52628, 0.0201625 )
mesh = SubResource( 4 )
+skeleton = NodePath("../MeshInstance")
material/0 = SubResource( 5 )
script = ExtResource( 2 )
diff --git a/project.godot b/project.godot
index 8d51040..530e803 100644
--- a/project.godot
+++ b/project.godot
@@ -14,6 +14,11 @@ _global_script_classes=[ {
"language": "GDScript",
"path": "res://box.gd"
}, {
+"base": "MeshInstance",
+"class": "Cat",
+"language": "GDScript",
+"path": "res://cat.gd"
+}, {
"base": "KinematicBody",
"class": "Powerup",
"language": "GDScript",
@@ -26,6 +31,7 @@ _global_script_classes=[ {
} ]
_global_script_class_icons={
"Box": "",
+"Cat": "",
"Powerup": "",
"Zombie": ""
}
@@ -163,6 +169,4 @@ common/enable_pause_aware_picking=true
quality/driver/driver_name="GLES2"
vram_compression/import_etc=true
vram_compression/import_etc2=false
-quality/filters/msaa=1
-quality/filters/use_fxaa=true
environment/default_environment="res://default_env.tres"