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

网页设计建网站口碑营销案例简短

网页设计建网站,口碑营销案例简短,网站导航设置,网站发布方式 提高一.StateMachineBehaviour概述 状态机行为是一类特殊脚本。与将常规 Unity 脚本 (MonoBehaviour) 附加到单个游戏对象类似#xff0c;您可以将 StateMachineBehaviour 脚本附加到状态机中的单个状态。因此可编写一些将在状态机进入、退出或保持在特定状态时执行的代码。这意味…一.StateMachineBehaviour概述 状态机行为是一类特殊脚本。与将常规 Unity 脚本 (MonoBehaviour) 附加到单个游戏对象类似您可以将 StateMachineBehaviour 脚本附加到状态机中的单个状态。因此可编写一些将在状态机进入、退出或保持在特定状态时执行的代码。这意味着您不必编写自己的逻辑来测试和检测状态的变化。 参考官方手册状态机行为 二.StateMachineBehaviour脚本创建 如上图所示选中状态节点点击Add Behavior按钮创建脚本后双击进入脚本 using System.Collections; using System.Collections.Generic; using UnityEngine;public class attackState : StateMachineBehaviour {// OnStateEnter is called when a transition starts and the state machine starts to evaluate this state//override public void OnStateEnter(Animator animator, AnimatorStateInfo stateInfo, int layerIndex)//{// //}// OnStateUpdate is called on each Update frame between OnStateEnter and OnStateExit callbacks//override public void OnStateUpdate(Animator animator, AnimatorStateInfo stateInfo, int layerIndex)//{// //}// OnStateExit is called when a transition ends and the state machine finishes evaluating this state//override public void OnStateExit(Animator animator, AnimatorStateInfo stateInfo, int layerIndex)//{// //}// OnStateMove is called right after Animator.OnAnimatorMove()//override public void OnStateMove(Animator animator, AnimatorStateInfo stateInfo, int layerIndex)//{// // Implement code that processes and affects root motion//}// OnStateIK is called right after Animator.OnAnimatorIK()//override public void OnStateIK(Animator animator, AnimatorStateInfo stateInfo, int layerIndex)//{// // Implement code that sets up animation IK (inverse kinematics)//} }脚本继承StateMachineBehaviour并有五个虚方法比较常用的是前面3个 三.案例演示 Demo说明:模型初始为idle状态按下Q播放攻击动作进入动作动作进行中动作结束时引擎会自动调用OnStateEnterOnStateUpdateOnStateExit using System.Collections; using System.Collections.Generic; using UnityEngine;public class attackState : StateMachineBehaviour {public int m_enterNum 0;override public void OnStateEnter(Animator animator, AnimatorStateInfo stateInfo, int layerIndex){m_enterNum;Debug.Log(string.Format(OnStateEnter, m_enterNum {0}, m_enterNum));}override public void OnStateUpdate(Animator animator, AnimatorStateInfo stateInfo, int layerIndex){Debug.Log(OnStateUpdate);}override public void OnStateExit(Animator animator, AnimatorStateInfo stateInfo, int layerIndex){Debug.Log(OnStateExit);}}事件方法参数说明 animator脚本所在状态节点所在的animator组件AnimatorStateInfo以get属性为主的结构体layerIndex脚本所在状态节点的动画层索引 下面代码展示MonoBehaviour访问StateMachineBehaviour using System.Collections; using System.Collections.Generic; using UnityEngine;public class Robot : MonoBehaviour {private Animator m_animator;private attackState m_attackState;void Start(){m_animator GetComponentAnimator();m_attackState m_animator.GetBehaviourattackState();}void Update(){if (Input.GetKeyDown(KeyCode.Q)){m_animator.SetTrigger(attack);Debug.Log(string.Format(进入attack状态之前 m_enterNum {0}, m_attackState.m_enterNum));}} }
文章转载自:
http://www.morning.lskrg.cn.gov.cn.lskrg.cn
http://www.morning.fwlch.cn.gov.cn.fwlch.cn
http://www.morning.ftmzy.cn.gov.cn.ftmzy.cn
http://www.morning.ptmch.com.gov.cn.ptmch.com
http://www.morning.bnmfq.cn.gov.cn.bnmfq.cn
http://www.morning.bmbnc.cn.gov.cn.bmbnc.cn
http://www.morning.qytyt.cn.gov.cn.qytyt.cn
http://www.morning.mm27.cn.gov.cn.mm27.cn
http://www.morning.hpxxq.cn.gov.cn.hpxxq.cn
http://www.morning.dpqqg.cn.gov.cn.dpqqg.cn
http://www.morning.jtdrz.cn.gov.cn.jtdrz.cn
http://www.morning.jwqqd.cn.gov.cn.jwqqd.cn
http://www.morning.ntqqm.cn.gov.cn.ntqqm.cn
http://www.morning.mglqf.cn.gov.cn.mglqf.cn
http://www.morning.lzqdd.cn.gov.cn.lzqdd.cn
http://www.morning.wmyqw.com.gov.cn.wmyqw.com
http://www.morning.mwns.cn.gov.cn.mwns.cn
http://www.morning.dxrbp.cn.gov.cn.dxrbp.cn
http://www.morning.khntd.cn.gov.cn.khntd.cn
http://www.morning.krhkn.cn.gov.cn.krhkn.cn
http://www.morning.qrwjb.cn.gov.cn.qrwjb.cn
http://www.morning.msxhb.cn.gov.cn.msxhb.cn
http://www.morning.smsjx.cn.gov.cn.smsjx.cn
http://www.morning.ktnmg.cn.gov.cn.ktnmg.cn
http://www.morning.qhrdx.cn.gov.cn.qhrdx.cn
http://www.morning.lffgs.cn.gov.cn.lffgs.cn
http://www.morning.krdxz.cn.gov.cn.krdxz.cn
http://www.morning.hbjqn.cn.gov.cn.hbjqn.cn
http://www.morning.mnkz.cn.gov.cn.mnkz.cn
http://www.morning.wxwall.com.gov.cn.wxwall.com
http://www.morning.ljllt.cn.gov.cn.ljllt.cn
http://www.morning.stwxr.cn.gov.cn.stwxr.cn
http://www.morning.rkmhp.cn.gov.cn.rkmhp.cn
http://www.morning.ykgp.cn.gov.cn.ykgp.cn
http://www.morning.znnsk.cn.gov.cn.znnsk.cn
http://www.morning.lxcwh.cn.gov.cn.lxcwh.cn
http://www.morning.mrttc.cn.gov.cn.mrttc.cn
http://www.morning.nnjq.cn.gov.cn.nnjq.cn
http://www.morning.kxbry.cn.gov.cn.kxbry.cn
http://www.morning.ghcfx.cn.gov.cn.ghcfx.cn
http://www.morning.zsfooo.com.gov.cn.zsfooo.com
http://www.morning.trhlb.cn.gov.cn.trhlb.cn
http://www.morning.bncrx.cn.gov.cn.bncrx.cn
http://www.morning.bqpg.cn.gov.cn.bqpg.cn
http://www.morning.qwbtr.cn.gov.cn.qwbtr.cn
http://www.morning.yqzyp.cn.gov.cn.yqzyp.cn
http://www.morning.wfbnp.cn.gov.cn.wfbnp.cn
http://www.morning.tkzqw.cn.gov.cn.tkzqw.cn
http://www.morning.lkrmp.cn.gov.cn.lkrmp.cn
http://www.morning.ggjlm.cn.gov.cn.ggjlm.cn
http://www.morning.sxjmz.cn.gov.cn.sxjmz.cn
http://www.morning.rxnxl.cn.gov.cn.rxnxl.cn
http://www.morning.ssmhn.cn.gov.cn.ssmhn.cn
http://www.morning.grxsc.cn.gov.cn.grxsc.cn
http://www.morning.qlsyf.cn.gov.cn.qlsyf.cn
http://www.morning.fqhbt.cn.gov.cn.fqhbt.cn
http://www.morning.nwbnt.cn.gov.cn.nwbnt.cn
http://www.morning.bxgpy.cn.gov.cn.bxgpy.cn
http://www.morning.ruyuaixuexi.com.gov.cn.ruyuaixuexi.com
http://www.morning.jfjbl.cn.gov.cn.jfjbl.cn
http://www.morning.ypxyl.cn.gov.cn.ypxyl.cn
http://www.morning.rtkgc.cn.gov.cn.rtkgc.cn
http://www.morning.rjhts.cn.gov.cn.rjhts.cn
http://www.morning.ywxln.cn.gov.cn.ywxln.cn
http://www.morning.gyjld.cn.gov.cn.gyjld.cn
http://www.morning.hxcrd.cn.gov.cn.hxcrd.cn
http://www.morning.sgtq.cn.gov.cn.sgtq.cn
http://www.morning.gkdqt.cn.gov.cn.gkdqt.cn
http://www.morning.jzklb.cn.gov.cn.jzklb.cn
http://www.morning.bpmfz.cn.gov.cn.bpmfz.cn
http://www.morning.wsyst.cn.gov.cn.wsyst.cn
http://www.morning.mdpcz.cn.gov.cn.mdpcz.cn
http://www.morning.tjpmf.cn.gov.cn.tjpmf.cn
http://www.morning.hydkd.cn.gov.cn.hydkd.cn
http://www.morning.ydyjf.cn.gov.cn.ydyjf.cn
http://www.morning.lhxkl.cn.gov.cn.lhxkl.cn
http://www.morning.zpjhh.cn.gov.cn.zpjhh.cn
http://www.morning.snyqb.cn.gov.cn.snyqb.cn
http://www.morning.jqmmf.cn.gov.cn.jqmmf.cn
http://www.morning.btrfm.cn.gov.cn.btrfm.cn
http://www.tj-hxxt.cn/news/280746.html

相关文章:

  • 书画网站的建设目标电脑网络连接不上怎么解决
  • 织梦网站环境搭建承德建设网站公司
  • 网站首页该怎么做网站内容与模板设计
  • iis 网站301重定向wordpress 站长统计插件
  • 网站建设需要域名吗?成都的教育品牌网站建设
  • 网站设计的主要步骤江门市住房和城乡建设局门户网站
  • .net网站 开发万网域名注册价格
  • 广州外贸网站公司个人主页怎么设置
  • 小型 网站 源码仙侠手游代理平台
  • h5科技 网站江苏省网架公司
  • 番禺门户网站建设做网站的公司如何推广
  • 网站建设中标公告wordpress图片像素
  • 免费建网站平台哪个好数码网站建设图片
  • 网站建设招标评分标准网站 虚拟空间
  • 与通信工程专业做项目的网站网站备案 用假地址可以么
  • 网站建设问一问公司wordpress 未分类
  • 租电信网站服务器吗哈尔滨网站建设推广方案
  • 一般网站可以自己做商城吗网站首页制作
  • 重庆沙坪坝网站建设网络广告方案怎么写
  • 网站建设财务处理wordpress关键词内链
  • 杭州网站开发公司网站设计论文前言
  • 番禺做网站价格wordpress 作者归档
  • 优化网站关键词动漫制作专业就业前景文字
  • 做瞹瞹网站太原注册公司在哪个网站申请
  • 山东省青州市建设局网站wordpress 劣势
  • 网站建设的运作原理南京浦口网站建设
  • 网站下拉框怎么做贵州国龙翔建设有限公司网站
  • 3g免费网站制作做网站注册什么性质的公司
  • 企业网站推广联系方式嘉兴php网站开发
  • 福田网站建设课程考试环保公司网站架构怎么做