/// <summary> /// Instantiate a new object frame action model /// </summary> /// <param name="objectPath">The path of the file that specify the action frame values</param> public ObjectAction(string objectPath) { using (var stream = WaveServices.Storage.OpenContentFile(objectPath)) { var streamReader = new StreamReader(stream); string line = streamReader.ReadLine(); this.Periods = new ActionPeriod[int.Parse(line)]; for (int i = 0; i < this.Periods.Length; i++) { line = streamReader.ReadLine(); string[] lineParts = line.Split(' '); ActionPeriod period = new ActionPeriod() { Start = int.Parse(lineParts[0]), End = int.Parse(lineParts[1]) }; this.Periods[i] = period; } } }