Files
Test-Multiplayer/Assets/Mirror/Examples/Billiards/Ball/RedBall.cs
pelpanagiotis 329b7d3183 First Commit
2025-12-21 18:31:02 +02:00

16 lines
358 B
C#

using UnityEngine;
namespace Mirror.Examples.Billiards
{
public class RedBall : NetworkBehaviour
{
// destroy when entering a pocket.
// there's only one trigger in the scene (the pocket).
[ServerCallback]
void OnTriggerEnter(Collider other)
{
NetworkServer.Destroy(gameObject);
}
}
}