Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void Awake ()
- {
- saveDirPath = Application.dataPath + "/Levels/";
- Tools.Assert (buttonSave != null, "buttonSave is not assigned");
- UIEventListener.Get (buttonSave.gameObject).onClick += OnButtonSave_Click;
- Tools.Assert (buttonLoad != null, "buttonLoad is not assigned");
- UIEventListener.Get (buttonLoad.gameObject).onClick += OnButtonLoad_Click;
- Tools.Assert (buttonInputDialogOk != null, "buttonInputDialogOk is not assigned");
- UIEventListener.Get (buttonInputDialogOk.gameObject).onClick += OnButtonInputDialogOk_Click;
- Tools.Assert (buttonInputDialogCancel != null, "buttonImputDialogCancel is not assigned");
- UIEventListener.Get (buttonInputDialogCancel.gameObject).onClick += OnButtonInputDialogCancel_Click;
- Tools.Assert (buttonselectLevelDialogClose != null, "buttonselectLevelDialogClose is not assigned");
- UIEventListener.Get (buttonselectLevelDialogClose.gameObject).onClick += OnButtonselectLevelDialogClose_Click;
- }
- //in Tools class
- public static void Assert (bool condition, string message)
- {
- #if UNITY_EDITOR
- if (!condition) {
- throw new UnityException (message);
- }
- #endif
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement