diff --git a/src/models/enemies/rat/rat.gd b/src/models/enemies/rat/rat.gd index 1e2ba26..57c7e67 100644 --- a/src/models/enemies/rat/rat.gd +++ b/src/models/enemies/rat/rat.gd @@ -4,6 +4,8 @@ var velocity = Vector2.ZERO var speed = 24 func _ready(): + randomize() + global_position = [Vector2(33, 50), Vector2(287, 70)][randi()%2] hp = 15 func _physics_process(delta): diff --git a/src/scenes/game/Game.tscn b/src/scenes/game/Game.tscn index 220d1d4..7ef2729 100644 --- a/src/scenes/game/Game.tscn +++ b/src/scenes/game/Game.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=17 format=2] +[gd_scene load_steps=19 format=2] [ext_resource path="res://src/scenes/menu/background/background.png" type="Texture" id=1] [ext_resource path="res://src/scenes/game/sprites/background_houses.png" type="Texture" id=2] @@ -12,6 +12,8 @@ [ext_resource path="res://src/scenes/game/sprites/player_icon.png" type="Texture" id=10] [ext_resource path="res://src/scenes/game/game.gd" type="Script" id=11] [ext_resource path="res://src/scenes/game/sprites/ui_background.png" type="Texture" id=12] +[ext_resource path="res://src/scenes/game/sprites/hatch1.png" type="Texture" id=13] +[ext_resource path="res://src/scenes/game/sprites/hatch2.png" type="Texture" id=14] [ext_resource path="res://src/scenes/game/spell_recharge_bar.gd" type="Script" id=16] [sub_resource type="RectangleShape2D" id=2] @@ -65,6 +67,16 @@ shape = SubResource( 3 ) position = Vector2( 160, 109.875 ) shape = SubResource( 3 ) +[node name="Hatches" type="Node2D" parent="View/Background"] + +[node name="Hatch1" type="Sprite" parent="View/Background/Hatches"] +position = Vector2( 287, 70 ) +texture = ExtResource( 13 ) + +[node name="Hatch2" type="Sprite" parent="View/Background/Hatches"] +position = Vector2( 33, 50 ) +texture = ExtResource( 14 ) + [node name="Player" parent="View" instance=ExtResource( 5 )] position = Vector2( 46, 42 ) z_index = 1 diff --git a/src/scenes/game/sprites/hatch1.png b/src/scenes/game/sprites/hatch1.png new file mode 100644 index 0000000..2275d23 Binary files /dev/null and b/src/scenes/game/sprites/hatch1.png differ diff --git a/src/scenes/game/sprites/hatch1.png.import b/src/scenes/game/sprites/hatch1.png.import new file mode 100644 index 0000000..c4b225d --- /dev/null +++ b/src/scenes/game/sprites/hatch1.png.import @@ -0,0 +1,35 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/hatch1.png-957f4e1b687f33a1dbbcdbd7d99944dd.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://src/scenes/game/sprites/hatch1.png" +dest_files=[ "res://.import/hatch1.png-957f4e1b687f33a1dbbcdbd7d99944dd.stex" ] + +[params] + +compress/mode=0 +compress/lossy_quality=0.7 +compress/hdr_mode=0 +compress/bptc_ldr=0 +compress/normal_map=0 +flags/repeat=0 +flags/filter=false +flags/mipmaps=false +flags/anisotropic=false +flags/srgb=2 +process/fix_alpha_border=true +process/premult_alpha=false +process/HDR_as_SRGB=false +process/invert_color=false +process/normal_map_invert_y=false +stream=false +size_limit=0 +detect_3d=false +svg/scale=1.0 diff --git a/src/scenes/game/sprites/hatch2.png b/src/scenes/game/sprites/hatch2.png new file mode 100644 index 0000000..30df16f Binary files /dev/null and b/src/scenes/game/sprites/hatch2.png differ diff --git a/src/scenes/game/sprites/hatch2.png.import b/src/scenes/game/sprites/hatch2.png.import new file mode 100644 index 0000000..dffaed8 --- /dev/null +++ b/src/scenes/game/sprites/hatch2.png.import @@ -0,0 +1,35 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/hatch2.png-bc69695aedcadc7dd6f9b26c59de8255.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://src/scenes/game/sprites/hatch2.png" +dest_files=[ "res://.import/hatch2.png-bc69695aedcadc7dd6f9b26c59de8255.stex" ] + +[params] + +compress/mode=0 +compress/lossy_quality=0.7 +compress/hdr_mode=0 +compress/bptc_ldr=0 +compress/normal_map=0 +flags/repeat=0 +flags/filter=false +flags/mipmaps=false +flags/anisotropic=false +flags/srgb=2 +process/fix_alpha_border=true +process/premult_alpha=false +process/HDR_as_SRGB=false +process/invert_color=false +process/normal_map_invert_y=false +stream=false +size_limit=0 +detect_3d=false +svg/scale=1.0