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

1.6,unity动画Animator屏蔽某个部位,动画组合

动画组合 一边跑一边攻击

 using System.Collections;
using System.Collections.Generic;
using UnityEngine;public class One : MonoBehaviour
{private Animator anim;// Start is called before the first frame updatevoid Start(){anim = GetComponent<Animator>();}// Update is called once per framevoid Update(){if (Input.GetKeyDown(KeyCode.Alpha0)){anim.SetInteger("i", 0);}else if (Input.GetKeyDown(KeyCode.Alpha1)){anim.SetInteger("i", 1);}else if (Input.GetKeyDown(KeyCode.Alpha2)){anim.SetInteger("i", 2);}else if (Input.GetKeyDown(KeyCode.Alpha3)){anim.SetInteger("i", 3);}else if (Input.GetKeyDown(KeyCode.Alpha4)){anim.SetInteger("i", 4);}}
}

 

http://www.lryc.cn/news/463341.html

相关文章:

  • 发动机冷却系统排空气
  • 三周精通FastAPI:1 第一步入门
  • RestTemplate基本使用之HTTP实现GET请求和POST请求
  • 2024-10-18 问AI: [AI面试题] 神经网络有哪些不同类型?
  • 【开源免费】基于SpringBoot+Vue.JS课程作业管理系统(JAVA毕业设计)
  • jmeter中对于有中文内容的csv文件怎么保存
  • Leetcode 921 Shortest Path in Binary Matrix
  • 第二十二篇——菲欧几何:相对论的数学基础是什么?
  • 【AI整合包及教程】EchoMimic:开创数字人新时代,让静态图像“活”起来!
  • ArcGIS 最新底图服务地址
  • 【服务器部署】Docker部署小程序
  • 三菱FX PLC设计一个电子钟程序实例
  • 妇女、商业与法律(WBL)(1971-2023年)
  • python 卸载、安装、virtualenv
  • ubuntu24.0离线安装Ollama和纯cpu版本以及对接Spring AI
  • 机器学习核心:监督学习与无监督学习
  • 服务器托管的优缺点有哪些?
  • RestClient查询文档排序、分页和高亮
  • API项目5:申请签名 在线调用接口
  • Google FabricDiffusion:开启3D虚拟试穿新篇章
  • 【开发语言】c++的发展前景
  • 【机器学习】图像识别——计算机视觉在工业自动化中的应用
  • lstm基础知识
  • Linux :at crontab简述
  • Python,Swift,Haskell三种语言在使用正则表达式上的方法对比
  • leetcode力扣刷题系列——【三角形的最大高度】
  • 工业相机解决方案
  • 设计一个高效的日志分析系统:自动检测错误日志的实用指南
  • 英语学习--如果你的父母不听你的话
  • LeetCode:3258.统计满足k约束的子串数量 I(滑动窗口 Java)