Created
September 13, 2013 16:46
-
-
Save jmcguirk/6553120 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
using System.Collections; | |
using Prime31; | |
using System; | |
/// <summary> | |
/// Test popup for error handling | |
/// </summary> | |
public class TestErrorPopup: MonoBehaviour | |
{ | |
void Update() { | |
if (TriggerReady) { | |
TriggerError(); | |
} | |
if (TriggerReady2) { | |
TriggerError2(); | |
} | |
} | |
protected void OnErrorAPressed() { | |
GameLog.error("Error A pressed"); | |
TriggerReady = true; | |
} | |
protected void OnErrorBPressed() { | |
GameLog.error("Error B pressed"); | |
TriggerError(); | |
} | |
protected void OnErrorCPressed() { | |
GameLog.error("Error C pressed"); | |
TriggerReady2 = true; | |
} | |
protected void OnErrorDPressed() { | |
GameLog.error("Error D pressed"); | |
TriggerError2(); | |
} | |
protected void TriggerError() { | |
TriggerReady = false; | |
GameObject npe = null; | |
npe.GetComponent<AnimationComponent>(); | |
} | |
protected void TriggerError2() { | |
TriggerReady2 = false; | |
try { | |
GameObject npe = null; | |
npe.GetComponent<AnimationComponent>(); | |
} catch (Exception ex) { | |
GameLog.error("Error message 2 exception caught"); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment