nobody is reading this
This commit is contained in:
15
Scripts/P1SpawnPoint.cs
Normal file
15
Scripts/P1SpawnPoint.cs
Normal 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
15
Scripts/P2SpawnPoint.cs
Normal 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;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user