- Added InvalidOperation exception

- commented the line enum direction
This commit is contained in:
Samuel 2015-08-12 15:52:01 -04:00
parent baca9e1d20
commit 581334cbc6
3 changed files with 7 additions and 5 deletions

View File

@ -6,9 +6,9 @@ public class CharacterMovement : MonoBehaviour {
public int player;
public MovementManager mm;
enum direction { up = "Up",down = "Down", left = "Left", right = "Right", stop = "Stop" };
// code mis en commentaire par sam, raison : cannot convert from string to int (on ne pouvait pas compiler les scnènes dans unity sans mettre cette ligne en commentaire.)
//enum direction { up = "Up",down = "Down", left = "Left", right = "Right", stop = "Stop" };
enum direction { up, down, left, right, stop};
// Use this for initialization

View File

@ -74,8 +74,10 @@ public class MovementManager : MonoBehaviour
{
return p2MovBuffer.Dequeue();
}
}catch(Invalide e)
}catch(InvalidOperationException exception)
{
Debug.LogError("Reached the end of the queue we stop by default!: " + exception);
return "Stop";
}
return null;

View File

@ -77,7 +77,6 @@ PlayerSettings:
metroEnableIndependentInputSource: 0
metroEnableLowLatencyPresentationAPI: 0
xboxOneDisableKinectGpuReservation: 0
virtualRealitySupported: 0
productGUID: 54ead80470c104b4682c53a4f7f867b5
AndroidBundleVersionCode: 1
AndroidMinSdkVersion: 9
@ -255,6 +254,7 @@ PlayerSettings:
psp2InfoBarOnStartup: 0
psp2InfoBarColor: 0
psmSplashimage: {fileID: 0}
virtualRealitySupported: 0
spritePackerPolicy:
scriptingDefineSymbols: {}
metroPackageName: VZ