Skip to content

Commit e265218

Browse files
committed
Add different size cells, adjust stats, update art
1 parent 54995a3 commit e265218

15 files changed

Lines changed: 370 additions & 72 deletions

game/projectile/projectile.tscn

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
[gd_scene format=3 uid="uid://cnf8dv1t2lgxb"]
22

33
[ext_resource type="PackedScene" uid="uid://c1flcsvrxwav7" path="res://components/hitbox/component_hitbox_2d.tscn" id="1_4f6j3"]
4-
[ext_resource type="Texture2D" uid="uid://1ml5obg52a88" path="res://icon.svg" id="1_06jd3"]
54
[ext_resource type="Script" uid="uid://oghk0ir2n3ci" path="res://game/projectile/projectile.gd" id="1_08h31"]
5+
[ext_resource type="Texture2D" uid="uid://c75370j5g1r0b" path="res://game/projectile/projectile_data/projectiles/simple_bullet/simple_bullet.svg" id="2_08h31"]
66

7-
[sub_resource type="CapsuleShape2D" id="CapsuleShape2D_08h31"]
7+
[sub_resource type="CapsuleShape2D" id="CapsuleShape2D_cpvyg"]
88
resource_local_to_scene = true
99
radius = 5.0
1010
height = 10.0
@@ -13,13 +13,12 @@ height = 10.0
1313
script = ExtResource("1_08h31")
1414

1515
[node name="Sprite2D" type="Sprite2D" parent="." unique_id=698949931]
16-
scale = Vector2(0.078125, 0.078125)
17-
texture = ExtResource("1_06jd3")
16+
texture = ExtResource("2_08h31")
1817

1918
[node name="Hitbox2D" parent="." unique_id=1358559902 instance=ExtResource("1_4f6j3")]
2019
unique_name_in_owner = true
2120

2221
[node name="CollisionShape2D" parent="Hitbox2D" index="0" unique_id=1055038057]
23-
shape = SubResource("CapsuleShape2D_08h31")
22+
shape = SubResource("CapsuleShape2D_cpvyg")
2423

2524
[editable path="Hitbox2D"]

game/projectile/projectile_data/projectiles/simple_bullet/simple_bullet.svg

Lines changed: 35 additions & 28 deletions
Loading

game/projectile/projectile_data/projectiles/simple_bullet/simple_bullet.tscn

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,13 @@
22

33
[ext_resource type="PackedScene" uid="uid://cnf8dv1t2lgxb" path="res://game/projectile/projectile.tscn" id="1_l3gi0"]
44
[ext_resource type="Script" uid="uid://38prbnxyxqsu" path="res://game/projectile/projectile_data/projectiles/simple_bullet/simple_bullet.gd" id="2_17s52"]
5-
[ext_resource type="Texture2D" uid="uid://c75370j5g1r0b" path="res://game/projectile/projectile_data/projectiles/simple_bullet/simple_bullet.svg" id="3_t0llp"]
65

76
[sub_resource type="CircleShape2D" id="CircleShape2D_t0llp"]
8-
radius = 6.0
7+
radius = 8.062258
98

109
[node name="SimpleBullet" unique_id=865771493 instance=ExtResource("1_l3gi0")]
1110
script = ExtResource("2_17s52")
1211

13-
[node name="Sprite2D" parent="." index="0" unique_id=698949931]
14-
scale = Vector2(0.21874997, 0.21874997)
15-
texture = ExtResource("3_t0llp")
16-
1712
[node name="CollisionShape2D" parent="Hitbox2D" parent_id_path=PackedInt32Array(1358559902) index="0" unique_id=1055038057]
1813
shape = SubResource("CircleShape2D_t0llp")
1914

game/ship_skeleton/cell/cell.gd

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ extends Node2D
44
signal restored
55
signal destroyed
66

7-
# TODO. On core destroyed destroye owner too.
8-
@export var health: float
97
@export var core_parents: Array[Cell]
108
@export var core_children: Array[Cell]
119
@export var repair_rate: float
@@ -22,8 +20,6 @@ func _ready() -> void:
2220
hurtbox_2d.got_hit.connect(_on_hit)
2321
health_component.health_depleted.connect(_on_health_depleted)
2422

25-
health_component.set_health(health)
26-
2723
func _physics_process(delta: float) -> void:
2824
if is_destroyed:
2925
var can_restore := false
@@ -33,7 +29,7 @@ func _physics_process(delta: float) -> void:
3329

