Digital FXtbook
Easy Contacts
  • Home
    • Free Software
    • The Author
    • Former Students Hall of Fame
    • A tribute....
  • Gaming
    • Board Game Game Design Document
    • Modeling >
      • Introduction: The Temple
      • Minecraft Steve
      • Minecraft Tools and Weapons
      • Roblox Character modeling
      • Sword of Light
      • Buzz Axe
      • Halo 1 Blood Gulch Base
      • Hammer
      • Sword
      • Character Modeling Big Daddy
      • Shield
      • The OM6G
      • Weapon
      • Character Modeling Legion the Geth
      • Character Modeling Geth Armor
    • Animation >
      • Character Animation
    • Rigging >
      • Rigging with HumanIK
      • Characterizing and MoCap
      • Integration with Unity
    • Unity >
      • Terrain
      • Importing Models
  • Coding
    • Beginning C# >
      • First Unit >
        • First Program
        • Comments >
          • PsuedoCode
        • Variable Types >
          • AlphaNumeric Variables
          • Numeric Variables
        • Getting input from the user
        • Try and Catch
        • Operators >
          • Assignment Operators >
            • Zeller's Congruence
            • Leap Year
          • Comparison Operators >
            • Logical Data, Illogical Assignment
          • Arithmetic Operators >
            • Use of Parenthesis
            • Algebra in code and assundry CHAOS
            • Pre and Post Operators
            • Shortcut Operators
            • Floats Conversion from Metric to English
            • When is Easter??
          • Logical Operators
        • Casting
      • Second Unit >
        • Conditional Statements >
          • Number validator
          • Number tester
          • Speed Camera
        • Random Class
        • Arrays >
          • Simple Arrays
          • Complex Arrays
        • Loops >
          • For Loops >
            • Adding Numbers
          • For Each Loops
          • While Loops
          • Do While Loops
      • Third Unit
    • Intermediate C# >
      • Object Oriented Programming
    • Unity Coding >
      • Introduction Unity Lesson
      • Number Wizard Game #1
      • Second Unity Game: Text Adventure
      • Number Wizard Game GUI
      • Block Breaker >
        • Block Breaker Game #1
        • Block Breaker Game #2
        • Block Breaker Game #3
        • Block Breaker Game #4
    • Linda Training >
      • What is C#?
      • Working with Classes
  • Student Films
    • Advanced Student's movies
    • Beginning Student's movies
  • Adobe
    • Photoshop >
      • Introduction
      • Selection Tools >
        • Melonhead >
          • Melonhead Creative
        • Breakfast Lunch or Dinner
        • Blu 42
      • Painting Tools >
        • Invisi-World
        • Image Adjustment
        • FreeStyle project
      • Drawing Tools >
        • Abstract Expressionism
    • Premier >
      • Linda Training Intro
      • Basic Editing
      • Editing Refinement
    • Illustrator >
      • Vector Ninjas
      • Live Art Painting
      • Starting the Pen Tool
      • Apple and Pear
      • Creating Your LOGO
      • Self Portrait
  • Com Apps
    • Com Apps page 1
    • Com Apps page 2
    • Com Apps page 3
    • Com Apps page 4
  • Links
    • Distance Reconnecting
    • Key Board Fix/Hack
    • Buiding Piers >
      • Buiding Piers
      • Buiding Piers
    • The Top Six Animation Schools
    • The Top Video Game Design Schools
    • Contests >
      • International Team

If - Else statements

All right.... This is definitely one of the lessons that i have been looking forward to. In this lesson we are going to learn how to work with the If - Else statement in code.

This statement is fundamental for the creation of code and being able to decipher between different pieces of information and use the information more intelligently. 

At the beginning of the statement is the word "If". this word sets up everything that we need to know about what the statement does. It basically asks is something true or not true. It is a classic yes or no question. If the statement is true then we will run a certain set of code. If it is not true then we will run a different set of code. 

The different set of code is run off of part of the statement called "else". The "else" is the piece that lets you run the other set of code. essentially saying that the first part of the statement was not true therefore run this area of code instead. 

Clear as mud???

Understanding this simplifies everything else that we need to know to run some programs and call upon higher functionality. 

Some basic rules to know when working with "If - Else" statements:
     1. Whatever is to be tested needs to be a true or false/yes or no question. Otherwise we will get a syntax error
     2. Whatever is to be tested must be put into parenthesis - example: if (value == 0)
     3. You do not need a ";" at the end of a if statement
     4. Whatever commands or statements that you want to run inside the "if" statement need to have a "{" at the beginning  and a "}" at the end.

Pre-Assignment Videos


The Assignment

We are going to go back to a previous lesson and finish it up as working code. In our Pseudo-Code lesson we worked on turning a scenario into Psuedo-Code for a program. In this lesson we are going to turn that Pseudo-Code into a working program. Please keep in mind that the program that you will build is the one in the assignment about Red and Blue seeds. We are not working on the Pseudo-Code for our friendly little plumber, although that would be fun as well. There is a small video that should help you get your Pseudo-Code properly prepared for this lesson and that is what follows....

Assignment Video

Proudly powered by Weebly