コード例 #1
0
    public static GUIMessage Create(Vector2 pos, string msg, GUIMessageSettings sets)
    {
        GUIMessage mess = Create(pos, msg);

        mess.sets = sets;
        return(mess);
    }
コード例 #2
0
    static void LoadTextAsset(string filename)
    {
        TextAsset file = Resources.Load <TextAsset>(filename);

        if (file == null)
        {
            return;
        }
        string[] lines = file.text.ConvertNewlines().Split('\n');
        for (int i = 0; i < lines.Length; i++)
        {
            if (lines[i].Length < 3)
            {
                continue;
            }
            if (lines[i].Trim()[0] == '#')
            {
                continue;
            }
            int    index = lines[i].IndexOf(',');
            string name  = lines[i].Substring(0, index);
            string rest  = lines[i].Substring(index + 1);

            //Debug.Log(name);
            Table t = new Table(rest);

            GUIMessageSettings sets = new GUIMessageSettings();
            sets.asTable = t;

            settingsMap.Add(name, sets);
        }
    }
コード例 #3
0
    public GUIMessageSettings Clone()
    {
        GUIMessageSettings sets = new GUIMessageSettings();

        sets.asTable = asTable;
        return(sets);
    }
コード例 #4
0
 void Awake()
 {
     if (defaults == null)
     {
         defaults = new GUIMessageSettings();
     }
     if (sets == null)
     {
         sets = defaults.Clone();
     }
     depth = order - count;
     count++;
     //msg = new Message();
 }
コード例 #5
0
	static void LoadTextAsset(string filename) {
		TextAsset file = Resources.Load<TextAsset>(filename);
		
		if (file == null) { return; }
		string[] lines = file.text.ConvertNewlines().Split('\n');
		for (int i = 0; i < lines.Length; i++) {
			if (lines[i].Length < 3) { continue; }
			if (lines[i].Trim()[0] == '#') { continue; }
			int index = lines[i].IndexOf(',');
			string name = lines[i].Substring(0, index);
			string rest = lines[i].Substring(index+1);
			
			//Debug.Log(name);
			Table t = new Table(rest);
			
			GUIMessageSettings sets = new GUIMessageSettings();
			sets.asTable = t;
			
			settingsMap.Add(name, sets);
			
		}
		
	}
コード例 #6
0
	public GUIMessageSettings Clone() {
		GUIMessageSettings sets = new GUIMessageSettings();
		sets.asTable = asTable;
		return sets;
	}
コード例 #7
0
	public static GUIMessage Create(Vector2 pos, string msg, GUIMessageSettings sets) {
		GUIMessage mess = Create(pos, msg);
		mess.sets = sets;
		return mess;
	}
コード例 #8
0
	void Awake() {
		if (defaults == null) { defaults = new GUIMessageSettings(); }
		if (sets == null) { sets = defaults.Clone(); }
		depth = order - count;
		count++;
		//msg = new Message();
		
	}