Removed prints and added projectile collision
This commit is contained in:
parent
a1f807687a
commit
f6b0bfb720
|
@ -7,6 +7,8 @@
|
||||||
radius = 5.0
|
radius = 5.0
|
||||||
|
|
||||||
[node name="EcoProjectile" type="KinematicBody2D"]
|
[node name="EcoProjectile" type="KinematicBody2D"]
|
||||||
|
collision_layer = 8
|
||||||
|
collision_mask = 2
|
||||||
script = ExtResource( 2 )
|
script = ExtResource( 2 )
|
||||||
|
|
||||||
[node name="Sprite" type="Sprite" parent="."]
|
[node name="Sprite" type="Sprite" parent="."]
|
||||||
|
|
|
@ -7,6 +7,8 @@
|
||||||
radius = 6.0
|
radius = 6.0
|
||||||
|
|
||||||
[node name="ExplosiveProjectile" type="KinematicBody2D"]
|
[node name="ExplosiveProjectile" type="KinematicBody2D"]
|
||||||
|
collision_layer = 8
|
||||||
|
collision_mask = 6
|
||||||
script = ExtResource( 2 )
|
script = ExtResource( 2 )
|
||||||
|
|
||||||
[node name="Sprite" type="Sprite" parent="."]
|
[node name="Sprite" type="Sprite" parent="."]
|
||||||
|
|
|
@ -8,6 +8,8 @@ radius = 5.0
|
||||||
height = 2.0
|
height = 2.0
|
||||||
|
|
||||||
[node name="PhantomProjectile" type="KinematicBody2D"]
|
[node name="PhantomProjectile" type="KinematicBody2D"]
|
||||||
|
collision_layer = 8
|
||||||
|
collision_mask = 6
|
||||||
script = ExtResource( 2 )
|
script = ExtResource( 2 )
|
||||||
|
|
||||||
[node name="Sprite" type="Sprite" parent="."]
|
[node name="Sprite" type="Sprite" parent="."]
|
||||||
|
|
|
@ -8,6 +8,8 @@ radius = 4.0
|
||||||
height = 4.0
|
height = 4.0
|
||||||
|
|
||||||
[node name="WaveProjectile" type="KinematicBody2D"]
|
[node name="WaveProjectile" type="KinematicBody2D"]
|
||||||
|
collision_layer = 8
|
||||||
|
collision_mask = 6
|
||||||
script = ExtResource( 2 )
|
script = ExtResource( 2 )
|
||||||
|
|
||||||
[node name="Sprite" type="Sprite" parent="."]
|
[node name="Sprite" type="Sprite" parent="."]
|
||||||
|
|
|
@ -3,7 +3,6 @@ class_name Wands
|
||||||
|
|
||||||
func fire(projectile, effect):
|
func fire(projectile, effect):
|
||||||
if $ShootDelay.is_stopped() and projectile != null:
|
if $ShootDelay.is_stopped() and projectile != null:
|
||||||
print("fire")
|
|
||||||
var temp = projectile.instance()
|
var temp = projectile.instance()
|
||||||
get_tree().current_scene.add_child(temp)
|
get_tree().current_scene.add_child(temp)
|
||||||
temp.global_transform = $ProjectileSpawn.global_transform
|
temp.global_transform = $ProjectileSpawn.global_transform
|
||||||
|
|
|
@ -33,7 +33,6 @@ onready var Effect4 = $Inventory/Effects/Effect4
|
||||||
func _process(delta):
|
func _process(delta):
|
||||||
if Input.is_action_just_pressed("inventory"):
|
if Input.is_action_just_pressed("inventory"):
|
||||||
set_open(!open)
|
set_open(!open)
|
||||||
print(active_conduit)
|
|
||||||
|
|
||||||
func set_open(new):
|
func set_open(new):
|
||||||
if open != new:
|
if open != new:
|
||||||
|
|
Loading…
Reference in a new issue