nobody is reading this

This commit is contained in:
2023-09-02 21:43:53 -07:00
parent 071010f652
commit 7764644b90
19 changed files with 320 additions and 51 deletions

15
Scripts/P1SpawnPoint.cs Normal file
View File

@@ -0,0 +1,15 @@
using Godot;
using System.Linq;
public partial class P1SpawnPoint : Marker3D
{
public override void _Ready()
{
var players = GetTree().GetNodesInGroup("Player1");
if (players.Any())
{
var player = (TestCharacter)players.First();
player.Position = Position;
}
}
}

15
Scripts/P2SpawnPoint.cs Normal file
View File

@@ -0,0 +1,15 @@
using Godot;
using System.Linq;
public partial class P2SpawnPoint : Marker3D
{
public override void _Ready()
{
var players = GetTree().GetNodesInGroup("Player2");
if (players.Any())
{
var player = (Player2)players.First();
player.Position = Position;
}
}
}

View File

@@ -1,11 +0,0 @@
using Godot;
public partial class SpawnPoint : Marker3D
{
// Called when the node enters the scene tree for the first time.
public override void _Ready()
{
var player = GetTree().GetFirstNodeInGroup("Player") as TestCharacter;
player.Position = Position;
}
}