02 2016 档案
cocos2d-x之物理按键初试
摘要:bool HelloWorld::init() { if ( !Layer::init() ) { return false; } auto listener=EventListenerKeyboard::create(); listener->onKeyReleased = [](EventKey 阅读全文
posted @ 2016-02-29 23:40 baraka 阅读(197) 评论(0) 推荐(0)
cocos2d-x之加速度传感器初试
摘要:bool HelloWorld::init() { if ( !Layer::init() ) { return false; } Device::setAccelerometerEnabled(true); Director::getInstance()->getEventDispatcher() 阅读全文
posted @ 2016-02-29 23:21 baraka 阅读(252) 评论(0) 推荐(0)
cocos2d-x之多点触碰初试
摘要:bool HelloWorld::init() { if ( !Layer::init() ) { return false; } Size visibleSize = Director::getInstance()->getVisibleSize(); auto listener=EventLis 阅读全文
posted @ 2016-02-29 22:18 baraka 阅读(118) 评论(0) 推荐(0)
cocos2d-x之事件传递
摘要:bool HelloWorld::init() { if ( !Layer::init() ) { return false; } Size size=Director::getInstance()->getVisibleSize(); auto label=LabelTTF::create("Cl 阅读全文
posted @ 2016-02-29 21:27 baraka 阅读(126) 评论(0) 推荐(0)
cocos2d-x之单点触碰初试
摘要:bool HelloWorld::init() { if ( !Layer::init() ) { return false; } Size size=Director::getInstance()->getVisibleSize(); auto label=LabelTTF::create("Cl 阅读全文
posted @ 2016-02-29 21:17 baraka 阅读(124) 评论(0) 推荐(0)
cocos2d-x之value
摘要:bool HelloWorld::init() { if ( !Layer::init() ) { return false; } Size visibleSize = Director::getInstance()->getVisibleSize(); Vec2 origin = Director 阅读全文
posted @ 2016-02-29 20:32 baraka 阅读(337) 评论(0) 推荐(0)
cocos2d-x之Vector与map
摘要:bool HelloWorld::init() { if ( !Layer::init() ) { return false; } Size visibleSize = Director::getInstance()->getVisibleSize(); Vec2 origin = Director 阅读全文
posted @ 2016-02-29 20:04 baraka 阅读(289) 评论(0) 推荐(0)
cocos2d-x之初试内存管理机制
摘要:bool HelloWorld::init() { if ( !Layer::init() ) { return false; } Size visibleSize = Director::getInstance()->getVisibleSize(); Vec2 origin = Director 阅读全文
posted @ 2016-02-29 19:45 baraka 阅读(133) 评论(0) 推荐(0)
cocos2d-x之场景转换特效
摘要:bool HelloWorld::init() { if ( !Layer::init() ) { return false; } Size visibleSize = Director::getInstance()->getVisibleSize(); Vec2 origin = Director 阅读全文
posted @ 2016-02-29 16:36 baraka 阅读(171) 评论(0) 推荐(0)
cocos2d-x之Action特效
摘要:bool HelloWorld::init() { if ( !Layer::init() ) { return false; } Size visibleSize = Director::getInstance()->getVisibleSize(); Vec2 origin = Director 阅读全文
posted @ 2016-02-29 16:16 baraka 阅读(181) 评论(0) 推荐(0)
cocos2d-x之action初试
摘要:bool HelloWorld::init() { if ( !Layer::init() ) { return false; } Size visibleSize = Director::getInstance()->getVisibleSize(); Vec2 origin = Director 阅读全文
posted @ 2016-02-29 14:11 baraka 阅读(145) 评论(0) 推荐(0)
cocos2d-x图层以及显示对象的基本使用
摘要:LogoNode: #ifndef LogoNode_hpp #define LogoNode_hpp #include <stdio.h> #include "cocos2d.h" USING_NS_CC; class LogoNode:public Node { protected: Sprit 阅读全文
posted @ 2016-02-29 01:18 baraka 阅读(581) 评论(0) 推荐(0)
cocos2d-x基础元素之显示对象
摘要:bool HelloWorld::init() { if ( !Layer::init() ) { return false; } Size visibleSize = Director::getInstance()->getVisibleSize(); Vec2 origin = Director 阅读全文
posted @ 2016-02-29 00:46 baraka 阅读(342) 评论(0) 推荐(0)
坐标系之小球向量坐标碰撞
摘要:bool HelloWorld::init() { if ( !Layer::init() ) { return false; } Size visibleSize = Director::getInstance()->getVisibleSize(); Vec2 origin = Director 阅读全文
posted @ 2016-02-28 23:31 baraka 阅读(231) 评论(0) 推荐(0)
坐标系-三角函数
摘要:bool HelloWorld::init() { if ( !Layer::init() ) { return false; } Size visibleSize = Director::getInstance()->getVisibleSize(); Vec2 origin = Director 阅读全文
posted @ 2016-02-28 23:00 baraka 阅读(1068) 评论(0) 推荐(0)
初试cocos2d-x坐标系
摘要:bool HelloWorld::init() { ////////////////////////////// if ( !Layer::init() ) { return false; } Size visibleSize = Director::getInstance()->getVisibl 阅读全文
posted @ 2016-02-28 22:10 baraka 阅读(154) 评论(0) 推荐(0)
c++基础回顾
摘要:#include <iostream> #include <vector> #include <string> int main(int argc, const char * argv[]) { // insert code here... std::cout << "Hello, World!\n 阅读全文
posted @ 2016-02-25 00:27 baraka 阅读(295) 评论(0) 推荐(0)
Core Data数据操作
摘要:1.建立学生实体,插入100条数据 2.按条件查询学生数据 3.统计学生信息 4.修改学生信息 5.删除学生数据 import UIKit import CoreData class ViewController: UIViewController { override func viewDidLo 阅读全文
posted @ 2016-02-24 21:44 baraka 阅读(292) 评论(0) 推荐(0)
Core Data初试
摘要:CoreDataStack.swift import CoreData class CoreDataStack: NSObject { let context: NSManagedObjectContext let coordinator: NSPersistentStoreCoordinator 阅读全文
posted @ 2016-02-23 23:50 baraka 阅读(217) 评论(0) 推荐(0)
SQLite数据操作
摘要:1.向学生表中插入100条数据 2.按条件查询学生数据 3.修改学生数据 4.删除学生数据 import UIKit class ViewController: UIViewController { lazy var documentsPath:String={ let paths=NSSearch 阅读全文
posted @ 2016-02-23 22:29 baraka 阅读(229) 评论(0) 推荐(0)
SQLite初试
摘要:1.创建一个名为test的数据库 2.添加一张学生表,表里面每一条记录包括学好,姓名,分数3个字段 工程-Build Phases-Link Binary With Libraries------libsqlite3.tbd 建立桥接文件 #import <sqlite3.h> import UIK 阅读全文
posted @ 2016-02-23 00:48 baraka 阅读(192) 评论(0) 推荐(0)
编码与解码
摘要:创建一个学生类,首先归档保存学生信息,然后再解档读取数据 import UIKit class Student:NSObject, NSCoding{ var sno:String! var name:String! var score:Int! init(sno:String,name:Strin 阅读全文
posted @ 2016-02-22 23:39 baraka 阅读(196) 评论(0) 推荐(0)
属性列表
摘要:1.建立一个名字的数组,然后保存到沙盒的Documents目录 2.建立一个学生的字典,然后保存到沙盒的Documents目录 import UIKit class ViewController: UIViewController { lazy var documentsPath:String={ 阅读全文
posted @ 2016-02-22 23:07 baraka 阅读(208) 评论(0) 推荐(0)
用户首选项
摘要:import UIKit class ViewController: UIViewController { let refreshInterval:NSTimeInterval = 10 let refreshKey = "LastRefreshTime" override func viewDid 阅读全文
posted @ 2016-02-22 22:37 baraka 阅读(324) 评论(0) 推荐(0)
目录文件管理
摘要:import UIKit class ViewController: UIViewController { lazy var documentsPath:String={ let paths=NSSearchPathForDirectoriesInDomains(.DocumentDirectory 阅读全文
posted @ 2016-02-21 22:19 baraka 阅读(209) 评论(0) 推荐(0)
沙盒机制和应用程序目录
摘要:import UIKit class ViewController: UIViewController { override func viewDidLoad() { super.viewDidLoad() //1.Home目录,即沙盒目录 var path=NSHomeDirectory() pr 阅读全文
posted @ 2016-02-21 20:56 baraka 阅读(158) 评论(0) 推荐(0)
关于mac环境下删除cocos2d-x环境变量配置的方法
摘要:yangchaodeMacBook-Air:downloads yangchao$ vim ~/.bash_profile 阅读全文
posted @ 2016-02-11 18:16 baraka 阅读(319) 评论(0) 推荐(0)
mac下 home-brew安装及php,nginx环境安装及配置
摘要:Homebrew官网 http://brew.sh/index_zh-cn.html Homebrew是神马 linux系统有个让人蛋疼的通病,软件包依赖,好在当前主流的两大发行版本都自带了解决方案,Red hat有yum,Ubuntu有apt-get 神马,你用mac os,不好意Mac os木有 阅读全文
posted @ 2016-02-08 19:46 baraka 阅读(1866) 评论(0) 推荐(0)
mac环境下手动卸载mysql
摘要:1.sudo rm /usr/local/mysql 2.sudo rm -rf /usr/local/mysql* 3.sudo rm -rf /Library/StartupItems/MySQLCOM 4.sudo rm -rf /Library/Perferences/My* 5.vim / 阅读全文
posted @ 2016-02-08 16:47 baraka 阅读(240) 评论(0) 推荐(0)