コード例 #1
0
        public static MySprite2 spriteWithFile(string pszName)
        {
            MySprite2 pobSprite = new MySprite2();
            pobSprite.initWithFile(pszName);

            return pobSprite;
        }
コード例 #2
0
        public new static MySprite2 Create(string pszName)
        {
            MySprite2 pobSprite = new MySprite2();

            pobSprite.InitWithFile(pszName);
            return(pobSprite);
        }
コード例 #3
0
        public static MySprite2 spriteWithFile(string pszName)
        {
            MySprite2 pobSprite = new MySprite2();

            pobSprite.initWithFile(pszName);

            return(pobSprite);
        }
コード例 #4
0
        public SpriteSubclass()
        {
            CCSpriteFrameCache.SharedSpriteFrameCache.AddSpriteFrames("animations/ghosts.plist");

            // MySprite1
            sprite = MySprite1.Create("father.gif");
            AddChild(sprite);

            // MySprite2
            sprite2 = new MySprite2("Images/grossini");
            AddChild(sprite2);
        }
コード例 #5
0
        public SpriteSubclass()
        {
            CCSpriteFrameCache.SharedSpriteFrameCache.AddSpriteFrames("animations/ghosts.plist");

            // MySprite1
            sprite = MySprite1.Create("father.gif");
            AddChild(sprite);

            // MySprite2
            sprite2 = new MySprite2("Images/grossini");
            AddChild(sprite2);
        }
コード例 #6
0
        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));
        }
コード例 #7
0
        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));
        }
コード例 #8
0
ファイル: SpriteSubclass.cs プロジェクト: Karunp/cocos2d-xna
 public new static MySprite2 Create(string pszName)
 {
     MySprite2 pobSprite = new MySprite2();
     pobSprite.InitWithFile(pszName);
     return pobSprite;
 }