23 lines
280 B
C#
23 lines
280 B
C#
using UnityEngine;
|
|
|
|
namespace Oculus.Platform.Samples.VrHoops
|
|
{
|
|
public class AIPlayer : Player
|
|
{
|
|
private void FixedUpdate()
|
|
{
|
|
if (base.HasBall)
|
|
{
|
|
if (Random.Range(0f, 1f) < 0.03f)
|
|
{
|
|
ShootBall();
|
|
}
|
|
}
|
|
else
|
|
{
|
|
CheckSpawnBall();
|
|
}
|
|
}
|
|
}
|
|
}
|