public static MySprite2 spriteWithFile(string pszName) { MySprite2 pobSprite = new MySprite2(); pobSprite.initWithFile(pszName); return pobSprite; }
public new static MySprite2 Create(string pszName) { MySprite2 pobSprite = new MySprite2(); pobSprite.InitWithFile(pszName); return(pobSprite); }
public static MySprite2 spriteWithFile(string pszName) { MySprite2 pobSprite = new MySprite2(); pobSprite.initWithFile(pszName); return(pobSprite); }
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)); }
public SpriteSubclass() { CCSize s = CCDirector.sharedDirector().getWinSize(); CCSpriteFrameCache.sharedSpriteFrameCache().addSpriteFramesWithFile("animations/ghosts"); CCSpriteBatchNode aParent = CCSpriteBatchNode.batchNodeWithFile("animations/images/ghosts"); // MySprite1 MySprite1 sprite = MySprite1.spriteWithSpriteFrameName("father.gif"); sprite.position = (new CCPoint(s.width / 4 * 1, s.height / 2)); aParent.addChild(sprite); addChild(aParent); // MySprite2 MySprite2 sprite2 = MySprite2.spriteWithFile("Images/grossini"); addChild(sprite2); sprite2.position = (new CCPoint(s.width / 4 * 3, s.height / 2)); }
public new static MySprite2 Create(string pszName) { MySprite2 pobSprite = new MySprite2(); pobSprite.InitWithFile(pszName); return pobSprite; }