Example #1
0
    public void UpdatePlacer(int itemType)
    {
        circuitPlacer.SetSelectedItemType((CircuitPlacer.ItemType)itemType);
        Debug.Log("Changed to: " + (CircuitPlacer.ItemType)itemType);

        switch ((CircuitPlacer.ItemType)itemType)
        {
        case CircuitPlacer.ItemType.TURRETS:
            shopItems = turretSI;
            break;

        case CircuitPlacer.ItemType.WIRES:
            shopItems = wireSI;
            break;

        case CircuitPlacer.ItemType.BATTERIES:
            shopItems = batterySI;
            break;

        default:
            break;
        }

        index = 0;
        sh.OnValueChange(shopItems, 0);

        GoToShop();
    }