예제 #1
0
    public void Start()
    {
        HeadlineGenerator headlineGenerator = new HeadlineGenerator();

        headlineGenerator.UpdatedHeadline += UpdateHeadline;
        UpdateHeadline(headlineGenerator.CurrentDisplayText);
    }
    public void SetUp()
    {
        XmlDocument doc = new XmlDocument();

        doc.LoadXml(testHadlineXml);
        gen = new HeadlineGenerator(doc.SelectSingleNode("Headlines"));
        gen.UpdatedHeadline += StringPrinted;
        stringPrinted        = false;
    }
    public void SetUp()
    {
        PrototypeManager.Initialize();

        JToken reader = JToken.Parse(testHeadlineJson);

        PrototypeManager.Headline.LoadJsonPrototypes((JProperty)reader.First);

        gen = new HeadlineGenerator();
        gen.UpdatedHeadline += StringPrinted;
        stringPrinted        = false;
    }
예제 #4
0
    public void SetUp()
    {
        if (PrototypeManager.Headline == null)
        {
            new PrototypeManager();
        }

        PrototypeManager.Headline.LoadPrototypes(testHeadlineXml);

        gen = new HeadlineGenerator();
        gen.UpdatedHeadline += StringPrinted;
        stringPrinted        = false;
    }
    public void Start()
    {
        string filePath = System.IO.Path.Combine(UnityEngine.Application.streamingAssetsPath, "Data");

        filePath = System.IO.Path.Combine(filePath, "Headlines.xml");
        string      xmlText = System.IO.File.ReadAllText(filePath);
        XmlDocument doc     = new XmlDocument();

        doc.Load(new StringReader(xmlText));
        HeadlineGenerator headlineGenerator = new HeadlineGenerator(doc.SelectSingleNode("Headlines"));

        headlineGenerator.UpdatedHeadline += UpdateHeadline;
        UpdateHeadline(headlineGenerator.CurrentDisplayText);
    }