Skip to content
This repository was archived by the owner on Mar 11, 2021. It is now read-only.
This repository was archived by the owner on Mar 11, 2021. It is now read-only.

Calling RunActionAsync more than once on an object doesn't return #421

@Jbonavita

Description

@Jbonavita

We're using the following to make an object appear as if it is flashing. The first time through the sequence works perfect. However, a little later in the game, the second time Flash() is called on the same object, the first RunActionAsync never returns. There doesn't seem to be any exceptions getting thrown either.

    public async Task Flash(int soundIndex)
    {
        try
        {
            await RunActionAsync(new CCFadeIn(.2f));
        }
        catch (Exception ex)
        {
            Debug.WriteLine(ex.Message);
        }

        if (GameController.Current.PlayEffects)
            CCAudioEngine.SharedEngine.PlayEffect(soundIndex.ToString());

        await RunActionAsync(new CCFadeOut(.2f));

        return;
    }

Another thing I noticed is:
When the game starts it displays a splash screen with a Play button. When the play button is clicked, the GameScene is loaded. At this point everything works correctly. Now from within the GameScene I click an exit button which brings me back to the SplashScene. If I click the Play button again, the Flash method has the same issue. It hangs on the first RunActionAsync.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions