Add a savegame system using slots and a main menu, allow player to move RigidBody2Ds using apply_impulse(), increased physics tick, enabled FXAA, and more.
This commit is contained in:
parent
35ebe26340
commit
5a67d46d6f
13 changed files with 291 additions and 25 deletions
|
@ -1,5 +1,9 @@
|
|||
extends Node2D
|
||||
|
||||
func _on_area_2d_body_entered(body: Node2D) -> void:
|
||||
if body == Levels.player:
|
||||
Levels.load_entrypoint("intro_start")
|
||||
if body == NodeRegistry.player:
|
||||
NodeRegistry.player.die()
|
||||
|
||||
func _on_next_level_body_entered(body: Node2D) -> void:
|
||||
if body == NodeRegistry.player:
|
||||
Levels.load_entrypoint("test")
|
||||
|
|
|
@ -24,4 +24,11 @@ color = Color(1, 0.1, 0, 1)
|
|||
polygon = PackedVector2Array(256, 384, 360, 384, 360, 440, 256, 440)
|
||||
color = Color(1, 0.1, 0, 1)
|
||||
|
||||
[node name="next_level" type="Area2D" parent="."]
|
||||
|
||||
[node name="Polygon" parent="next_level" instance=ExtResource("1_cup10")]
|
||||
polygon = PackedVector2Array(416, 400, 416, 424, 440, 424, 440, 400)
|
||||
color = Color(0.484431, 0.687354, 1, 1)
|
||||
|
||||
[connection signal="body_entered" from="Area2D" to="." method="_on_area_2d_body_entered"]
|
||||
[connection signal="body_entered" from="next_level" to="." method="_on_next_level_body_entered"]
|
||||
|
|
10
levels/test.tscn
Normal file
10
levels/test.tscn
Normal file
|
@ -0,0 +1,10 @@
|
|||
[gd_scene load_steps=2 format=3 uid="uid://dqf665b540tfg"]
|
||||
|
||||
[ext_resource type="PackedScene" uid="uid://cbynoofsjcl45" path="res://core/polygon.tscn" id="1_xm2ft"]
|
||||
|
||||
[node name="Test" type="Node2D"]
|
||||
|
||||
[node name="StaticBody2D" type="StaticBody2D" parent="."]
|
||||
|
||||
[node name="Polygon" parent="StaticBody2D" instance=ExtResource("1_xm2ft")]
|
||||
polygon = PackedVector2Array(-104, 232, -104, 320, 552, 320, 552, 232)
|
Reference in a new issue