当前位置:网站首页>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)
边栏推荐
- 万物智联时代,悄然走入生活
- 【Unity】Unity开发进阶(七)双刃剑:扩展方法
- wallys/new product/WiFi6 MiniPCIe Module 2T2R 2×2.4GHz 2x5GHz MT7915 MT7975
- CS5213 chip | HDMI to VGA converter chip data sharing
- CS5213芯片|HDMI to VGA转换头芯片资料分享
- 30天啃透这份Framework 源码手册直接面进大厂
- H.265视频流媒体播放器EasyPlayer.js集成时出现“SourceBuffer ”报错,该如何解决?
- 增删改查这么多年,最后栽在MySQL的架构设计上!
- word操作:单独调整英文字体
- Add and delete all these years, finally planted in MySQL architecture design!
猜你喜欢

软件测试到底自学还是报班?

win10桌面图标全部变成白色的怎么办

2022-08-02 第六小组 瞒春 学习笔记

微软SQL服务器被黑客入侵以窃取代理服务的带宽

# 医院管理系统完整项目代码以及数据库建表语句分享

【TypeScript】深入学习TypeScript类(上)

Intensive reading of the Swin Transformer paper and analysis of its model structure

Zabbix 5.0 监控教程(二)

How many ways do you know the singleton pattern?

谷粒商城-day13-es和商品上架
随机推荐
ML之PDP:基于titanic泰坦尼克是否获救二分类预测数据集利用PDP部分依赖图对RF随机森林和LightGBM模型实现可解释性案例
【TypeScript】深入学习TypeScript类(下)
Abstract Factory Pattern
测试ESP32-Zigbee转发命令 : 滑轨、继电器控制
go 反射 reflect 包
牛客刷题:手动实现数组filter方法
Sentinel vs Hystrix 限流对比,到底怎么选?
【STM32学习3】DMA基础操作
【STM32学习2】存储器相关概念与操作
若依集成minio实现分布式文件存储
golang 刷leetcode:Morris 遍历
在迁移测试中,源表、中间表、目标表的迁移规则
You and I will meet the needs of: how to export the data in a MySQL simple ~!Practical!
golang刷leetcode:巫师的总力量和
字节内部技术图谱 惊艳级实用
iptables、firewalld的使用
Software testing pen questions 1 (with answers)
LeetCode 2360. 图中的最长环 基环树找环+时间戳
一群搞社区的人
js function anti-shake and function throttling and other usage scenarios