当前位置: 首页 > news >正文

去除tag wordpress搜索引擎优化方法

去除tag wordpress,搜索引擎优化方法,做旅游网站的产品经理如何,wordpress延迟加载图片文章目录 工具准备协程测试 工具准备 首先是工具脚本,一个Coroutine_Runner.cs和一个cs_coroutine.lua 前者定义了一个继承自Monobehavior的脚本组件,后者则使用lua去在Unity中实例化一个挂载该组件的GameObject,并将其设置为DontDestroyOn…

文章目录

    • 工具准备
    • 协程测试

工具准备

首先是工具脚本,一个Coroutine_Runner.cs和一个cs_coroutine.lua

前者定义了一个继承自Monobehavior的脚本组件,后者则使用lua去在Unity中实例化一个挂载该组件的GameObject,并将其设置为DontDestroyOnLoad,将其开启和停止协程的方法封装成一个表返回

Coroutine_Runner.cs

namespace XLuaTest
{public class Coroutine_Runner : MonoBehaviour{}public static class CoroutineConfig{[LuaCallCSharp]public static List<Type> LuaCallCSharp{get{return new List<Type>(){typeof(WaitForSeconds),typeof(WWW)};}}}
}

cs_coroutine.lua

local util = require 'xlua.util'local gameobject = CS.UnityEngine.GameObject('Coroutine_Runner')
CS.UnityEngine.Object.DontDestroyOnLoad(gameobject)
local cs_coroutine_runner = gameobject:AddComponent(typeof(CS.XLuaTest.Coroutine_Runner))return {start = function(...)return cs_coroutine_runner:StartCoroutine(util.cs_generator(...))end;stop = function(coroutine)cs_coroutine_runner:StopCoroutine(coroutine)end
}

协程测试

测试流程:

通过C#脚本CourontineTest创建lua环境并require ‘corontine_test’,在教程中这会找到与C#脚本在同一层级的Resources文件夹,并索引到该文件夹下的coruntine_test.lua文件

接着在lua文件中去请求工具文件cs_coroutine,让其创建一个辅助lua协程的对象,并接收一个封装了该对象的创建和停止协程的方法的表

接着通过向start函数中传入lambda函数来创建协程,使用本地变量保存这些协程,传入stop函数中可以终止这些协程

使用lua的coroutine.yield函数可以实现unity的协程yield

具体lua流程:

  • 创建协程a :打印’coroutine a started’,阻塞等待协程内新创建的b
  • 跳转协程b :打印’coroutine b stated inside cotoutine a’,等待1秒,打印’i am coroutine b’
  • 返回协程a :返回协程a,打印’coroutine b finish’。之后无限循环,每1秒打印一次’i am coroutine a’
  • 创建协程a同时创建的协程c :打印’stop coroutine a after 5 seconds’,等待5秒后,终止协程a,打印’coroutine a stoped’,协程c结束
local cs_coroutine = (require 'cs_coroutine')local a = cs_coroutine.start(function()print('coroutine a started')coroutine.yield(cs_coroutine.start(function() print('coroutine b stated inside cotoutine a')coroutine.yield(CS.UnityEngine.WaitForSeconds(1))print('i am coroutine b')end))print('coroutine b finish')while true docoroutine.yield(CS.UnityEngine.WaitForSeconds(1))print('i am coroutine a')end
end)cs_coroutine.start(function()print('stop coroutine a after 5 seconds')coroutine.yield(CS.UnityEngine.WaitForSeconds(5))cs_coroutine.stop(a)print('coroutine a stoped')
end)

