Lesson 2: Creating Repeating Textures

This lesson corresponds with Segment 2: Creating Repeating Textures on our Lynda.com tutoriail.

Note to Students

Please remember that very little is gained by copying and pasting code. Please follow along with the tutorial and use the code below as a reference if you receive unexplainable errors when you try to play your game.

TiledBackground.cs

The code below corresponds with sub-section: “Resizing textures to fill the screen.”

AnimatedTexture.cs

The code below corresponds with sub-section: “Animating Repeating Background Textures.”

TiledBackground.cs

The code below corresponds with sub-section: “Emulating parallax scrolling with repeating textures.” Note: you should update your existing TiledBackground.cs script. DO NOT CREATE A NEW ONE. You only need to add/modify the highlighted portion.