深海秘境
2017-04-26 14:59:47 0 举报
深海秘境
作者其他创作
大纲/内容
InteractItem
[SerializeField]private bool IsCheck = false; //是否开启检测
private void Update();//实时检测手势是否运动
DecorationManager(继承MonoBehaviour)
[SerializeField]float lerpSpeed;//差值速度List decorationList;//饰品列表
void CheckFace(List list);//根据人脸位置列表生成饰品void ClearList();//清空列表
Pool(对象池)
Shark(鲨鱼)
重写父类方法
Fish(鱼)
DataCenter
static string name = \"Config.txt\";static string path = Application.dataPath + \"/StreamingAssets/\" + name;static string workPath = System.IO.Directory.GetCurrentDirectory() + \"/\" + name;public static Config Config;
public static void Init();static void ReadConfig(string path);public static void CreateConfig();
OpencvTools
private static int m_Threshold = 10; //临界值变化private static int m_Width; //宽private static int m_Height; //高private static Mat webImg; //外部图片private static Mat tempImg; //临时的图片private static Mat curImg; //当前帧的图片private static Mat preImg; //前一帧的图片private static Mat outImg; //输出的图片private static int frame = 0; //private static List contours; //轮廓private static Mat hierarchy; //层次索引private static Mat contourMat; //轮廓图片private static bool isStart = false; //开始游戏
CreatureManager(单例)
private List creatureList ;
public void AddItem(GameObject creature);public void RemoveItem(GameObject creature);public void ClearList();
Octopus(章鱼)
WebCameraRender(继承MonoBehaviour)
private float screenStretchX;//屏幕拉伸X比例 private float screenStretchY;//屏幕拉伸Y比例 private float distance = 30f;//和摄像机的距离 private bool isShot = false;//是否截图 private int requireFPS = 0;//相机截取画面需要的FPS private WebCamDevice[] cameraDevice;//摄像机驱动private WebCamTexture webCamTexture;//渲染private GameObject renderObject;//渲染物体private Texture2D finishTexture;private Camera mCamera;
public void SetFinalTexture(Texture2D pTexture);//设置mesh面板的材质贴图void InitWebCamera();//初始化相机void CloseCamera();//关闭相机void CreateRenderPlane();//创建mesh面板
Config
public int CameraIndex; //摄像机索引public bool IsHorizontalFlip; //是否横向翻转public int OpenCVWidth; //算法中的宽public int OpenCVHeight; //算法中的高public int RenderWidth; //渲染框宽度public int RenderHeight; //渲染框高度
BaseCreature(继承MonoBehaviour)
[SerializeField]protected float recycleTime ;//回收时间
protected virtual void VUpdate();protected virtual void VOnEnable();protected virtual void VOnDisable();IEnumerator RecycleSelf();//回收协程
GameInfo
public static Vector2 RenderRect ;public static float CurWidth;
0 条评论
下一页