diff options
| author | Xavier Del Campo Romero <xavi92@disroot.org> | 2026-11-14 20:52:16 +0100 |
|---|---|---|
| committer | Xavier Del Campo Romero <xavi92@disroot.org> | 2026-11-14 20:52:16 +0100 |
| commit | 073d2019f6cc295aff9ca59f77dae77c1cdfdb06 (patch) | |
| tree | 4f4f3e82c69ab258211b853308a7438276ad037e | |
| parent | 1b126744d96d61c36eb25e87b5d35cc75b1e7e56 (diff) | |
| download | nj26-073d2019f6cc295aff9ca59f77dae77c1cdfdb06.tar.gz | |
WIP
| -rw-r--r-- | Spatial.gd | 24 | ||||
| -rw-r--r-- | Spatial.tscn | 19 | ||||
| -rw-r--r-- | cat.gd | 2 | ||||
| -rw-r--r-- | cat/c0.png | bin | 11875 -> 38070 bytes | |||
| -rw-r--r-- | cat/c1.png | bin | 9273 -> 47034 bytes | |||
| -rw-r--r-- | cat/c10.png | bin | 12606 -> 37615 bytes | |||
| -rw-r--r-- | cat/c11.png | bin | 9979 -> 38594 bytes | |||
| -rw-r--r-- | cat/c12.png | bin | 11942 -> 41245 bytes | |||
| -rw-r--r-- | cat/c13.png | bin | 12669 -> 41021 bytes | |||
| -rw-r--r-- | cat/c14.png | bin | 10801 -> 38341 bytes | |||
| -rw-r--r-- | cat/c15.png | bin | 11594 -> 38341 bytes | |||
| -rw-r--r-- | cat/c16.png | bin | 12821 -> 37576 bytes | |||
| -rw-r--r-- | cat/c17.png | bin | 10899 -> 38838 bytes | |||
| -rw-r--r-- | cat/c18.png | bin | 13781 -> 38159 bytes | |||
| -rw-r--r-- | cat/c19.png | bin | 12899 -> 37493 bytes | |||
| -rw-r--r-- | cat/c2.png | bin | 11317 -> 45730 bytes | |||
| -rw-r--r-- | cat/c3.png | bin | 11958 -> 45730 bytes | |||
| -rw-r--r-- | cat/c4.png | bin | 10173 -> 41845 bytes | |||
| -rw-r--r-- | cat/c5.png | bin | 10862 -> 37285 bytes | |||
| -rw-r--r-- | cat/c6.png | bin | 12236 -> 43474 bytes | |||
| -rw-r--r-- | cat/c7.png | bin | 10199 -> 41021 bytes | |||
| -rw-r--r-- | cat/c8.png | bin | 13026 -> 38744 bytes | |||
| -rw-r--r-- | cat/c9.png | bin | 12213 -> 38058 bytes | |||
| -rw-r--r-- | jail.tscn | 11 | ||||
| -rw-r--r-- | project.godot | 8 |
25 files changed, 45 insertions, 19 deletions
@@ -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="."] @@ -1,4 +1,4 @@ -extends MeshInstance +class_name Cat extends MeshInstance var images: Dictionary = {} var frame_i = 0 Binary files differBinary files differdiff --git a/cat/c10.png b/cat/c10.png Binary files differindex d579ceb..0d8f49d 100644 --- a/cat/c10.png +++ b/cat/c10.png diff --git a/cat/c11.png b/cat/c11.png Binary files differindex 2c030c2..156b58c 100644 --- a/cat/c11.png +++ b/cat/c11.png diff --git a/cat/c12.png b/cat/c12.png Binary files differindex 39089b7..d918d1e 100644 --- a/cat/c12.png +++ b/cat/c12.png diff --git a/cat/c13.png b/cat/c13.png Binary files differindex dd8796a..09c868c 100644 --- a/cat/c13.png +++ b/cat/c13.png diff --git a/cat/c14.png b/cat/c14.png Binary files differindex f726cfa..6fa51c4 100644 --- a/cat/c14.png +++ b/cat/c14.png diff --git a/cat/c15.png b/cat/c15.png Binary files differindex 80d49e1..6fa51c4 100644 --- a/cat/c15.png +++ b/cat/c15.png diff --git a/cat/c16.png b/cat/c16.png Binary files differindex 18979aa..8c7a535 100644 --- a/cat/c16.png +++ b/cat/c16.png diff --git a/cat/c17.png b/cat/c17.png Binary files differindex 4702423..5554842 100644 --- a/cat/c17.png +++ b/cat/c17.png diff --git a/cat/c18.png b/cat/c18.png Binary files differindex b24097d..3a7761c 100644 --- a/cat/c18.png +++ b/cat/c18.png diff --git a/cat/c19.png b/cat/c19.png Binary files differBinary files differBinary files differBinary files differBinary files differBinary files differBinary files differBinary files differBinary files differindex 91fa9e6..5a79233 100644 --- a/cat/c19.png +++ b/cat/c19.png @@ -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" |