3430
if can_restore:
3531
health_component.current_health += repair_rate * delta
36-
if health_component.current_health >= health:
32+
if health_component.current_health >= health_component.max_health:
3733
restored.emit()
3834
_related_movemenet_collision_shape.disabled = false
3935
hurtbox_2d.monitorable = true

game/ship_skeleton/cell/cells/basic_cell/big_basic_cell.tscn

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,15 @@
33
[ext_resource type="PackedScene" uid="uid://cm6tq3xwihkxl" path="res://game/ship_skeleton/cell/cells/basic_cell/medium_basic_cell.tscn" id="1_654sg"]
44
[ext_resource type="Texture2D" uid="uid://dw8eyhjagpbgk" path="res://game/ship_skeleton/cell/cells/basic_cell/big_basic_cell.svg" id="2_2qipr"]
55

6-
[sub_resource type="CapsuleShape2D" id="CapsuleShape2D_2qipr"]
7-
resource_local_to_scene = true
8-
radius = 63.0
9-
height = 126.0
6+
[sub_resource type="CircleShape2D" id="CircleShape2D_2qipr"]
7+
radius = 36.013885
108

119
[node name="BigBasicCell" unique_id=1435320636 instance=ExtResource("1_654sg")]
1210

1311
[node name="Sprite2D" parent="." index="0" unique_id=1975990942]
1412
texture = ExtResource("2_2qipr")
1513

1614
[node name="CollisionShape2D" parent="Hurtbox2D" parent_id_path=PackedInt32Array(146611675) index="0" unique_id=2074960276]
17-
shape = SubResource("CapsuleShape2D_2qipr")
15+
shape = SubResource("CircleShape2D_2qipr")
1816

1917
[editable path="Hurtbox2D"]
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
[gd_scene format=3 uid="uid://c5jb1txbmf3ex"]
2+
3+
[ext_resource type="PackedScene" uid="uid://cm6tq3xwihkxl" path="res://game/ship_skeleton/cell/cells/basic_cell/medium_basic_cell.tscn" id="1_05sdy"]
4+
[ext_resource type="Texture2D" uid="uid://cqucs53afxryp" path="res://game/ship_skeleton/cell/cells/basic_cell/extra_large_basic_cell.svg" id="2_46aer"]
5+
6+
[sub_resource type="CircleShape2D" id="CircleShape2D_05sdy"]
7+
radius = 81.02469
8+
9+
[node name="ExtraLargeBasicCell" unique_id=1435320636 instance=ExtResource("1_05sdy")]
10+
11+
[node name="Sprite2D" parent="." index="0" unique_id=1975990942]
12+
texture = ExtResource("2_46aer")
13+
14+
[node name="CollisionShape2D" parent="Hurtbox2D" parent_id_path=PackedInt32Array(146611675) index="0" unique_id=2074960276]
15+
shape = SubResource("CircleShape2D_05sdy")
16+
17+
[node name="Health" parent="." index="2" unique_id=562956058]
18+
max_health = 25.0
19+
20+
[editable path="Hurtbox2D"]
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
[gd_scene format=3 uid="uid://g7r6jujgrh5a"]
2+
3+
[ext_resource type="PackedScene" uid="uid://cm6tq3xwihkxl" path="res://game/ship_skeleton/cell/cells/basic_cell/medium_basic_cell.tscn" id="1_sr7xj"]
4+
[ext_resource type="Texture2D" uid="uid://bbriutj3tbq66" path="res://game/ship_skeleton/cell/cells/basic_cell/large_basic_cell.svg" id="2_iy7jg"]
5+
6+
[sub_resource type="CircleShape2D" id="CircleShape2D_sr7xj"]
7+
radius = 53.037724
8+
9+
[node name="LargeBasicCell" unique_id=1435320636 instance=ExtResource("1_sr7xj")]
10+
11+
[node name="Sprite2D" parent="." index="0" unique_id=1975990942]
12+
texture = ExtResource("2_iy7jg")
13+
14+
[node name="CollisionShape2D" parent="Hurtbox2D" parent_id_path=PackedInt32Array(146611675) index="0" unique_id=2074960276]
15+
shape = SubResource("CircleShape2D_sr7xj")
16+
17+
[node name="Health" parent="." index="2" unique_id=562956058]
18+
max_health = 20.0
19+
20+
[editable path="Hurtbox2D"]

game/ship_skeleton/cell/cells/basic_cell/medium_basic_cell.tscn

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,15 @@
22

33
[ext_resource type="PackedScene" uid="uid://73o17dpehsvx" path="res://game/ship_skeleton/cell/cell.tscn" id="1_pff0w"]
44

