Add bullets #4
Labels
No Label
bug
duplicate
enhancement
help wanted
invalid
question
wontfix
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: OddlyTimbot/AprilGameExample#4
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Give the player the ability to shoot bullets. This will involve making a Bullet that extends Area2D.
Bullets will be made in the SceneManager, which will use an object pool to control the total number of bullets.
First the bullet code:
In the SceneManager, an array will be used to control and recycle bullets.
var bullet = preload("res://scenes/bullet.tscn")And then:
Create a function that can be called by the player, that requests the SceneManager to create a bullet and put it in the world.
Now from the Player, the bullet can be requested. In the
handleInputmethod: