Trying to rework cannon, gatling, launcher
This commit is contained in:
@@ -31,6 +31,7 @@ signal destroyed
|
||||
@export_range(0, 250) var max_speed : int = 0
|
||||
@export_range(0, 1000) var mass : int = 0
|
||||
|
||||
@export_range(0, 360) var weapon_rotation : int = 0
|
||||
@export var weapon_positions: Array[Vector2]
|
||||
|
||||
|
||||
@@ -41,6 +42,7 @@ func _ready() -> void:
|
||||
for pos in weapon_positions:
|
||||
var weapon : AbstractWeapon = WEAPONS.pick_random().instantiate()
|
||||
weapon.position = pos
|
||||
weapon.rotation = deg_to_rad(weapon_rotation)
|
||||
add_child(weapon)
|
||||
_weapons.append(weapon)
|
||||
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
collision_layer = 4
|
||||
collision_mask = 2
|
||||
script = ExtResource("2_fwvrd")
|
||||
weapon_rotation = 180
|
||||
|
||||
[node name="EnemyController" parent="." index="4" node_paths=PackedStringArray("ship") instance=ExtResource("3_l8c0n")]
|
||||
ship = NodePath("..")
|
||||
|
||||
@@ -3,9 +3,7 @@
|
||||
[ext_resource type="PackedScene" uid="uid://jvyagshykmgb" path="res://game/entities/ships/abstract_ship.tscn" id="1_6otxb"]
|
||||
[ext_resource type="Script" uid="uid://ruxw1n03iq4i" path="res://game/entities/ships/player/player_ship.gd" id="2_625ti"]
|
||||
[ext_resource type="PackedScene" uid="uid://dh1oj1w5wx4je" path="res://game/controllers/player_controller.tscn" id="3_4mjo1"]
|
||||
|
||||
[sub_resource type="PlaceholderTexture2D" id="PlaceholderTexture2D_dj8f1"]
|
||||
size = Vector2(48, 32)
|
||||
[ext_resource type="Texture2D" uid="uid://y2yfli24n51v" path="res://images/ships/player.png" id="3_uf2n1"]
|
||||
|
||||
[sub_resource type="CapsuleShape2D" id="CapsuleShape2D_dj8f1"]
|
||||
radius = 15.0
|
||||
@@ -19,10 +17,10 @@ acceleration = 92
|
||||
deceleration = 46
|
||||
max_speed = 92
|
||||
mass = 250
|
||||
weapon_positions = Array[Vector2]([Vector2(0, 8), Vector2(0, -8)])
|
||||
weapon_positions = Array[Vector2]([Vector2(-2, 18), Vector2(-2, -18)])
|
||||
|
||||
[node name="Sprite2D" parent="." index="0"]
|
||||
texture = SubResource("PlaceholderTexture2D_dj8f1")
|
||||
texture = ExtResource("3_uf2n1")
|
||||
|
||||
[node name="CollisionShape2D" parent="." index="1"]
|
||||
rotation = 1.5707964
|
||||
|
||||
Reference in New Issue
Block a user