ME FIRST GAMES
Menu
games for me and you
The "if else" conditional statement allows you to change the flow of your program.
For game devs, "if else" is essential to implement the features of your game. 📌 You'll use the "if" statement to determine if the player is dead, jumping, swimming, attacking, and much more. 📌 You can put any conditional in your "if" statement as long as it evaluates to true or false. 📌 You can use the logical AND operator "&&" to return true if both sides are true. 📌 Use the Logical OR operator "||" to return if either side is true. 📌 The Logical NOT operator "!" may be used to reverse the outcome of an expression. 📌 It's possible to chain many expressions using these operators, but good practice is to define a method for large conditional statements. 📌 If you are a beginner and struggling to grasp the "if else" statement, then no sweat. 📌 "If else" is a basic construct, a building block used in all programs and games. 🚀 if ( YouHaveWillToLearn() ) // then the "if else" concept will soon click. ➡️ Follow @mefirstgames for more game dev tips. ➡️ Free Unity Tools: https://www.mefirstgames.com/hierarchy-comments.html
0 Comments
Leave a Reply. |
Me First Games is an independent game studio dedicated to creating unique and bizarre video games.
Red MatterStar Impact is an upcoming adventure platformer coming to PC, Mac, and Linux.
Archives
April 2021
Categories |
Copyright (c) 2020 Me First LLC
|