Attempting to refactor the previously working self contained equidistent
code in the player.gd.
This commit is contained in:
parent
5d2efe9983
commit
d419635d7f
15 changed files with 153 additions and 46 deletions
|
|
@ -1,7 +1,6 @@
|
|||
[gd_scene format=3 uid="uid://coix5dqblmu7r"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://otm88638j7f8" path="res://scripts/player.gd" id="1_g2els"]
|
||||
[ext_resource type="PackedScene" uid="uid://ddpclu2vdy2ve" path="res://scenes/stock_weapon.tscn" id="2_dqkch"]
|
||||
[ext_resource type="Script" uid="uid://bqxrdf7mtx0ev" path="res://scripts/player_refactor.gd" id="1_qlg0r"]
|
||||
[ext_resource type="Texture2D" uid="uid://cq4we1m1yv22s" path="res://graphics/ship.png" id="2_qhqgy"]
|
||||
[ext_resource type="Texture2D" uid="uid://crmbupr3qg0j" path="res://graphics/muzzle_flash.png" id="4_dqkch"]
|
||||
[ext_resource type="Texture2D" uid="uid://b0iavxi8vaxtj" path="res://graphics/ship_thrusters.png" id="5_qlg0r"]
|
||||
|
|
@ -86,9 +85,7 @@ size = Vector2(24, 30)
|
|||
size = Vector2(6, 5.75)
|
||||
|
||||
[node name="Player" type="Area2D" unique_id=652131079]
|
||||
script = ExtResource("1_g2els")
|
||||
speed = 275
|
||||
weapon_current = ExtResource("2_dqkch")
|
||||
script = ExtResource("1_qlg0r")
|
||||
|
||||
[node name="Ship" type="Sprite2D" parent="." unique_id=1155866924]
|
||||
unique_name_in_owner = true
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
[gd_scene format=3 uid="uid://6wq3ynesnsha"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://dulfr27gg4evl" path="res://scripts/player_revision.gd" id="1_3ef36"]
|
||||
[ext_resource type="Script" uid="uid://dulfr27gg4evl" path="res://scripts/player_component.gd" id="1_3ef36"]
|
||||
[ext_resource type="PackedScene" uid="uid://ddpclu2vdy2ve" path="res://scenes/stock_weapon.tscn" id="2_l5qtw"]
|
||||
[ext_resource type="Texture2D" uid="uid://cq4we1m1yv22s" path="res://graphics/ship.png" id="3_63g5k"]
|
||||
[ext_resource type="Script" uid="uid://dss0dbwr71y6m" path="res://scripts/input_component.gd" id="4_14jeh"]
|
||||
|
|
|
|||
|
|
@ -1,24 +1,15 @@
|
|||
[gd_scene format=3 uid="uid://ddpclu2vdy2ve"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://d1rwqotmrag1r" path="res://scripts/stock_weapon.gd" id="1_hsma2"]
|
||||
[ext_resource type="Script" uid="uid://ccdohs4gduee5" path="res://scripts/player_shot.gd" id="2_mvdrj"]
|
||||
[ext_resource type="Resource" uid="uid://cels8t3hqjtsu" path="res://resources/player_weapons/shot_stock.tres" id="2_mvdrj"]
|
||||
[ext_resource type="Texture2D" uid="uid://ti1uy42vnnhw" path="res://graphics/shot.png" id="3_mvdrj"]
|
||||
|
||||
[sub_resource type="Resource" id="Resource_pax02"]
|
||||
script = ExtResource("2_mvdrj")
|
||||
shot_name = "Stock"
|
||||
damage = 3
|
||||
speed = -350
|
||||
projectiles = 1
|
||||
cooldown = 0.0
|
||||
metadata/_custom_type_script = "uid://ccdohs4gduee5"
|
||||
|
||||
[sub_resource type="RectangleShape2D" id="RectangleShape2D_mvdrj"]
|
||||
size = Vector2(6, 14)
|
||||
|
||||
[node name="StockWeapon" type="Area2D" unique_id=1832200900]
|
||||
script = ExtResource("1_hsma2")
|
||||
shot_data = SubResource("Resource_pax02")
|
||||
shot_data = ExtResource("2_mvdrj")
|
||||
|
||||
[node name="Sprite2D" type="Sprite2D" parent="." unique_id=2134507225]
|
||||
texture = ExtResource("3_mvdrj")
|
||||
|
|
|
|||
|
|
@ -1,15 +1,24 @@
|
|||
[gd_scene format=3 uid="uid://b2ltmeb14nc17"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://d1rwqotmrag1r" path="res://scripts/stock_weapon.gd" id="1_kx6bj"]
|
||||
[ext_resource type="Resource" uid="uid://cels8t3hqjtsu" path="res://resources/player_weapons/shot_stock.tres" id="2_hefae"]
|
||||
[ext_resource type="Script" uid="uid://ccdohs4gduee5" path="res://scripts/player_shot.gd" id="2_5286c"]
|
||||
[ext_resource type="Texture2D" uid="uid://ti1uy42vnnhw" path="res://graphics/shot.png" id="3_58qml"]
|
||||
|
||||
[sub_resource type="Resource" id="Resource_4ihvg"]
|
||||
script = ExtResource("2_5286c")
|
||||
shot_name = "Stock"
|
||||
speed = 350
|
||||
projectiles = 3
|
||||
projectile_spacing = 10.0
|
||||
cooldown = 0.0
|
||||
metadata/_custom_type_script = "uid://ccdohs4gduee5"
|
||||
|
||||
[sub_resource type="RectangleShape2D" id="RectangleShape2D_mvdrj"]
|
||||
size = Vector2(12, 8)
|
||||
|
||||
[node name="StockWeapon" type="Area2D" unique_id=1832200900]
|
||||
script = ExtResource("1_kx6bj")
|
||||
shot_data = ExtResource("2_hefae")
|
||||
shot_data = SubResource("Resource_4ihvg")
|
||||
|
||||
[node name="Sprite2D" type="Sprite2D" parent="." unique_id=2134507225]
|
||||
texture = ExtResource("3_58qml")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue