aha
This commit is contained in:
15
Assets/Mirror/Examples/Billiards/Ball/RedBall.cs
Normal file
15
Assets/Mirror/Examples/Billiards/Ball/RedBall.cs
Normal file
@ -0,0 +1,15 @@
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user