public SpriteSubclass() { CCSpriteFrameCache.SharedSpriteFrameCache.AddSpriteFrames("animations/ghosts.plist"); // MySprite1 sprite = MySprite1.Create("father.gif"); AddChild(sprite); // MySprite2 sprite2 = new MySprite2("Images/grossini"); AddChild(sprite2); }
public SpriteSubclass() { CCSize s = CCDirector.SharedDirector.WinSize; CCSpriteFrameCache.SharedSpriteFrameCache.AddSpriteFramesWithFile("animations/ghosts.plist"); CCSpriteBatchNode aParent = new CCSpriteBatchNode("animations/ghosts"); // MySprite1 MySprite1 sprite = MySprite1.Create("father.gif"); sprite.Position = (new CCPoint(s.Width / 4 * 1, s.Height / 2)); aParent.AddChild(sprite); AddChild(aParent); // MySprite2 MySprite2 sprite2 = MySprite2.Create("Images/grossini"); AddChild(sprite2); sprite2.Position = (new CCPoint(s.Width / 4 * 3, s.Height / 2)); }