Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using UnityEngine;
- using System.Collections;
- using System.Collections.Generic;
- public class Language {
- private static List<string> lines = new List<string> ();
- public static int lineCount {
- get {return Language.lines.Count;}
- }
- public static void LoadTextFile (TextAsset file) {
- int outParse = 0;
- foreach (string line in file.text.Split ('|')) {
- if (!int.TryParse (line, out outParse) && !line.Equals ("\n")) {
- lines.Add (line);
- }
- }
- lines.RemoveAt (lines.Count - 1);
- }
- public static string GetLine (int lineNumber) {
- return Language.lines [lineNumber];
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement