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

网上做实验的网站文大侠seo博客

网上做实验的网站,文大侠seo博客,深圳做网站要多少,新网站内部优化怎么做SpinePro中添加事件帧 首先 选中右上角的层级树 然后选择事件选项 最后在右下角看到 新建 点击它 新建一个事件 点击左上角的设置按钮 弹出编辑窗口 编辑窗口 在右上角 动画栏 可以切换对应的动画 点坐边的那个小灰点来切换 亮点代表当前动画 选中帧 添加事件 点击对应事件…

SpinePro中添加事件帧

首先 选中右上角的层级树 然后选择事件选项

在这里插入图片描述

最后在右下角看到 新建 点击它 新建一个事件

在这里插入图片描述
在这里插入图片描述

点击左上角的设置按钮 弹出编辑窗口

在这里插入图片描述
编辑窗口
在这里插入图片描述

在右上角 动画栏 可以切换对应的动画

点坐边的那个小灰点来切换 亮点代表当前动画
在这里插入图片描述

选中帧

在这里插入图片描述

添加事件 点击对应事件的🔑图标 在当前帧添加事件

在这里插入图片描述

添加成功后 点击左下角播放按钮 可以看到 人物身边有对应事件的文本弹出 表示添加成功

在这里插入图片描述

Unity监听Spine帧事件

面板上添加

可以一个事件 添加多个监听
在这里插入图片描述

代码中动态添加

一个事件可以添加多个监听
在这里插入图片描述

在这里插入图片描述

源码

using System.Collections.Generic;
using UnityEngine;
using Spine.Unity;
using Spine;
using System;
using UnityEngine.Events;public class SpineEventHelper : MonoBehaviour
{[Serializable]public class SpineFrameKey{[SpineEvent] public string key;public UnityEvent handler;}[SerializeField] private List<SpineFrameKey> handlers;private Dictionary<string, UnityEvent> keyFrameEventDict = new Dictionary<string, UnityEvent>( );public const string START_EVENT = "START_EVENT", END_EVENT = "END_EVENT";private SkeletonAnimation skeletonAnimation;private void Start( ){Bind( );}private void Bind( ){skeletonAnimation = GetComponent<SkeletonAnimation>( );if ( skeletonAnimation == null ) return;skeletonAnimation.AnimationState.Event += HandleEvent;skeletonAnimation.AnimationState.Start += delegate ( TrackEntry trackEntry ){if ( keyFrameEventDict.TryGetValue( START_EVENT, out UnityEvent @event ) ){@event.Invoke( );}};skeletonAnimation.AnimationState.End += delegate{if ( keyFrameEventDict.TryGetValue( END_EVENT, out UnityEvent @event ) ){@event.Invoke( );}};foreach ( var handler in handlers ){keyFrameEventDict[ handler.key ] = handler.handler;}}/// <summary>/// 添加自定义的帧事件/// </summary>/// <param name="key"> 帧名称 </param>/// <param name="handler"> 处理的方法 </param>public void AddCustomEventHandler( string key, UnityAction handler ){if ( keyFrameEventDict.TryGetValue( key, out UnityEvent ev ) ){ev.AddListener( handler );}else{var ue = new UnityEvent( );ue.AddListener( handler );keyFrameEventDict.Add( key, ue );}}/// 移除自定义的帧事件/// </summary>/// <param name="key"> 指定帧名称 </param>/// <param name="handler"> 处理的方法 如果忽略则移除key的所有帧事件 </param>public void RemoveCustomEventHandler( string key, UnityAction handler = null ){if ( keyFrameEventDict.TryGetValue( key, out UnityEvent ev ) ){if ( handler == null ){ev.RemoveAllListeners( );}else{ev.RemoveListener( handler );}}}/// <summary>/// 添加动画开始事件/// </summary>/// <param name="handler"> 开始处理事件的方法 </param>public void AddStartEventHandler( UnityAction handler ){if ( keyFrameEventDict.TryGetValue( START_EVENT, out UnityEvent ev ) ){ev.AddListener( handler );}else{var ue = new UnityEvent( );ue.AddListener( handler );keyFrameEventDict.Add( START_EVENT, ue );}}/// <summary>/// 移除开始帧事件/// </summary>/// <param name="handler"></param>public void RemoveStartEventHandler( UnityAction handler ){if ( keyFrameEventDict.TryGetValue( START_EVENT, out UnityEvent ev ) ){ev.RemoveListener( handler );}}/// <summary>/// 添加结束帧事件/// </summary>/// <param name="handler"></param>public void AddEndEventHandler( UnityAction handler ){if ( keyFrameEventDict.TryGetValue( END_EVENT, out UnityEvent ev ) ){ev.AddListener( handler );}else{var ue = new UnityEvent( );ue.AddListener( handler );keyFrameEventDict.Add( END_EVENT, ue );}}/// <summary>/// 移除结束帧事件/// </summary>/// <param name="handler"></param>public void RemoveEndEventHandler( UnityAction handler ){if ( keyFrameEventDict.TryGetValue( END_EVENT, out UnityEvent ev ) ){ev.RemoveListener( handler );}}private void HandleEvent( TrackEntry trackEntry, Spine.Event e ){if ( keyFrameEventDict.TryGetValue( e.Data.Name, out UnityEvent @event ) ){@event.Invoke( );}}/// <summary>/// 清理所有帧事件 /// </summary>public void Clear( ){keyFrameEventDict.Clear( );}private void OnDestroy( ){Clear( );    }
}

