#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 | Postmortem50 days ago
- #20 | 11-08-24 | Project End50 days ago
- #19 | 11-08-24 | Planner & GDD51 days ago
- #18 | 06-08-24 | Beta Build56 days ago
- #17 | 06-08-24 | Improved Graphics56 days ago
- #16 | 05-08-24 | Extra Scenes57 days ago
- #15 | 05-08-24 | Multiple Targets57 days ago
- #14 | 31-07-24 | High Score61 days ago
- #13 | 29-07-24 | Planner & GDD63 days ago
- #12 | 28-07-24 | Alpha Build65 days ago
Leave a comment
Log in with itch.io to leave a comment.