原创 cocos creator 使用chrome調試與調優

chrome調試 web : f12 -> source->左側三個點->open file-> 搜索你要調試的文件下斷點即可 android/win : 搜索日誌  chrome-devtools 內容如下 : [ chrome

原创 倒計時 cocos定時器(schude)誤差越來越大問題

需求是這樣的      從10分鐘倒計時到0 出現問題的點 schude使用的過程中 幀率浮動較大導致執行時機不準確 解決方法 倒計時之前記錄下當前時間(system_clock/steady_clock)    m_beginTime

原创 解決 raspberry pi 使用usb to tll 一直處於黑屏(putty) / Connected.後無反應(xshell)

Raspberry Pi Model 3B+ PL2303HX 剛買了 usb轉ttl模塊 按照百度步驟接線,連接 然後發現putty一直處於黑屏情況,xshell 顯示Connected.按鍵後無反應 百度一波 1./boot/conf

原创 cocos2dx spine實現碰撞閃紅效果

BlendFunc cbl = {GL_DST_COLOR, GL_ONE};    m_animal->setBlendFunc(cbl);m_animal->setColor(Color3B::RED)

原创 spine動畫跳轉到指定時間/幀(cocos2dx)

播放指定動畫 Animation->setAnimation(0,"animation1",false); 跳轉到指定時間   如果想跳轉到指定幀 將時間轉換到幀就好了 auto playTime = (m_SmallAnimation-

原创 c++11 各種類型轉換

string 轉char[] char x[10]; strcpy(x,String.c_str()); String 轉int int i= stoi(String ); String 轉float float f=stof(Strin

原创 ndk編譯報錯: fatal error: string: No such file or directory

fatal error: string: No such file or directory  fatal error: vector: No such file or directory  fatal error: map: No su

原创 C++ 簡單的 Tcp 實現[socket] 服務器端與客戶端通信

#include "stdafx.h" #include "winsock2.h" #pragma comment(lib, "ws2_32.lib") #include <iostream> using namespace std; i