mmorpg/Assets/Mirror/Examples/Billiards/Ball/RedBall.cs
2024-08-23 16:17:24 +05:30

16 lines
358 B
C#
Executable File

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);
}
}
}