Programming Intro + Collisions
Scene Manager + Collecting Items
![](https://openlab.bmcc.cuny.edu/mmp-270-spring-2022/wp-content/uploads/sites/2128/2022/05/Tilemap-1.png)
Designing with Tilemaps
MMP 270: Introduction to Video Game Design
BMCC Spring 2022
Programming Intro + Collisions
Scene Manager + Collecting Items
Designing with Tilemaps
Some bugs and a few missing things but it’s mostly there.
These are my rewards spread sheets, the first one is called “deviled egg” which is an collectable item in the game, it is animated to look like its eaten. the second one is the heart that gives the character lives.
Collecting items and scene manager:
I created ItemManager.gd script, added SceneManager.gd script, and updated the PlayerController.gd script.
There are three items that could be collected in the scene. The system would count how many items the main character has collected when collecting a new one.
Here is the demonstration:
This shows my character collecting items.
extends Area2D
export var item_type = 'apple'
signal item_collected
var item_is_collected = false
func _on_Item_body_entered(body):
if not item_is_collected:
emit_signal("item_collected", item_type)
item_is_collected = true
$AnimatedSprite.play("Collected")
func _on_AnimatedSprite_animation_finished():
if item_is_collected:
queue_free()