Files
BlueArchiveMiniGame/Assets/ThirdParty/Mirror/Examples/Billiards/Ball/RedBall.cs

16 lines
358 B
C#
Raw Normal View History

2025-09-17 18:56:28 +08:00
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);
}
}
}