Ejemplo n.º 1
0
    public void UpdateTimer()
    {
        serviceTimer -= Time.deltaTime;
        float pct = Mathf.Max(0f, serviceTimer) / MAX_SERVICE_TIMER;

        metaNode.ContainerWithName("bar").GetComponent <RectTransform>().localScale = new Vector2(pct, 1f);
    }
Ejemplo n.º 2
0
    // Use this for initialization
    void Start()
    {
        orders = new List <SushiPrefab>();

        metaNode       = GetComponent <SuperMetaNode>();
        queueContainer = metaNode.ContainerWithName("order_queue");

        inventory = new Dictionary <Sushi, int>();

        foreach (Sushi fish in sushi)
        {
            inventory[fish] = 0;
        }
        inventory[rice] = 0;

        AddSushiToQueue();
        AddSushiToQueue();
        AddSushiToQueue();
        AddSushiToQueue();

        foreach (SuperButtonBase button in metaNode.buttons.Values)
        {
            button.onClick += HandleButton;
        }

        Refresh();

        selected          = new List <int>();
        activeIngredients = new Dictionary <int, Sushi>();
        for (var i = 1; i <= 9; i++)
        {
            activeIngredients[i] = null;
        }

        Fill();
    }