I have this code that once the player gets near a spawner point is disables a script that spawns the mobs, problem is that I dont know how to disable c# scripts from java.
var player : Transform;
var distance = 3;
var CloseEnough : boolean = false;
//Var Script
function Update(){
if(Vector2.Distance(transform.position, player.position) < distance){
CloseEnough = true;
//Disable Script
}
else{
CloseEnough = false;
//Enable Script
}
}