当前位置:网站首页>Unity WallFxPack使用
Unity WallFxPack使用
2022-08-02 21:43:00 【海涛高软】
默认插件,动画是一开一合,不能单独控制开和合
下面代码,就是可以单独的控制动画的开和关
public class test : MonoBehaviour
{
float time;
bool a = false;
bool b = false;
void Start()
{
}
// Update is called once per frame
void Update()
{
if (a)
{
time += Time.deltaTime*0.8f;
if (time > 1)
{
a = false;
GetComponent<Renderer>().materials[0].SetInt("_SpeedAnimatedMode", 0);
}
}
if (b){
time -= Time.deltaTime;
if (time < 0)
{
b = false;
}
}
GetComponent<Renderer>().materials[0].SetFloat("_WallOpening", time);
if (Input.GetMouseButtonDown(0))
{
kai();
}
if (Input.GetMouseButtonDown(1))
{
guan();
}
}
void kai()
{
a = true;
}
void guan()
{
b = true;
}
}
surf方法中修改如下
float2 temp_output_5_0 = ( ( ( i.uv2_texcoord2 - temp_cast_0 ) * ( 1.0 - pow( (( _AnimatedOpening )?( abs( ( float2( 1,1 ) * _WallOpening) ) ):( temp_cast_1 )) , 0.2 ) ) ) + 0.5 );FR:徐海涛(hunk Xu)
边栏推荐
猜你喜欢

H.265视频流媒体播放器EasyPlayer.js集成时出现“SourceBuffer ”报错,该如何解决?

牛客每日刷题之链表

IP协议(网际协议)

【c】操作符详解(一)

The interviewer asked me: delete library, in addition to run do?

Software testing pen questions 1 (with answers)

【STM32学习3】DMA基础操作

同样月薪6K,为什么同事跳槽月薪翻倍,而你只涨了1000?

第十章 时序与延迟

In-depth study TypeScript TypeScript 】 【 class (under)
随机推荐
【TypeScript】深入学习TypeScript模块化
JS Date 时间戳 getTune data.parse 倒计时小程序
Jmeter二次开发实现rsa加密
hi!Don't look at how to SAO gas dye-in-the-wood in MySQL?
【DEBUG】ImportError: Unable to import required dependencies: numpy: DLL load failed: 找不到指定的模块。
微软SQL服务器被黑客入侵以窃取代理服务的带宽
抽象工厂模式
【TypeScript】深入学习TypeScript类(下)
谷粒商城-day13-es和商品上架
源码构建LAMP环境-3
YAML文件格式
搭建Spark开发环境(第二弹)
从零开始配置 vim(5)——本地设置与全局设置
golang刷leetcode:巫师的总力量和
从月薪10k到30k的必走之路:自动化测试
What is the core business model of the "advertising e-commerce" that has recently become popular in the circle of friends, and is the advertising revenue really reliable?
YARN资源调度系统介绍
golang刷leetcode:使数组按非递减顺序排列
你我都会遇到的需求:如何导出MySQL中的数据~ 简单!实用!
RuoYi-App启动教程