public void TestInitialiseGameObjectsHandlerRemote()
    {
        GameObjectsHandler goh = GameObjectsHandler.WithRemoteSchema();

        //Assert fields are correct
        Assert.That(goh.GameObjs.items.Count, Is.EqualTo(16));

        Assert.That(goh.GameObjs.items[0].item_id, Is.EqualTo(1));
        Assert.That(goh.GameObjs.items[0].name, Is.EqualTo("wood"));
        Assert.That(goh.GameObjs.items[0].type, Is.EqualTo(1));

        Assert.That(goh.GameObjs.items[15].item_id, Is.EqualTo(16));
        Assert.That(goh.GameObjs.items[15].name, Is.EqualTo("dune buggy"));
        Assert.That(goh.GameObjs.items[15].type, Is.EqualTo(5));
        Assert.That(goh.GameObjs.items[15].blueprint[0].item_id, Is.EqualTo(9));
        Assert.That(goh.GameObjs.items[15].blueprint[0].quantity, Is.EqualTo(4));
        Assert.That(goh.GameObjs.items[15].blueprint[1].item_id, Is.EqualTo(10));
        Assert.That(goh.GameObjs.items[15].blueprint[1].quantity, Is.EqualTo(1));
    }
Exemple #2
0
        public int GetItemType(int id)
        {
            GameObjectsHandler goh = GameObjectsHandler.WithRemoteSchema();

            return(goh.GameObjs.items[id - 1].type);
        }
Exemple #3
0
        public string GetItemName(int id)
        {
            GameObjectsHandler goh = GameObjectsHandler.WithRemoteSchema();

            return(goh.GameObjs.items[id - 1].name);
        }