Unity3d多线程
来源:互联网 发布:淘宝达人怎么申请入口 编辑:程序博客网 时间:2024/05/21 15:44
using UnityEngine;using System.Collections;using System.Threading;public class MultipleThread : MonoBehaviour {private MyThread mt;private Thread thread;void Start () {Debug.LogWarning("Start Main : " + Time.time);mt = new MyThread("child_0");thread = new Thread(new ThreadStart(mt.run));thread.Start();}void Update () {Debug.Log("Main : " + Time.time);if(mt.Count == 10 && thread.IsAlive) thread.Abort();}}public class MyThread{private int count = 0;private string name;public int Count{get{return this.count;}}public MyThread(string name){this.name = name;}public void run(){Debug.Log("********************************************** Start Run a Thread : " + this.name);do{Thread.Sleep(1000);Debug.Log("======================================== In Child Thread Time : " + this.name);count++;}while(this.count < 20);Debug.Log("************************************************ Stop Run a Thread : " + this.name);}}
0 0
- Unity3d多线程
- Unity3D多线程
- Unity3d多线程
- unity3d多线程处理
- Unity3D多线程写法
- Unity3d 协程 多线程 异步区别
- 关于如何导出 unity3d 如何调式多线程
- 解析Unity3D多线程之间的事件派发
- Unity3d 多线程、多并发网络解决方案(C#)
- unity3d之http多线程异步资源下载
- Unity3D之http多线程异步资源下载
- Unity3d Thread多线程,Queue队列,lock关键字
- Unity3D 海水多线程渲染算法实现
- Unity3D 海水多线程渲染算法实现
- Unity3d +vs2012 多线程.多并发网络解决方案(C#)
- Unity3D游戏开发之多线程及使用多线程
- [原]unity3d之http多线程异步资源下载
- Unity3d +vs2015 多线程.多并发网络解决方案(C#)
- android Draw Rect 坐标图示
- Thinkphp 3.2使用小技巧
- python使用twisted里log模块操作text记录日志
- 机房收费系统之用例图
- 佣金宝给力
- Unity3d多线程
- Mybatis拦截器介绍及分页插件
- Shell Perl Python 脚本语言介绍
- 由基本概念开始全面认识Java
- (9)ExtJS之Ext.form.field.Text
- 蓝桥杯练习题 最短距离
- ubuntu 反编译apk
- Rookie学习日记
- 百度引擎的伴侣是SEO吗?