-
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.
- Loading branch information
Showing
14 changed files
with
169 additions
and
202 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
Large diffs are not rendered by default.
Oops, something went wrong.
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
26 changes: 0 additions & 26 deletions
26
scenes/bundles/levels/interaction_tiles/basic_interaction_tile.tscn
This file was deleted.
Oops, something went wrong.
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,41 @@ | ||
[gd_scene load_steps=8 format=3 uid="uid://dfamu2vvdstal"] | ||
|
||
[ext_resource type="Script" path="res://scripts/level/tiles/CheckpointTile.gd" id="1_en437"] | ||
[ext_resource type="Texture2D" uid="uid://b0b34lhgbuxy5" path="res://assets/textures/tilesets/tileset.png" id="2_3mybj"] | ||
[ext_resource type="PackedScene" uid="uid://ci0p37ottv00" path="res://scenes/bundles/particles/DefaultCheckpointParticle.tscn" id="2_k1qwm"] | ||
|
||
[sub_resource type="AtlasTexture" id="AtlasTexture_0a1jv"] | ||
atlas = ExtResource("2_3mybj") | ||
region = Rect2(32, 48, 16, 16) | ||
|
||
[sub_resource type="AtlasTexture" id="AtlasTexture_bkckm"] | ||
atlas = ExtResource("2_3mybj") | ||
region = Rect2(64, 48, 16, 16) | ||
|
||
[sub_resource type="RectangleShape2D" id="RectangleShape2D_os5gs"] | ||
size = Vector2(16, 16) | ||
|
||
[sub_resource type="RectangleShape2D" id="RectangleShape2D_epn34"] | ||
size = Vector2(18, 18) | ||
|
||
[node name="CheckpointTile" type="StaticBody2D" node_paths=PackedStringArray("tile_off_texture", "interatcion_area")] | ||
collision_mask = 8 | ||
script = ExtResource("1_en437") | ||
tile_off_texture = NodePath("TileOff") | ||
checkpoint_particle = ExtResource("2_k1qwm") | ||
interatcion_area = NodePath("InteractionArea") | ||
|
||
[node name="TileOn" type="Sprite2D" parent="."] | ||
texture = SubResource("AtlasTexture_0a1jv") | ||
|
||
[node name="TileOff" type="Sprite2D" parent="."] | ||
texture = SubResource("AtlasTexture_bkckm") | ||
|
||
[node name="CollisionShape2D" type="CollisionShape2D" parent="."] | ||
shape = SubResource("RectangleShape2D_os5gs") | ||
|
||
[node name="InteractionArea" type="Area2D" parent="."] | ||
collision_mask = 8 | ||
|
||
[node name="CollisionShape2D" type="CollisionShape2D" parent="InteractionArea"] | ||
shape = SubResource("RectangleShape2D_epn34") |
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
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
Large diffs are not rendered by default.
Oops, something went wrong.
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,13 @@ | ||
extends InteractiveTile | ||
class_name CheckpointTile | ||
|
||
@export_category("Checkpoint components") | ||
@export var tile_off_texture: Sprite2D | ||
@export var checkpoint_particle: PackedScene | ||
|
||
func on_body_entered(body: Node2D) -> void: | ||
if body is PlayerComponent && tile_off_texture.visible: | ||
tile_off_texture.visible = false | ||
var spawn_point: Vector2 = global_position - Vector2(0, 32) | ||
body.get_node("DeathComponent").spawn_point = spawn_point | ||
Game.instanceNodeAtPos(checkpoint_particle, body.get_parent(), spawn_point) |
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,15 @@ | ||
extends StaticBody2D | ||
class_name InteractiveTile | ||
|
||
@export_category("Interaction Tile Dependencies") | ||
@export var interatcion_area: Area2D | ||
|
||
func _ready() -> void: | ||
interatcion_area.body_entered.connect(on_body_entered) | ||
interatcion_area.body_exited.connect(on_body_exited) | ||
|
||
func on_body_entered(body: Node2D) -> void: | ||
pass | ||
|
||
func on_body_exited(body: Node2D) -> void: | ||
pass |
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