문제

I'm creating a Super Mario Bros. remake for the iPhone using Cocos2d.
I'm having a hard time understanding how add real objects to a tiled map.

I know that you can add an object-layer to the tiled map and set the position of it,
but I'm not sure how to define WHAT object if should be.

For example, I'm creating a simple Super Mario Bros.

Super Mario Bros.

I want to add different blocks to the map, one should hold a star, one should hold a coin, and so on.

So my question, how do I correctly create class-objects in a tiled map?

도움이 되었습니까?

해결책

I have used object layers in the past. For you needs you could create an object layer and drop an object on that layer. Type of box. It could have variables in the object of powerup then the value could be whatever you want. Coin, 1Up, Star etc..!

enter image description here

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top