You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
412 B
20 lines
412 B
using Godot;
|
|
using System;
|
|
using Babushka.scripts.CSharp.Common.Fight;
|
|
|
|
public partial class NextRoomTrigger : Area2D
|
|
{
|
|
[Export] private int pathIndex;
|
|
|
|
public override void _EnterTree()
|
|
{
|
|
BodyEntered += _OnBodyEnter;
|
|
}
|
|
|
|
private void _OnBodyEnter(Node2D other)
|
|
{
|
|
var fss = GetNode<FightSceneSwitcher>("%FightSceneSwitcher");
|
|
fss.SwitchRoom(pathIndex);
|
|
}
|
|
}
|