小编Ved*_*kar的帖子

“!= true”和“ == false”之间的区别?

在编程语言中,比较“!= true”和“ == false”之间在技术/逻辑上是否存在差异,如果存在,应在什么情况下选择哪种比较?

logic operators logical-operators

4
推荐指数
1
解决办法
3755
查看次数

如何获得粒子系统之一?

我有一个敌人预制件(ZomBunny),它们是两个部分系统,当敌人被击中和敌人死亡时播放。我面临的问题是,我只能访问一个粒子系统(HitParticle ) 使用下面的代码时。

等级制度

在此处输入图片说明

敌人健康

public class EnemyHealth : MonoBehaviour
{
    public int startingHealth = 100;          // The amount of health the enemy starts the game with.
    public int currentHealth;                    // The current health the enemy has.
    public float sinkSpeed = 2.5f;           // The speed at which the enemy sinks through the floor when dead.
    public int scoreValue = 10;               // The amount added to the player's score when the enemy dies.
    public AudioClip deathClip;              // The sound to play …
Run Code Online (Sandbox Code Playgroud)

c# unity-game-engine particle-system

2
推荐指数
1
解决办法
5757
查看次数