-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
bad programming
- Loading branch information
Showing
9 changed files
with
80 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
extends Node | ||
|
||
var scene: String = "" | ||
var player_start: NodePath = "" | ||
|
||
func _process(_delta: float) -> void: | ||
var current_scene = get_tree().current_scene.scene_file_path | ||
if current_scene != scene: | ||
scene = current_scene | ||
player_start = "" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
extends Area2D | ||
|
||
@export var spawn: Node2D | ||
|
||
func _on_body_entered(body: Node2D) -> void: | ||
if body.is_in_group("player"): | ||
var thingy := get_tree().current_scene | ||
CheckpointHackPleaseRefactor.player_start = thingy.get_path_to(spawn) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
[gd_scene load_steps=2 format=3 uid="uid://ctmd48hogdw2w"] | ||
|
||
[ext_resource type="Script" path="res://objects/checkpoint.gd" id="1_rujm0"] | ||
|
||
[node name="checkpoint" type="Area2D"] | ||
collision_layer = 0 | ||
collision_mask = 2 | ||
script = ExtResource("1_rujm0") | ||
|
||
[connection signal="body_entered" from="." to="." method="_on_body_entered"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters