Week3 Examples:  Here is the source code to the examples.

  1. Many Function Plots: (Last GTCSLib example)!
  2. Unity in 2D with basic control: set to look in the positive z-direction. (default 2D window)
  3. Movements within Game Window Bounds:
  4. Improved Enemy Behavior: All changes are in EnemyBehavior.cs
  5. Creation of Prefab (drag to Project/Asset from Hierarchy) + Many Enemies:
  6. Support for collision:
    1. Both colliding bodies: must have collider defined and enabled.
    2. To response to a collision: two attributes
      • isTriggered: flag on Collider2D must be on.
      • RigidBody2D: must be defined.
    3. You can choose for both bodies to response to collision, or just one.
    4. In our case: Hero shhots Eggs, Egg and Enemy collide, Eggs participate, Enemy responses.
  7. Changing Texture + GUI Text: