ME FIRST GAMES
Menu

games for me and you

What is "if else"

9/4/2020

0 Comments

 
Picture
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.

    Picture
    Me First Games is an independent game studio dedicated to creating unique and bizarre video games.
    GAMES HERE

    Red Matter

    Star Impact is an upcoming adventure platformer coming to PC, Mac, and Linux.

    Archives

    April 2021
    February 2021
    December 2020
    November 2020
    October 2020
    September 2020
    August 2020
    July 2020
    June 2020
    May 2020
    April 2019
    March 2019
    December 2018
    April 2018

    Categories

    All

    RSS Feed

Copyright (c) 2020 Me First LLC
  • STU the First AI
  • Blog
  • Contact
  • Unity Tools
    • Hierarchy Comments
  • STU the First AI
  • Blog
  • Contact
  • Unity Tools
    • Hierarchy Comments