Skip to content

Commit

Permalink
brute enemies
Browse files Browse the repository at this point in the history
  • Loading branch information
ricargoes committed Feb 18, 2024
1 parent 49d1b07 commit d4199d0
Show file tree
Hide file tree
Showing 4 changed files with 63 additions and 12 deletions.
45 changes: 45 additions & 0 deletions scenes/enemies/brute_enemy.tscn
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
[gd_scene load_steps=7 format=3 uid="uid://3rhsqxis8lrs"]

[ext_resource type="PackedScene" uid="uid://cta648uegc2p3" path="res://scenes/enemies/enemy_biker.tscn" id="1_pq3pv"]
[ext_resource type="Texture2D" uid="uid://d1khjsddqapn8" path="res://resources/sprites/enemies/bruto1.png" id="2_afu03"]
[ext_resource type="Texture2D" uid="uid://cl6ky83ponnce" path="res://resources/sprites/enemies/bruto2.png" id="3_ml28s"]

[sub_resource type="SpriteFrames" id="SpriteFrames_ow1ff"]
animations = [{
"frames": [{
"duration": 1.0,
"texture": ExtResource("2_afu03")
}, {
"duration": 1.0,
"texture": ExtResource("3_ml28s")
}],
"loop": true,
"name": &"default",
"speed": 5.0
}]

[sub_resource type="RectangleShape2D" id="RectangleShape2D_5vd0p"]
size = Vector2(116, 217.5)

[sub_resource type="CapsuleShape2D" id="CapsuleShape2D_83xob"]
radius = 103.0
height = 234.0

[node name="BruteEnemy" instance=ExtResource("1_pq3pv")]
speed = 300.0
resource_type = 4
xp_value = 500
max_life_points = 50.0
contact_dps = 50.0

[node name="Sprite2D" parent="." index="0"]
sprite_frames = SubResource("SpriteFrames_ow1ff")
flip_h = true

[node name="CollisionShape2D" parent="." index="1"]
position = Vector2(6, 6.25)
shape = SubResource("RectangleShape2D_5vd0p")

[node name="CollisionShape2D" parent="ContactDamageArea" index="0"]
position = Vector2(-2, 6)
shape = SubResource("CapsuleShape2D_83xob")
19 changes: 10 additions & 9 deletions scenes/enemies/enemy_biker.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -19,26 +19,27 @@ animations = [{
"speed": 10.0
}]

[sub_resource type="RectangleShape2D" id="RectangleShape2D_jy52n"]
size = Vector2(215, 197.75)
[sub_resource type="RectangleShape2D" id="RectangleShape2D_v7atp"]
size = Vector2(132, 212.25)

[sub_resource type="CapsuleShape2D" id="CapsuleShape2D_n4qfx"]
radius = 58.0
height = 228.0
[sub_resource type="CapsuleShape2D" id="CapsuleShape2D_8ijjl"]
radius = 55.0
height = 212.0

[node name="EnemyBiker" instance=ExtResource("1_qhg13")]
script = ExtResource("2_ssoir")
speed = 800.0
resource_type = 3
contact_dps = 10.0

[node name="Sprite2D" parent="." index="0"]
sprite_frames = SubResource("SpriteFrames_iwebx")
autoplay = "default"

[node name="CollisionShape2D" parent="." index="1"]
position = Vector2(-6, 34.875)
shape = SubResource("RectangleShape2D_jy52n")
position = Vector2(10, 27.875)
shape = SubResource("RectangleShape2D_v7atp")

[node name="CollisionShape2D" parent="ContactDamageArea" index="0"]
position = Vector2(16, 4)
shape = SubResource("CapsuleShape2D_n4qfx")
position = Vector2(19, 28)
shape = SubResource("CapsuleShape2D_8ijjl")
5 changes: 3 additions & 2 deletions scenes/global/pool_manager.gd
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,14 @@ enum PoolResource {
BASIC_ENEMY,
FLYING_ENEMY,
BIKER_ENEMY,
BRUTE_ENEMY,
}

const resources_scenes = {
PoolResource.BULLET: preload("res://scenes/bullet.tscn"),
PoolResource.BASIC_ENEMY: preload("res://scenes/enemies/enermy.tscn"),
PoolResource.BASIC_ENEMY: preload("res://scenes/enemies/basic_enemy.tscn"),
PoolResource.FLYING_ENEMY: preload("res://scenes/enemies/flying_enemy.tscn"),
PoolResource.BIKER_ENEMY: preload("res://scenes/enemies/enemy_biker.tscn"),
PoolResource.BRUTE_ENEMY: preload("res://scenes/enemies/brute_enemy.tscn"),
}

var pool: Dictionary = {}
Expand Down
6 changes: 5 additions & 1 deletion scenes/terrain/terrain_chunk_1.tscn
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
[gd_scene load_steps=13 format=3 uid="uid://dfg2gs8kx1te8"]
[gd_scene load_steps=14 format=3 uid="uid://dfg2gs8kx1te8"]

[ext_resource type="PackedScene" uid="uid://ccld1bpjx1tau" path="res://scenes/terrain/terrain_chunk_base.tscn" id="1_vs7ef"]
[ext_resource type="PackedScene" uid="uid://bqlyqc1ygoqus" path="res://scenes/enemies/spawner.tscn" id="3_eakqu"]
[ext_resource type="PackedScene" uid="uid://cv5x51jwgqxsq" path="res://scenes/enemies/basic_enemy.tscn" id="3_fab3p"]
[ext_resource type="PackedScene" uid="uid://bu35il1yoex0l" path="res://scenes/activador.tscn" id="4_jtunb"]
[ext_resource type="PackedScene" uid="uid://cta648uegc2p3" path="res://scenes/enemies/enemy_biker.tscn" id="4_l4pkk"]
[ext_resource type="PackedScene" uid="uid://3rhsqxis8lrs" path="res://scenes/enemies/brute_enemy.tscn" id="5_51bqx"]

[sub_resource type="RectangleShape2D" id="RectangleShape2D_8syfu"]
size = Vector2(1791, 391)
Expand Down Expand Up @@ -64,6 +65,9 @@ position = Vector2(301, 547)
[node name="EnemyBiker3" parent="Enemies" index="9" instance=ExtResource("4_l4pkk")]
position = Vector2(64, 543)

[node name="BruteEnemy" parent="Enemies" index="10" instance=ExtResource("5_51bqx")]
position = Vector2(3711, 753)

[node name="Dest1" type="Marker2D" parent="Helpers" index="0"]
position = Vector2(3594, 795)

Expand Down

0 comments on commit d4199d0

Please sign in to comment.