原创 c++11標準下的隨機數發生器

新標準中,隨機數發生器不再使用rand和srand,而是改爲隨機數引擎和隨機數分佈類的組合拳。 隨機數引擎:可以用來生成隨機數序列,這個序列一

原创 win7應用程序圖標顯示不正常

win+r 出現運行對話框,輸入cmd 把下面的代碼粘貼到cmd裏面taskkill /im explorer.exe /fcd /d %us

原创 計算string單詞的漂亮值

給出一個名字,該名字有26個字符串組成,定義這個字符串的“漂亮度”是其所有字母“漂亮度”的總和。 每個字母都有一個“漂亮度”,範圍在1到26之

原创 用插入排序對string排序

void InsertSort(string &str, size_t n) { size_t i,count = 0; int

原创 一個簡易的觸發器實現(二)

using System; using System.Collections.Generic; using System.Linq; using System.Text; using UnityEngine; public de

原创 一個旋轉物體的腳本

using UnityEngine; using System.Collections; public class RotateParticle : MonoBehaviour { [SerializeField]

原创 一個用來測試正確的尾調用的迷宮小遊戲

-- local map = { -- {1,1,0,0,0,0,0,0,0,0}, -- {0,1,1,0,0,0,0,0,0,0}, -- {0,0,1,0,0,0,0,0,0,0}, -- {0,0,0,1,1,0,

原创 一個檢測特效是否丟失材質的腳本

using UnityEngine; using System.Collections; using UnityEditor; using System.IO; public class TestVfxValid : MonoB

原创 得到[0~b]範圍內A的倍數

size_t GetMultipleCount(size_t base,size_t n){ if (base == 0) {

原创 lua探索--------------(setfenv、getfenv相關)

newfenv = {}setfenv(1,newfenv)print(1)------attempt to call global 'pri

原创 一個可以遍歷數組的所有排列的小代碼

function permgen(a,n) if(n == 0)then coroutine.yield(a) else for i=1,n do a[i],

原创 一個移動物體的腳本

using UnityEngine; using System.Collections; public class MoveToward : MonoBehaviour { [SerializeField] pr

原创 Android 導入 android-support-v7-appcompat 包問題

轉載自:http://bbs.csdn.net/topics/390682650#post-398633480~~~~~~~~~~~~~~~~~~~~

原创 httpclient中getmethod方法的url參數如果含有中文的處理辦法

轉自:http://fuliang.iteye.com/blog/565832URI uri = new URI(url,false,"UTF-8")

原创 2017目標

1、在安卓和蘋果上發佈遊戲 2、熟悉u3d引擎架構 3、網絡通訊 4、熟悉物理引擎 5、精通c# 6、3d遊戲相關算法 7、熟悉圖形學原理 8、精通shader 9、熟悉DirectX或OpenGL 10、熟悉NGU