Video Thumbnail

Sign up for a plan to instantly unlock all premium lessons.

UNLOCK LESSON

Premium Features

Download Video

Shooting Projectiles

Published 2 years ago

To shoot projectiles, we must create a class in which we can edit derived objects' velocities. By setting velocities to exact values determined via trigonometric equations, we can move these projectiles precisely so that they always follow whichever enemy they're assigned to.

Once we have projectiles moving, we'll learn how to restrict their production, only shooting if an enemy is within range of a building.

  • 0:00 Create projectile class

  • 4:15 Render projectiles

  • 8:25 Move projectiles towards enemies

  • 13:48 Remove projectile on enemy hit

  • 23:09 Refactor for loop

  • 26:28 Speed up projectiles

  • 27:13 Only shoot projectiles if within range of buildings

  • 33:44 Shoot projectiles continuously

Comments

Want to participate?

Create a free Chris Courses account to begin

Login

No comments yet, be the first to add one

Providing the lift to launch your development career

© 2024 Chris Courses. All rights reserved.