예제 #1
0
		void Start()
		{
			console = GVConsole.ins;
			if (console == null)
			{
				Debug.LogError("No GVConsole found!");
			}

			codeManager = CEManager.ins;
			if (codeManager == null)
			{
				Debug.LogError("No CEManager found!");
			}
		}
예제 #2
0
		void Awake()
		{
			if (_ins == null)
			{
				// Populate with first instance
				_ins = this;
				DontDestroyOnLoad(this);
			}
			else
			{
				// Another instance exists, destroy
				if (this != _ins)
					Destroy(this.gameObject);
			}

			if (setupSyntaxHighlighter)
				SetupSyntaxHighlighter(keywordTxtFiles);

			if (setupUCCE)
				SetupUCCE();
		}
예제 #3
0
	void Start () {
		if (title == null)
		{
			Debug.LogError("No title text object referenced");
		}
		if (subject == null)
		{
			Debug.LogError("No subject text object referenced");
		}
		if (explaination == null)
		{
			Debug.LogError("No explaination text object referenced");
		}
		if (codeDesc == null)
		{
			Debug.LogError("No codeDesc object referenced");
		}
		if (descBulletPoint == null)
		{
			Debug.LogError("No descBulletPoint prefab referenced");
		}
		if (examples == null)
		{
			Debug.LogError("No examples object referenced");
		}
		if (codeField == null)
		{
			Debug.LogError("No codeField object referenced");
		}
		if (instructions == null)
		{
			Debug.LogError("No instructions object referenced");
		}
		if (courseViewDropdown == null)
		{
			Debug.LogError("No courseViewDropdown referenced");
		}
		if (gvControls == null)
		{
			Debug.LogError("No gvControls referenced");
		}

		// Modal panel
		modalPanel = ModalPanel.ins;
		if (modalPanel == null)
		{
			Debug.LogError("No modal panel?");
		}
		yesResetCode = new UnityAction(_ResetCode);
		noResetCode = new UnityAction(_DoNothing);
		yesShowSolution = new UnityAction(_ShowSolution);
		noShowSolution = new UnityAction(_DoNothing);

		// Course manager
		courseManager = CourseManager.ins;
		if (courseManager == null)
		{
			Debug.LogError("No CourseManager?");
		}

		//GameView manager
		gvManager = GVManager.ins;
		if (gvManager == null)
		{
			Debug.LogError("No GVManager?");
		}

		//CodeEnvironment manager
		ceManager = CEManager.ins;
		if (ceManager == null)
		{
			Debug.LogError("No CEManager?");
		}
	}