implemented y-wing main cannon and effects.
This commit is contained in:
@@ -6,6 +6,7 @@ var Laser = preload("res://Scenes/PlayerLaser.tscn")
|
||||
var missile = preload("res://Scenes/missile.tscn")
|
||||
var missile_refil = preload("res://Scenes/missile_pickup.tscn")
|
||||
var enemy_laser = preload("res://Scenes/enemy_laser.tscn")
|
||||
var enemy_y_wing_main = preload("res://Scenes/y_wing_main_cannon_laser.tscn")
|
||||
|
||||
var enemy_y_wing_turret_laser = preload("res://Scenes/turret_laser.tscn")
|
||||
var enemy_y_wing_main_laser = null
|
||||
@@ -68,6 +69,11 @@ func firey_wingturret(location,firing_solution,target):
|
||||
add_child(l)
|
||||
#l.initialize(rotation,target)
|
||||
|
||||
func fire_y_wing_main(location):
|
||||
print("fired")
|
||||
var l = enemy_y_wing_main.instantiate()
|
||||
l.global_position = location
|
||||
add_child(l)
|
||||
|
||||
|
||||
|
||||
|
||||
30
Scenes/y_wing_main_cannon_laser.tscn
Normal file
30
Scenes/y_wing_main_cannon_laser.tscn
Normal file
@@ -0,0 +1,30 @@
|
||||
[gd_scene load_steps=5 format=3 uid="uid://bclbidx5k15o7"]
|
||||
|
||||
[ext_resource type="Script" path="res://Scripts/y_wing_main_cannon_laser.gd" id="1_2yenk"]
|
||||
[ext_resource type="Texture2D" uid="uid://qmnr2uqcocyi" path="res://Assets/y-wing_main_laser.png" id="1_jmsrt"]
|
||||
|
||||
[sub_resource type="CapsuleShape2D" id="CapsuleShape2D_iw7a3"]
|
||||
radius = 3.0
|
||||
height = 80.0
|
||||
|
||||
[sub_resource type="CapsuleShape2D" id="CapsuleShape2D_mtiwm"]
|
||||
radius = 3.0
|
||||
height = 80.0
|
||||
|
||||
[node name="y-wing-main-cannon" type="Area2D"]
|
||||
collision_layer = 16
|
||||
collision_mask = 3
|
||||
script = ExtResource("1_2yenk")
|
||||
|
||||
[node name="Sprite2D" type="Sprite2D" parent="."]
|
||||
texture = ExtResource("1_jmsrt")
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
|
||||
position = Vector2(-8, 4)
|
||||
shape = SubResource("CapsuleShape2D_iw7a3")
|
||||
|
||||
[node name="CollisionShape2D2" type="CollisionShape2D" parent="."]
|
||||
position = Vector2(7, 4)
|
||||
shape = SubResource("CapsuleShape2D_mtiwm")
|
||||
|
||||
[connection signal="area_entered" from="." to="." method="_on_area_entered"]
|
||||
Reference in New Issue
Block a user