Benutzer:Oneup/Cocos2d: Unterschied zwischen den Versionen

aus Metalab, dem offenen Zentrum für meta-disziplinäre Magier und technisch-kreative Enthusiasten.
Wechseln zu: Navigation, Suche
Zeile 1: Zeile 1:
 +
in GameScene.m init*(
 
<pre>
 
<pre>
// howto simple non-animated sprites
+
// howto simple non-animated sprites
//Sprite *sprite = [Sprite spriteWithFile:@"walk_empty.png"];
+
//Sprite *sprite = [Sprite spriteWithFile:@"walk_empty.png"];
//sprite.position = ccp( 0, 50);
+
//sprite.position = ccp( 0, 50);
 
</pre>
 
</pre>
 +
 +
cocos2d uses a scenegraph similar to flash:
 +
* UI Application
 +
** SceneManager
 +
*** GameScene
 +
****StaticItem (once added it stays in the scene forever)
 +
****DynamicItem (update position every frame)
 +
*** MenuScene
 +
****Menuitem

Version vom 3. September 2009, 20:53 Uhr

in GameScene.m init*(

// howto simple non-animated sprites
//Sprite *sprite = [Sprite spriteWithFile:@"walk_empty.png"];
//sprite.position = ccp( 0, 50);

cocos2d uses a scenegraph similar to flash:

  • UI Application
    • SceneManager
      • GameScene
        • StaticItem (once added it stays in the scene forever)
        • DynamicItem (update position every frame)
      • MenuScene
        • Menuitem