在编程语言中,比较“!= true”和“ == false”之间在技术/逻辑上是否存在差异,如果存在,应在什么情况下选择哪种比较?
我有一个敌人预制件(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)