#4 | 20-07-24 | Object Destruction
Hello!
Todays task is object destruction, removing unnecessary game objects from the scene.
To destroy the unnecessary objects, I created a script and boundary game objects with colliders.
When a projectile or target collides with the boundary game objects, it is destroyed. To achieve this, I used a function called OnCollisionEnter2D. When an object with a 2D collider collides with another object with the same collider, this function is called.
Having boundary game objects and a separate script to handle collision and destroying unnecessary objects allows me to leave the projectile and target movement scripts as minimal as possible.
With object destruction finished, the next tasks are creating the score counter and a time limit.
Thanks for reading!
Get Hit That Target!
Hit That Target!
Top down 2D target shooter!
Status | Released |
Author | Ice Diamond Studio |
More posts
- #21 | 11-08-24 | PostmortemAug 12, 2024
- #20 | 11-08-24 | Project EndAug 12, 2024
- #19 | 11-08-24 | Planner & GDDAug 12, 2024
- #18 | 06-08-24 | Beta BuildAug 06, 2024
- #17 | 06-08-24 | Improved GraphicsAug 06, 2024
- #16 | 05-08-24 | Extra ScenesAug 05, 2024
- #15 | 05-08-24 | Multiple TargetsAug 05, 2024
- #14 | 31-07-24 | High ScoreAug 01, 2024
- #13 | 29-07-24 | Planner & GDDJul 30, 2024
- #12 | 28-07-24 | Alpha BuildJul 28, 2024
Leave a comment
Log in with itch.io to leave a comment.