当前位置:网站首页>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)
边栏推荐
- 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?
- IP协议(网际协议)
- How to seize the new trend of NFT, yuan|universe|universe?
- 宝塔搭建实测-基于ThinkPHP5.1的wms进销存源码
- CKA、CKAD、CKS、KCNA、CFCD考试
- golang刷leetcode:巫师的总力量和
- 【C语言进阶】--指针典题剖析
- FRED应用:激光二极管光源耦合到光纤的仿真
- 手把手教你干掉if else
- 单例模式你会几种写法?
猜你喜欢
If the watermark according to how to realize the function
group of people
面试了个985毕业的,回答“性能调优”题时表情令我毕生难忘
30天啃透这份Framework 源码手册直接面进大厂
[c] Detailed explanation of operators (1)
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?
H5网页播放器EasyPlayer.js播放器界面的加载效果无法消失是什么原因?
Sentinel vs Hystrix 限流对比,到底怎么选?
多租户的多种实现方案
Flink优化的方方面面
随机推荐
网络运维系列:健康检查的方式
博客主题美化第二弹
多租户的多种实现方案
从零开始配置 vim(5)——本地设置与全局设置
面试官居然问我:删库后,除了跑路还能干什么?
golang刷letcode:公平分发饼干
总结嵌入式C语言难点(2部分)
golang 刷leetcode:统计打字方案数
工厂模式理解了没有?
apache calcite中关于model文件配置
go context 包
SSM integration steps (emphasis)
Abstract Factory Pattern
Add and delete all these years, finally planted in MySQL architecture design!
[Dry goods] Best practice of sub-library and sub-table
双轴晶体中的锥形折射
Flink-SQL
ML之PDP:基于titanic泰坦尼克是否获救二分类预测数据集利用PDP部分依赖图对RF随机森林和LightGBM模型实现可解释性案例
CKA、CKAD、CKS、KCNA、CFCD考试
若依如何实现添加水印功能