Giter VIP home page Giter VIP logo

Comments (4)

Birkemose avatar Birkemose commented on June 15, 2024

I will check on it.
Btw, when running the parallax test, it crashes because it can not find image "powered.png". The image is added in a blue folder, so it should be "Images/powered.png".
Is this only a problem for me?

Btwbtw, I am not really sure I understand the issue. TestBase don't seem to enable touch handling.

from cocos2d-objc.

andykorth avatar andykorth commented on June 15, 2024

Isn't this all that's required to enable touch handling?
https://github.com/cocos2d/cocos2d-iphone/blob/develop-v3/cocos2d-ui-tests/tests/ParallaxTest.m#L89

You are correct, they should be referenced as "Images/powered.png". I think I was moving the files around and I had two copies in my simulator app bundle. Thanks for the catch.

(side note: I think the test project doesn't need 37 mb of assets. I'll try to go through them and clean them up at some point. I already removed a few that weren't referenced at all.)

from cocos2d-objc.

Birkemose avatar Birkemose commented on June 15, 2024

Ahh, I missed that line. My bad.
Well, yes, but it has to be done for the individual node / sprite / button. In that line, you enable touch handling for the base node, which is a CCNode with no content size. So it will never pass the touch test, unless you give it a content size.
If you ex. set content size of a CCNode to screen size, that would mimic the old CCLayer behaviour. It is used in the responder test, to just grab any touch on the screen.
https://github.com/cocos2d/cocos2d-iphone/blob/develop-v3/cocos2d-ui-tests/tests/CCResponderTest.m#L28

from cocos2d-objc.

andykorth avatar andykorth commented on June 15, 2024

Ahhh, content size! Makes sense. Thanks for the help. I'll update this test when I get a chance.

from cocos2d-objc.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.