Example #1
0
        void SpawnBox()
        {
            powerupPriority--;
            DelegateHandler.BoxSpawned();
            GameObject boxHolderObject = Instantiate(BoxPrefab, transform.position, Quaternion.identity);
            BoxHolder  boxHolder       = boxHolderObject.GetComponent <BoxHolder>();

            boxHolder.ColumnType = ColumnType;
            boxHolder.BoxType    = powerupPriority > 0 ? (BoxType)GameManager.Instance.Rand.Next(0, 4) : (BoxType)GameManager.Instance.Rand.Next(4, 5);
            if (powerupPriority <= 0)
            {
                powerupPriority = 10;
            }
        }