5-
[sub_resource type="CapsuleShape2D" id="CapsuleShape2D_r4tuq"]
6-
resource_local_to_scene = true
7-
radius = 31.0
8-
height = 62.0
5+
[sub_resource type="CircleShape2D" id="CircleShape2D_r4tuq"]
6+
radius = 24.0
97

108
[node name="MediumBasicCell" unique_id=1435320636 instance=ExtResource("1_pff0w")]
119

1210
[node name="CollisionShape2D" parent="Hurtbox2D" parent_id_path=PackedInt32Array(146611675) index="0" unique_id=2074960276]
13-
shape = SubResource("CapsuleShape2D_r4tuq")
11+
shape = SubResource("CircleShape2D_r4tuq")
12+
13+
[node name="Health" parent="." index="2" unique_id=562956058]
14+
max_health = 10.0
1415

1516
[editable path="Hurtbox2D"]

game/ship_skeleton/cell/cells/basic_cell/small_basic_cell.tscn

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,17 @@
33
[ext_resource type="PackedScene" uid="uid://cm6tq3xwihkxl" path="res://game/ship_skeleton/cell/cells/basic_cell/medium_basic_cell.tscn" id="1_7kfy5"]
44
[ext_resource type="Texture2D" uid="uid://dc6s83443qvfc" path="res://game/ship_skeleton/cell/cells/basic_cell/small_basic_cell.svg" id="2_30epr"]
55

6-
[sub_resource type="CapsuleShape2D" id="CapsuleShape2D_7kfy5"]
7-
resource_local_to_scene = true
8-
radius = 13.0
9-
height = 26.0
6+
[sub_resource type="CircleShape2D" id="CircleShape2D_7kfy5"]
107

118
[node name="SmallBasicCell" unique_id=1435320636 instance=ExtResource("1_7kfy5")]
129

1310
[node name="Sprite2D" parent="." index="0" unique_id=1975990942]
1411
texture = ExtResource("2_30epr")
1512

1613
[node name="CollisionShape2D" parent="Hurtbox2D" parent_id_path=PackedInt32Array(146611675) index="0" unique_id=2074960276]
17-
shape = SubResource("CapsuleShape2D_7kfy5")
14+
shape = SubResource("CircleShape2D_7kfy5")
15+
16+
[node name="Health" parent="." index="2" unique_id=562956058]
17+
max_health = 5.0
1818

1919
[editable path="Hurtbox2D"]
Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,20 @@
11
[gd_scene format=3 uid="uid://dbr5ppouefhpn"]
22

33
[ext_resource type="Script" uid="uid://b8q0gvn2dj335" path="res://game/ship_skeleton/cell_modifications/base_player_turret.gd" id="1_oml5i"]
4-
[ext_resource type="Texture2D" uid="uid://1ml5obg52a88" path="res://icon.svg" id="2_jnh57"]
4+
[ext_resource type="Texture2D" uid="uid://xdbslkxgsr46" path="res://game/ship_skeleton/cell_modifications/turret_base.svg" id="2_oml5i"]
5+
[ext_resource type="Texture2D" uid="uid://dm3k0inaj22u3" path="res://game/ship_skeleton/cell_modifications/turret_cannon.svg" id="3_jnh57"]
56

67
[node name="BasePlayerTurret" type="Node2D" unique_id=192713686]
78
script = ExtResource("1_oml5i")
89

9-
[node name="Sprite2D" type="Sprite2D" parent="." unique_id=849960809]
10+
[node name="TurretBase" type="Sprite2D" parent="." unique_id=849960809]
1011
rotation = 1.5707964
11-
scale = Vector2(0.171875, 0.17187501)
12-
texture = ExtResource("2_jnh57")
12+
texture = ExtResource("2_oml5i")
1313

14-
[node name="Sprite2D2" type="Sprite2D" parent="." unique_id=669926242]
15-
position = Vector2(7, 0)
16-
scale = Vector2(0.109375, 0.03125)
17-
texture = ExtResource("2_jnh57")
14+
[node name="TurretCannon" type="Sprite2D" parent="." unique_id=669926242]
15+
position = Vector2(23, 0)
16+
texture = ExtResource("3_jnh57")
1817

1918
[node name="ShootingPos" type="Marker2D" parent="." unique_id=1957190253]
2019
unique_name_in_owner = true
21-
position = Vector2(15, 0)
20+
position = Vector2(35, 0)

0 commit comments

Comments
 (0)