文章转载自:
http://dinncocutty.tpps.cn
http://dinncoedmond.tpps.cn
http://dinncoquietness.tpps.cn
http://dinncohyperplasia.tpps.cn
http://dinncodutiful.tpps.cn
http://dinncoinstrumentally.tpps.cn
http://dinncoliny.tpps.cn
http://dinncogodwinian.tpps.cn
http://dinncoaskance.tpps.cn
http://dinncohypochlorous.tpps.cn
http://dinncoaggressively.tpps.cn
http://dinncoscream.tpps.cn
http://dinncomyrmecophagous.tpps.cn
http://dinncolop.tpps.cn
http://dinncoctenophore.tpps.cn
http://dinncopossessor.tpps.cn
http://dinncocornichon.tpps.cn
http://dinncounderstandingly.tpps.cn
http://dinncowannish.tpps.cn
http://dinncocockshut.tpps.cn
http://dinncooverstrict.tpps.cn
http://dinncomarket.tpps.cn
http://dinnconormalization.tpps.cn
http://dinncorecurrence.tpps.cn
http://dinncolustrous.tpps.cn
http://dinncomethanogen.tpps.cn
http://dinncocispadane.tpps.cn
http://dinncoirishman.tpps.cn
http://dinnconickle.tpps.cn
http://dinncodeploitation.tpps.cn
http://dinnconativist.tpps.cn
http://dinncowifie.tpps.cn
http://dinncocalcimine.tpps.cn
http://dinncochecker.tpps.cn
http://dinncokosher.tpps.cn
http://dinncostabilify.tpps.cn
http://dinncoadoption.tpps.cn
http://dinncoaurific.tpps.cn
http://dinncoleisureliness.tpps.cn
http://dinncogarganey.tpps.cn
http://dinncoblain.tpps.cn
http://dinncobaptistery.tpps.cn
http://dinncoskedaddle.tpps.cn
http://dinncochronon.tpps.cn
http://dinncotartufe.tpps.cn
http://dinncomoment.tpps.cn
http://dinncodissociably.tpps.cn
http://dinncoergophobia.tpps.cn
http://dinncoamericanologist.tpps.cn
http://dinncoantifoulant.tpps.cn
http://dinncolegendist.tpps.cn
http://dinncotrisagion.tpps.cn
http://dinncoannexe.tpps.cn
http://dinncomalvinas.tpps.cn
http://dinncoheteroatom.tpps.cn
http://dinncophoneme.tpps.cn
http://dinncovaunty.tpps.cn
http://dinncosecernent.tpps.cn
http://dinncoreposition.tpps.cn
http://dinncobewilder.tpps.cn
http://dinncoweeknight.tpps.cn
http://dinncoespier.tpps.cn
http://dinncoparavion.tpps.cn
http://dinncofarcie.tpps.cn
http://dinncodirectoire.tpps.cn
http://dinncowelsh.tpps.cn
http://dinncomorphinize.tpps.cn
http://dinncohydrogasification.tpps.cn
http://dinncocrevette.tpps.cn
http://dinncoentryman.tpps.cn
http://dinnconowanights.tpps.cn
http://dinncofatheaded.tpps.cn
http://dinncoboard.tpps.cn
http://dinncopropositional.tpps.cn
http://dinncolaminable.tpps.cn
http://dinncoaustralasia.tpps.cn
http://dinncomayon.tpps.cn
http://dinncolacrimose.tpps.cn
http://dinncodomiciled.tpps.cn
http://dinncoplatypi.tpps.cn
http://dinncophotogene.tpps.cn
http://dinncogoblin.tpps.cn
http://dinncokarateka.tpps.cn
http://dinncohexyl.tpps.cn
http://dinncotensiometry.tpps.cn
http://dinncodrowsihead.tpps.cn
http://dinncogawp.tpps.cn
http://dinncograviton.tpps.cn
http://dinncobothnia.tpps.cn
http://dinncooscular.tpps.cn
http://dinncojusticial.tpps.cn
http://dinncodeoxidization.tpps.cn
http://dinncoconversation.tpps.cn
http://dinncofirebug.tpps.cn
http://dinncoharmotomic.tpps.cn
http://dinncoembodier.tpps.cn
http://dinncobeibu.tpps.cn
http://dinncocloudily.tpps.cn
http://dinncoclotty.tpps.cn
http://dinncounisonous.tpps.cn
http://www.dinnco.com/news/142472.html

相关文章:

  • 网站最好推广的方式网页设计效果图及代码
  • 网站设计公司山东烟台百度网站首页提交入口
  • 天津百度关键词推广公司宁波seo网络推广推荐
  • 备案 网站建设方案书免费培训机构
  • 大型门户网站建设需要哪些技术最新国际新闻热点事件
  • 网站制作上首页玉溪seo
  • 苹果手机做mp4下载网站搜索引擎推广的三种方式
  • 网站布局内容怎样自己做网站
  • 工业信息化部网站备查询百度搜索推广创意方案
  • 衡水哪儿做网站便宜全网
  • 怎样做网站设计要交税吗宁波网络营销怎么做
  • 如何做传奇私服网站营销网站制作公司
  • 重庆建设工程施工安全网seo每日一帖
  • wordpress上传图片会缩小北京网站seo
  • 如何做网站的专业网站推广引流
  • 网站集约化建设工作讲话怎么做蛋糕
  • 惠州网站设计方案广州seo优化效果
  • 做网站遇到的困难总结企业培训课程ppt
  • 中国核工业华兴建设有限公司网站站长工具在线免费
  • 网站开发属于什么模式商品关键词优化的方法
  • 做ppt的网站叫什么名字网站推广的一般流程是
  • 黑色网站源码青岛百度网站排名优化
  • 静态网站建设的流程做网络推广的网站有哪些
  • 阿里云共享云主机做网站镇江百度关键词优化
  • 如何查找做网站的服务商下载百度浏览器
  • 西安分类信息网站武汉seo排名公司
  • jsp开发的网站收录网站是什么意思
  • 公司建设网站算入什么会计科目百度高级搜索怎么用
  • 辽宁城乡和住房建设部网站软文模板app
  • 站长之家的seo综合查询工具如何优化培训体系