1

I try to make a Code Connection with my game object (which is located in Enemy.ccb) in SpriteBuilder.

It works perfect when I just load my object and add it to the stage.

CCNode *enemy = [CCBReader load:@"Enemy"];
[self addChild:enemy];

Unfortunately it will not work when I set the custom class of the object to 'Enemy'. The asset is loading and its custom class is initializing, but it is not shown. What I am doing wrong?

EDIT:

Here's my simple implementation of the Enemy class. It is subclassed from CCSprite:

@implementation Enemy

- (id)init {
    self = [super init];

    if (self) {
        CCLOG(@"Enemy created");
    }
    return self;
}

@end
headione
  • 106
  • 1
  • 4
  • post your implementation of Enemy class, most likely the issue is with that class – CodeSmile Oct 01 '14 at 15:36
  • i created a new project and now it's working like a charm. i don't figured out what the problem was but this is not important anymore :) – headione Oct 05 '14 at 15:46

0 Answers0