示例#1
0
		/// <summary>
		/// Acquires the AI manager.
		/// </summary>
		private void AcquireAIManager()
		{
			GameObject ManagerGameObject = GameObject.FindGameObjectWithTag("AI Manager");
			if(!ManagerGameObject)
			{
				UnityDebug.LogError(@"GameObject tagged as 'AI Manager' Not found in scene");
			}
			else
			{
				Manager = ManagerGameObject.GetComponent<AIManager>() as AIManager;
				if(!Manager)
				{
					UnityDebug.LogError(@"GameObject tagged as 'AI Manager' found. But it is missing the AIManager component");
				}
			}
		}
示例#2
0
 private void Awake()
 {
     current = this;
 }