Example #1
0
    private void ReorientElements()
    {
        bool hasSFXplayed = false;

        for (int collum = 0; collum < ConstantValues.totalCollums; collum++)
        {
            //AlexDebugger.GetInstance().AddMessage("Moving element: " + elementsPositions[collum, row].GetAttachedGameObject().transform.name + " upwards", AlexDebugger.tags.Step3);
            if (BoardFunctions.MoveMatchedElementUpwards(collum, ConstantValues.totalRows - 1, this) && !hasSFXplayed)
            {
                float randomNum = random.Next(5, 20) / 10;
                currentMessageID += 1;
                messagesToClient.Add(new Messages.AudioMessage(AssetLoader.GetCellDropSFX(), currentMessageID, currentMessageID - 1, 0.0f, 1));
                hasSFXplayed = true;
            }
        }
    }