小编Ris*_*waj的帖子

在cocos2d android中添加Endless parallax背景

我正在使用android进行CoCos2d.我希望使用CCParallaxNode为我的屏幕添加无尽的滚动背景.我可以添加背景并移动它但在完成移动操作后屏幕变黑.有人可以帮我吗?

我的代码是

CCParallaxNode parallaxNode;
CCSprite spacedust1;
CCSprite spacedust2;
CCSprite planetsunrise;
CCSprite galaxy;
CCSprite spacialanomaly;
CCSprite spacialanomaly2;

parallaxNode = CCParallaxNode.node();

    spacedust1 = CCSprite.sprite("bg_front_spacedust.png");
    spacedust2 = CCSprite.sprite("bg_front_spacedust.png");
    planetsunrise = CCSprite.sprite("bg_planetsunrise.png");
    galaxy = CCSprite.sprite("bg_galaxy.png");
    spacialanomaly = CCSprite.sprite("bg_spacialanomaly.png");
    spacialanomaly2 = CCSprite.sprite("bg_spacialanomaly2.png");
    // 3) Determine relative movement speeds for space dust and background
    // CGPoint cgPoint = CGPoint.ccp(0.1, 0.1);

    CGPoint dustSpeed = CGPoint.ccp(10, 10);
    CGPoint bgSpeed = CGPoint.ccp(5, 5);
    // CGPoint bgSpeed = ccp(0.05, 0.05);

    parallaxNode.addChild(spacedust1, 0, dustSpeed.x, dustSpeed.y, 0,
            winSize.height / 2);
    parallaxNode.addChild(spacedust2, 0, …
Run Code Online (Sandbox Code Playgroud)

android cocos2d-android

26
推荐指数
1
解决办法
4308
查看次数

Android SIP聊天消息

我必须使用Android SIP客户端实现聊天消息,但无法找到任何相关的类或监听器.我已经使用SIP实现了呼叫功能.

messaging android chat sip

5
推荐指数
1
解决办法
1705
查看次数

标签 统计

android ×2

chat ×1

cocos2d-android ×1

messaging ×1

sip ×1