Unity3d 工具方法
来源:互联网 发布:淘宝省市区三级联动js 编辑:程序博客网 时间:2024/06/18 17:11
一、Unity3d Animation 正序、倒叙播放(从当前的位置帧)
void Play(Animation animation,float speed = 1.0f)
{
float currentTime = animation[animation.clip.name].time;
animation[animation.clip.name].time = currentTime;
animation[animation.clip.name].speed =1* speed;
animation.Play(animation.clip.name);
}
void Rewind(Animation animation,float speed = 1.0f)
{
float currentTime = animation[animation.clip.name].time;
animation[animation.clip.name].time = currentTime;
animation[animation.clip.name].speed =-1* speed;
animation.Play(animation.clip.name);
}
二、unity3D 调用手机外部播放器、针对安卓、苹果手机;API 5.4.2
public static void PlayVideo(string file,FullScreenMovieControlMode fullScreenMovieControlMode=FullScreenMovieControlMode.Full)
{
Handheld.PlayFullScreenMovie(file, Color.black, fullScreenMovieControlMode);
}
public static void PlayVideo(string file, Color bgColor,FullScreenMovieControlMode fullScreenMovieControlMode = FullScreenMovieControlMode.Full)
{
Handheld.PlayFullScreenMovie(file, bgColor, fullScreenMovieControlMode);
}
public void PlayVideo(string file, System.Action callbabck)
{
StartCoroutine(IEPlayVideo(file, callbabck));
}
IEnumerator IEPlayVideo(string file,System.Action callbabck, FullScreenMovieControlMode fullScreenMovieControlMode = FullScreenMovieControlMode.Full)
{
Handheld.PlayFullScreenMovie(file, Color.black, fullScreenMovieControlMode);
yield return new WaitForEndOfFrame();
if (callbabck != null)
{
callbabck();
}
}
- Unity3d 工具方法
- Unity3D 性能优化工具
- Unity3D中的工具类
- Unity3D截屏工具
- unity3d可视化log工具
- Unity3D 注释工具
- Protobuff unity3d 工具链
- Unity3d C#反编译工具Reflector
- Unity3D for mac开发工具
- Unity3d 地图编辑工具基础知识
- Unity3D自动打包工具1
- Unity3d C#反编译工具Reflector
- Unity3D 游戏资源提取工具
- Unity3D 游戏资源提取工具
- Unity3D工具类 - 读写文件
- Unity3d一 工具、源码、破解
- unity3d 重要函数方法
- unity3d 重要函数方法
- Java过滤器与SpringMVC拦截器之间的关系与区别
- crontab处理java定时任务
- 基本类型与包装类型
- 栈和队列的相关面试题
- 谈谈这几天加班的感受
- Unity3d 工具方法
- spring 解读之 基本bean装配
- 51nod 最大公约数GCD
- android布局--Android fill_parent、wrap_content和match_parent的区别 三个属性都用来适应视图的水平或垂直大小,一个以视图的内容或尺寸为基础的布局比精
- Eclipse中使用Git
- 兼容IE8问题
- 剑指offer-数字在排序数组中出现的次数
- java List的<>中 方法参数是父类对象的list。传入子类对象时的处理
- 软件设计原则概述