private static void Main(string[] args) { Agent agent1 = new MyopicAgent(); Agent agent2 = new ScoreAgent(); PitAgents(agent1, agent2, 100); Console.WriteLine("Stopping..."); Console.ReadLine(); }
void Awake() { if( mInstance != null ) { Debug.LogError( string.Format( "Only one instance of ScoreAgent allowed! Destroying:" + gameObject.name +", Other:" + mInstance.gameObject.name ) ); Destroy( gameObject ); return; } mInstance = this; }