private void Start()
        {
            // start scaling the circle where the background thread runs in sync with the Update method
            // this would be great for something like pathfinding where the path needs to update every frame in the background
            circleSyncScale = CircleSync.transform.localScale;
            EZThread.BeginThread(ScaleSyncThread, true);

            // start scaling the circle where the background thread runs as fast as possible
            // this could be useful for something like network calls or other external resource loading
            // you will notice this circle appears to randomly change size, that is because
            // the background thread is scaling the circle super fast so when the update method
            // executes to set the actual scale, it will essentially be a random value.
            circleNonSyncScale = CircleNonSync.transform.localScale;
            EZThread.BeginThread(ScaleNonSyncThread, false);
        }
Ejemplo n.º 2
0
        private void Start()
        {
            // start scaling the circle where the background thread runs in sync with the Update method
            //后台线程运行同步更新方法
            // this would be great for something like pathfinding where the path needs to update every frame in the background
            //这将是伟大的东西像寻路的道路需要在后台更新每一帧
            circleSyncScale = CircleSync.transform.localScale;
            EZThread.BeginThread(ScaleSyncThread, true);
            //bool值表示是否与统一同步更新功能。通常你希望这是真的。

            // start scaling the circle where the background thread runs as fast as possible
            //后台线程运行尽可能快
            // this could be useful for something like network calls or other external resource loading
            //这可能是有用的网络调用或其他外部资源加载
            // you will notice this circle appears to randomly change size, that is because
            //你会注意到这个圆似乎随机改变大小,这是因为
            // the background thread is scaling the circle super fast so when the update method
            //后台线程扩展圈非常快所以当更新方法
            // executes to set the actual scale, it will essentially be a random value.
            //实际执行设置规模,它基本上是一个随机值。
            circleNonSyncScale = CircleNonSync.transform.localScale;
            EZThread.BeginThread(ScaleNonSyncThread, false);
        }