コード例 #1
0
    public void ReturnGems()
    {
        currentSlot = movedGem01;
        targetSlot  = movedGem02;

        StartCoroutine(RewindSwap());


        AudioController.Audio_PlaySound(0);
    }
コード例 #2
0
    public void PointerDown()
    {
        if (!playerController.moveLock)
        {
            playerController.GemSelected(mySlot);
            animator.SetTrigger("Select");


            AudioController.Audio_PlaySound(1);
        }
    }
コード例 #3
0
    private IEnumerator RewindSwap()
    {
        AudioController.Audio_PlaySound(0);

        currentSlot.SwapGemWith(targetSlot);
        targetSlot.SwapGemWith(currentSlot);

        currentSlot.ReadGemProperties();
        targetSlot.ReadGemProperties();

        yield return(StartCoroutine(boardManager.OnRewind()));

        yield return(null);
    }
コード例 #4
0
    public void PointerDragOver()
    {
        if (!playerController.moveLock)
        {
            if (playerController.draggingGem && playerController.currentSlot != mySlot)
            {
                if (AmINeighbourTo(playerController.currentSlot))
                {
                    playerController.targetSlot = mySlot;
                    animator.SetTrigger("Select");

                    AudioController.Audio_PlaySound(1);
                }
            }
        }
    }
コード例 #5
0
    public IEnumerator DestroyMyGem()
    {
        if (myGem != null)
        {
            matched = false;
            myGem.OnExplode();
            noGem = true;

            yield return(new WaitForEndOfFrame());


            myGem = null;


            AudioController.Audio_PlaySound(2);
        }
        else
        {
            ReadGemProperties();
        }
    }
コード例 #6
0
    private IEnumerator PerformSwap()
    {
        AudioController.Audio_PlaySound(0);

        movedGem01 = currentSlot;
        movedGem02 = targetSlot;

        currentSlot.SwapGemWith(targetSlot);
        targetSlot.SwapGemWith(currentSlot);


        currentSlot.ReadGemProperties();
        targetSlot.ReadGemProperties();

        while (currentSlot.myGem.goingToParent || targetSlot.myGem.goingToParent)
        {
            yield return(new WaitForEndOfFrame());
        }

        yield return(StartCoroutine(boardManager.OnMovePerformed()));

        yield return(null);
    }