OutOfBody/Scripts/Entrance.cs

14 lines
524 B
C#

using Godot;
using System;
public partial class Entrance : StaticBody2D
{
// even more basic than the exit, this just makes sure the player is in the starting location when swapping between levels
public override void _Ready()
{
GetNode<StaticBody2D>("/root/OutofBody/Chloek").GlobalPosition = Position;
// looks funny when this is gone, but this just makes sure that between levels the player's sprite is teleported with the actual player
GetNode<Chloek>("/root/OutofBody/Chloek").spriteMovement = Position;
}
}