亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定

調用了圖片,程序編譯通過了,但是一跳轉到clock場景就運行不了了

#include?"clockLayer.h"

bool?clockLayer::init()
{
	Size?winSize?=?Director::getInstance()->getWinSize();//獲取窗口大小
	MenuItemLabel?*?menuItem?=?MenuItemLabel::create(Label::createWithSystemFont
		("back","",32),CC_CALLBACK_1(clockLayer::menuCallBack,this));
	menuItem->setPosition(Vec2(winSize.width*0.9,winSize.height*0.9));//屏幕右上角
	auto?menu?=?Menu::create(menuItem,NULL);
	menu->setPosition(Point::ZERO);
	this->addChild(menu);

	ahour?=?Sprite::create("resource\shi.png");
	ahour->setPosition(Vec2(winSize.width/2,winSize.height/2));
	ahour->setScale(0.5);//圖片較大,縮放成原來的0.5倍
	this->addChild(ahour);

	aminute?=?Sprite::create("resource/fen.jpg");
	aminute->setPosition(Vec2(winSize.width/2,winSize.height/2));
	aminute->setScale(0.5);//圖片較大,縮放成原來的0.5倍
	this->addChild(aminute);

	asecond?=?Sprite::create("resource/miao.jpg");
	asecond->setPosition(Vec2(winSize.width/2,winSize.height/2));
	asecond->setScale(0.5);//圖片較大,縮放成原來的0.5倍
	this->addChild(asecond);

	abackground?=?Sprite::create("resource\background.jpg");
//	abackground?=?Sprite::createWithSpriteFrame("resource\background.jpg");
//	abackground?=?Sprite::create("Mygame\resource\HelloWorld.png");
	abackground->setPosition(Vec2(winSize.width*0.5,winSize.height*0.5));
	abackground->setScale(0.5);//圖片較大,縮放成原來的0.5倍
	this->addChild(abackground,1);

	return?true;

}

void?clockLayer::menuCallBack(Ref?*pSender)
{


}
void?clockLayer::timeUpdate(float?dt)
{


}

http://img1.sycdn.imooc.com//594e4c6b0001b50008380553.jpg

按了begin就運行不了了

正在回答

1 回答

老兄,你文件名是不是打錯了

0 回復 有任何疑惑可以回復我~

舉報

0/150
提交
取消

調用了圖片,程序編譯通過了,但是一跳轉到clock場景就運行不了了

我要回答 關注問題
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號