Forum Libraries, Components, and Plugins

RunAction() with animation fails

SamJacksonSamJackson USMember ✭✭

Using the CCAnimation and The CCAnimate with RunAction the following code fails

    private void CreateSpriteGraphic()
    {
        CCSpriteSheet spriteSheet = new CCSpriteSheet("Animations/walk.plist", "Animations/walk.png");
        List<CCSpriteFrame> forward =
            spriteSheet.Frames.FindAll(x => x.TextureFilename.StartsWith("walk-forward", StringComparison.Ordinal));

    _walkForward = new CCAnimation(forward, 1.0f);

        _repeatForward = new CCRepeatForever(new CCAnimate(_walkForward));

        _graphic = new CCSprite(forward.FirstOrDefault())
        {
            Name = "Forward",
            IsAntialiased = false,
            PositionY = -24
        };
        AddChild(_graphic);
    }

    internal void SetDesiredPositionToCurrentPosition(CCTouch touch)
    {
        StopAllActions();

        CCPoint location = touch.Location;
        location = WorldToParentspace(location);
        float ds = CCPoint.Distance(Position, location);

        float dt = ds/WalkSpeed;

        CCMoveTo moveMan = new CCMoveTo(dt, location);
        RunAction(_repeatForward);
        RunActions(moveMan, _walkStop);
    }

Debug output shows

05-26 13:10:44.908 D/Mono (32684): Searching for 'glDrawElements'.
Thread started: #5
Thread started: #6
05-26 13:10:44.982 D/Mono (32684): [0x946bf930] worker starting
05-26 13:10:44.990 D/Mono (32684): [0x982ff930] hill climbing, change max number of threads 4
05-26 13:10:45.340 D/Mono (32684): [0x946bf930] hill climbing, change max number of threads 5
Thread started: #7
Thread started: #8
05-26 13:10:48.966 D/Mono (32684): [0x9423e930] worker starting
05-26 13:10:48.967 D/Mono (32684): [0x9433f930] worker starting
05-26 13:10:48.991 W/Adreno-EGL(32684): : EGL_BAD_ACCESS
05-26 13:10:48.991 E/libEGL (32684): eglMakeCurrent:818 error 3002 (EGL_BAD_ACCESS)
05-26 13:10:48.997 W/Adreno-EGL(32684): : EGL_BAD_ACCESS
05-26 13:10:48.997 E/libEGL (32684): eglMakeCurrent:818 error 3002 (EGL_BAD_ACCESS)
05-26 13:10:48.997 W/Adreno-EGL(32684): : EGL_BAD_ACCESS
05-26 13:10:48.997 E/libEGL (32684): eglMakeCurrent:818 error 3002 (EGL_BAD_ACCESS)
05-26 13:10:48.998 W/Adreno-EGL(32684): : EGL_BAD_ACCESS
05-26 13:10:48.998 E/libEGL (32684): eglMakeCurrent:818 error 3002 (EGL_BAD_ACCESS)
05-26 13:10:48.998 W/Adreno-EGL(32684): : EGL_BAD_ACCESS
05-26 13:10:48.998 E/libEGL (32684): eglMakeCurrent:818 error 3002 (EGL_BAD_ACCESS)
05-26 13:10:48.998 W/Adreno-EGL(32684): : EGL_BAD_ACCESS
05-26 13:10:48.998 E/libEGL (32684): eglMakeCurrent:818 error 3002 (EGL_BAD_ACCESS)
05-26 13:10:48.999 W/Adreno-EGL(32684): : EGL_BAD_ACCESS
05-26 13:10:48.999 E/libEGL (32684): eglMakeCurrent:818 error 3002 (EGL_BAD_ACCESS)
05-26 13:10:49.008 W/Adreno-EGL(32684): : EGL_BAD_ACCESS
05-26 13:10:49.008 E/libEGL (32684): eglMakeCurrent:818 error 3002 (EGL_BAD_ACCESS)
05-26 13:10:49.008 W/Adreno-EGL(32684): : EGL_BAD_ACCESS
05-26 13:10:49.008 E/libEGL (32684): eglMakeCurrent:818 error 3002 (EGL_BAD_ACCESS)
05-26 13:10:49.024 W/Adreno-EGL(32684): : EGL_BAD_ACCESS
05-26 13:10:49.024 E/libEGL (32684): eglMakeCurrent:818 error 3002 (EGL_BAD_ACCESS)
05-26 13:10:49.040 D/Mono (32684): [0x9433f930] hill climbing, change max number of threads 4
05-26 13:10:49.041 W/Adreno-EGL(32684): : EGL_BAD_ACCESS
05-26 13:10:49.041 E/libEGL (32684): eglMakeCurrent:818 error 3002 (EGL_BAD_ACCESS)
...and so on.

Best Answer

Answers

Sign In or Register to comment.