mmorpg/Assets/Mirror/Examples/BilliardsPredicted/Ball/RedBallPredicted.cs
2024-01-30 19:56:12 +05:30

16 lines
376 B
C#

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