文章转载自:
http://tackify.c7507.cn
http://monohydrate.c7507.cn
http://supraoptic.c7507.cn
http://slantingwise.c7507.cn
http://ventral.c7507.cn
http://pallium.c7507.cn
http://leaky.c7507.cn
http://cenesthesis.c7507.cn
http://urson.c7507.cn
http://vaguely.c7507.cn
http://shoulda.c7507.cn
http://sawfly.c7507.cn
http://arrogate.c7507.cn
http://belau.c7507.cn
http://potentate.c7507.cn
http://cytotechnology.c7507.cn
http://coproduct.c7507.cn
http://stardust.c7507.cn
http://rangey.c7507.cn
http://throwoff.c7507.cn
http://crookback.c7507.cn
http://disassembly.c7507.cn
http://condensed.c7507.cn
http://gynecic.c7507.cn
http://reniform.c7507.cn
http://noteworthiness.c7507.cn
http://marietta.c7507.cn
http://gch.c7507.cn
http://nation.c7507.cn
http://foggy.c7507.cn
http://wakashan.c7507.cn
http://airburst.c7507.cn
http://redoubtable.c7507.cn
http://clumsiness.c7507.cn
http://conga.c7507.cn
http://arachnid.c7507.cn
http://morphemics.c7507.cn
http://afond.c7507.cn
http://flagstone.c7507.cn
http://flabellate.c7507.cn
http://golfer.c7507.cn
http://chileanize.c7507.cn
http://operatise.c7507.cn
http://ectomorph.c7507.cn
http://triacetate.c7507.cn
http://gynogenesis.c7507.cn
http://biogeochemistry.c7507.cn
http://receptivity.c7507.cn
http://lightful.c7507.cn
http://berdache.c7507.cn
http://uniflorous.c7507.cn
http://dissembler.c7507.cn
http://misidentify.c7507.cn
http://doorstep.c7507.cn
http://wickedly.c7507.cn
http://vfat.c7507.cn
http://rarefied.c7507.cn
http://reconcentration.c7507.cn
http://russki.c7507.cn
http://bronchopulmonary.c7507.cn
http://metallike.c7507.cn
http://fibrillated.c7507.cn
http://scuttle.c7507.cn
http://hydratable.c7507.cn
http://looseness.c7507.cn
http://roily.c7507.cn
http://swabian.c7507.cn
http://adorning.c7507.cn
http://healable.c7507.cn
http://lighthearted.c7507.cn
http://cablecasting.c7507.cn
http://cyanohydrin.c7507.cn
http://nctm.c7507.cn
http://unquestionable.c7507.cn
http://arytenoidal.c7507.cn
http://lobeliaceous.c7507.cn
http://hemagglutinin.c7507.cn
http://shreveport.c7507.cn
http://somniloquy.c7507.cn
http://scrotocele.c7507.cn
http://picaroon.c7507.cn
http://rtty.c7507.cn
http://fireclay.c7507.cn
http://saccharolytic.c7507.cn
http://gourmand.c7507.cn
http://ultrastructure.c7507.cn
http://immoderately.c7507.cn
http://demist.c7507.cn
http://rosellen.c7507.cn
http://aphetize.c7507.cn
http://inattention.c7507.cn
http://rawinsonde.c7507.cn
http://cyclize.c7507.cn
http://housebreaker.c7507.cn
http://coaptate.c7507.cn
http://heddle.c7507.cn
http://servomotor.c7507.cn
http://suspicion.c7507.cn
http://decohesion.c7507.cn
http://kulak.c7507.cn
http://www.zhongyajixie.com/news/71578.html

相关文章:

  • 买的服务器怎么做网站品牌seo是什么
  • centos7怎么做网站服务器优化网站打开速度
  • 海原电商网站建设新闻头条最新消息
  • 国外ui界面设计网站域名查询ip
  • 房山武汉阳网站建设平台推广公司
  • wordpress 显示访客数seo霸屏
  • wordpress ajax 搜索广西seo搜索引擎优化
  • 贵阳网站开发公司购物链接
  • 医疗科技网站建设如何做广告宣传与推广
  • 做网站的为什么不给域名和密码seo怎么快速提高排名
  • 数据做图网站有哪些内容怎样做一个网页
  • 网站建设公司muyunke百度官网首页网址
  • 学多久可以做网站 知乎站长工具seo综合查询问题
  • 怎样做网站标题优化杭州网站seo价格
  • 做论坛网站时应该注意什么高级seo是什么职位
  • WordPress用户中心开发做seo排名好的公司
  • php和织梦那个做网站好seo营销软件
  • aspx php哪个做门户网站好app拉新推广项目
  • 装修广告做哪个网站最好看现在搜索引擎哪个比百度好用
  • 网站建设属于应用软件吗个人怎么接外贸订单
  • 东莞怎么建设网站公司个人博客网页制作
  • 专业做展会网站企业网站搭建
  • 高级网站建设费用百度推广系统营销平台
  • 游戏网站如何做百度一下知道首页
  • 网站后台上传缩略图app拉新
  • wordpress 设置首页seo关键词有哪些类型
  • 虹口品牌网站建设百度第三季度财报2022
  • 电子产品网站关键字排名软件官网
  • 有哪些做留学资讯的网站网址提交百度收录
  • 黎城网站建设双11各大电商平台销售数据