Skip to content

Instantly share code, notes, and snippets.

@lamlambda
lamlambda / TitleScene.cpp
Last active February 15, 2016 10:31
sqlite cocos2dx
bool Title::init()
{
//////////////////////////////
// 1. super init first
if ( !Layer::init() )
{
return false;
}
std::string path = "";
@lamlambda
lamlambda / LabelTestNew.cpp
Created January 26, 2016 16:29
cocos2dx3.8サンプルエラー
auto label3 = Label::createWithTTF(ttfConfig,
"美好的一天啊美好的一天啊美好的一天啊a", TextHAlignment::LEFT, size.width * 0.75);
if(label3) {
label3->setTextColor(Color4B(255, 255, 128, 255));
label3->setPosition(Vec2(size.width * 0.1, size.height * 0.2));
label3->setAnchorPoint(Vec2(0, 0.5));
this->addChild(label3);
}
@lamlambda
lamlambda / HelloWorldScene.cpp
Created January 18, 2016 20:45
物理エンジン使ってみる
#include "HelloWorldScene.h"
USING_NS_CC;
Scene* HelloWorld::createScene()
{
auto scene = Scene::createWithPhysics();
auto layer = HelloWorld::create();
scene->addChild(layer);
@lamlambda
lamlambda / test.cpp
Created January 13, 2016 15:19
テスト用
#include <iostream>
int main()
{
//テスト用だよ!
std::cout << "Hello World!\n";
return 0;
}