// in case something happens to savefile, it would be reinitialized to this public static void initialize() { instance = new SavedGestures(); instance.highScore = 0; Vector3[] square = new Vector3[5] { new Vector3(5, 5, 0), new Vector3(5, -5, 0), new Vector3(-5, -5, 0), new Vector3(-5, 5, 0), new Vector3(5, 5, 0) }; instance.gestures.Add(RecognitionScript.ProcessNewTemplate(square)); Vector3[] triangle = new Vector3[4] { new Vector3(0, 4, 0), new Vector3(2, 0, 0), new Vector3(-2, 0, 0), new Vector3(0, 4, 0) }; instance.gestures.Add(RecognitionScript.ProcessNewTemplate(triangle)); Vector3[] star = new Vector3[6] { new Vector3(0, 2, 0), new Vector3(2, -2, 0), new Vector3(-2, 1, 0), new Vector3(2, 1, 0), new Vector3(-2, -2, 0), new Vector3(0, 2, 0) }; instance.gestures.Add(RecognitionScript.ProcessNewTemplate(star)); instance.Save(); instance.Load(); }
public static SavedGestures GetInstance() { if (instance == null) { instance = new SavedGestures(); instance.Load(); } return instance; }