I feel that the challenge in lesson “Component vs Inheritance” of Glitch Garden is difficult to accomplish in the intended way.
We would just by chance get to the expected solution.
There are a few things we have not explored in detail:
- as having two scripts for the same object.
- also, we have to remove code from the Attacker.Start method and have the RigidBody2D added to each object.
All these don’t contribute to make the challenge appealing.
I would suggest showing in the video how to implement the behavior of the Fox; then challenge the student to implement the Lizard (which is simpler).
Let me know in the comments if you feel the same, or the contrary.
I don’t think it’s bad to have some challenges that are on the more difficult end. It’s also not bad if your solution isn’t identical to Ben’s (the rigidbody thing in particular is just an organizational change and doesn’t actually affect the challenge). The most important thing is that you make an attempt to solve the challenge yourself so that you can build your critical thinking skills and practice using the things you’ve been taught to solve problems. If you come up with a solution that’s less than ideal, that’s fine. You can fix and improve it as you watch Ben’s solution if you like what he did better. If you’re not able to complete the challenge on your own, that’s also fine. The things you learn from the solution will be much more meaningful and sink in better if you’ve wrestled with the problem for a bit.