User Details
- User Since
- Jul 7 2019, 10:52 PM (278 w, 6 d)
Jul 2 2024
In C#, one would use the is, or, and operators with braces which the compiler lowers into comparison checks.
example for C#:
csharp if (damageContext.damageType is EDamageType.COLLISION or EDamageType.FIRE or EDamageType.REGENERATION) return;
Note in the lowering process on the right side, the compiler attempts to use any possible optimisation to skip unnecessary checks. In this case it does a bounds check since two of the enum options were adjacent.
https://sharplab.io/#v2:EYLgxg9gTgpgtADwGwBYA+ABATARgLABQGAzAATakDCpA3oaQ+WRiqQLIAUAlLfY/wBEAhgFshAcxiUIAOwAuMBHNIATURKmyFS0gF5SMmAHdutVeskAVAJ4AHGHtIBRYWKt2YAOkoB5ADJ+AJIAyoE+AHKkAL4A3Hz8DACWAGakHGpumvKKcp4ZGjb2pIkAzs6uBR7e/kGhEaTQ5RYwhV4AYoEASk4NUE2ZrZ7dAOJO4U6dAIKWYeFc8Qn8GADscQT8UYSbBIQUFZLS2Tp064wk/ZVF+e5FNKSScjGkJTCP0VuEhDAyAK4iFzcHCd+OEIk4ADQLXwBEKzSGnBgdbrw/htSYw8LDFGMEZjCbTOELSZsHzDACqwXhUSAA
Jan 7 2022
If addAction is not changed at the engine level, there are a few workarounds to achieve the desired effect.
If the user's action menu is closed, and then looks at a new object with an addAction (Or it appears on his body): The addAction window text will not fade.