updated scene manager for week 2
This commit is contained in:
1 parent
0eb54aac54
commit
cbd41bb063
15 files changed
+50
-48
No files matched your search
@@ -41,11 +41,8 @@ func _physics_process(delta):
|
||||
#make a bullet
|
||||
var myBullet = bullet.instantiate()
|
||||
#set bullet speed?
|
||||
|
||||
#put the bullet at the Marker
|
||||
owner.add_child(myBullet)
|
||||
myBullet.transform = marker_right.global_transform
|
||||
pass
|
||||
%SceneManager.manageBullet(myBullet)
|
||||
# Get the input direction and handle the movement/deceleration.
|
||||
# As good practice, you should replace UI actions with custom gameplay actions.
|
||||
var direction = Input.get_axis("ui_left", "ui_right")
|
||||
|
||||
+6
-5
@@ -1,6 +1,6 @@
|
||||
extends Node2D
|
||||
|
||||
extends Node
|
||||
|
||||
var bulletsFiredTotal := 0
|
||||
# Called when the node enters the scene tree for the first time.
|
||||
func _ready():
|
||||
pass # Replace with function body.
|
||||
@@ -10,6 +10,7 @@ func _ready():
|
||||
func _process(delta):
|
||||
pass
|
||||
|
||||
|
||||
func _on_area_2d_areatrigger(effect, Object):
|
||||
print("Game Controller sees the trigger")
|
||||
func manageBullet(bullet):
|
||||
bulletsFiredTotal +=1
|
||||
owner.add_child(bullet)
|
||||
print("Total bullets fired "+str(bulletsFiredTotal))
|
||||
Reference in new issue
Block a user