Esempio n. 1
0
    void Update()
    {
        if (gameOver)
        {
            return;
        }

        if (Time.time >= nextTick)
        {
            nextTick = Time.time + tickLength;

            bool foundBoxes = false;

            foreach (GameObject Lootbox in Lootboxes)
            {
                if (Lootbox == null)
                {
                    continue;
                }

                Lootbox.GetComponent <LootBox>().UpdateLootbox();
                // Lootbox.transform.Translate(0, 0.1f, 0);
                // Lootbox.GetComponent<NetworkTransform>().SetDirtyBit(1);
                foundBoxes = true;
            }

            if (foundBoxes == false)
            {
                CreateAllLootbox();
                tickLength = 0.2f;
            }
        }
    }