噩梦 游戏结束 检测血量执行动画
来源:互联网 发布:我想买一个一心淘宝号 编辑:程序博客网 时间:2024/04/29 22:18
using UnityEngine;
namespace CompleteProject
{
public class GameOverManager : MonoBehaviour
{
public PlayerHealth playerHealth; // Reference to the player's health.
Animator anim; // Reference to the animator component.
void Awake ()
{
// Set up the reference.
anim = GetComponent <Animator> ();
}
void Update ()
{
// If the player has run out of health...
if(playerHealth.currentHealth <= 0)
{
// ... tell the animator the game is over.
anim.SetTrigger ("GameOver");
}
}
}
}
namespace CompleteProject
{
public class GameOverManager : MonoBehaviour
{
public PlayerHealth playerHealth; // Reference to the player's health.
Animator anim; // Reference to the animator component.
void Awake ()
{
// Set up the reference.
anim = GetComponent <Animator> ();
}
void Update ()
{
// If the player has run out of health...
if(playerHealth.currentHealth <= 0)
{
// ... tell the animator the game is over.
anim.SetTrigger ("GameOver");
}
}
}
}
0 0
- 噩梦 游戏结束 检测血量执行动画
- 噩梦5 敌人血量
- 噩梦射手5 角色血量 死亡 重新加载
- 游戏,美梦?噩梦?
- 动画结束时执行某个动作
- jquery结束动画执行其他动作
- iOS 动画执行完停在结束位置
- 当一个动画结束之后继续执行下一个动画
- 利用CCProgressTimer 实现自定义游戏血量条
- [案例研究]—superJumper 6.碰撞检测与游戏结束
- CSS3动画、过渡结束后触发执行的事件
- 设置动画执行结束之后不移除
- 主角受伤处理:动画Animator & 血量减少的显示
- 噩梦
- 噩梦
- 噩梦
- 噩梦
- 噩梦
- Java学习之路0727(十一)(正则表达式、线程)
- IOS-动画Animation
- 黑马程序员---函数的相关知识
- HTML5表格的介绍与使用
- 黑马程序员——自学总结(七)图形用户界面GUI
- 噩梦 游戏结束 检测血量执行动画
- web地址的写法
- Hadoop 的集群安装
- uboot 学习笔记 stage 2
- Udev,在vsphere虚拟机上更改ip mac 网关
- How to set up and test a simple OLEDB Linked Server in Microsoft® SQL Server to allow retrieval of d
- ios学习笔记-(oc基础-面向对象小系统)
- HDOJ 题目4123 Bob’s Race(树的直径+RMQ优化)
- Android ScrollView下拉图片变大