diff --git a/graphics/enemy/boss/famira-wip.png b/graphics/enemy/boss/famira-wip.png new file mode 100644 index 0000000..025c5a3 Binary files /dev/null and b/graphics/enemy/boss/famira-wip.png differ diff --git a/graphics/enemy/boss/famira-wip.png.import b/graphics/enemy/boss/famira-wip.png.import new file mode 100644 index 0000000..7b6343a --- /dev/null +++ b/graphics/enemy/boss/famira-wip.png.import @@ -0,0 +1,35 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/famira-wip.png-724a50fc63b1b570cfdaa11733d1f42e.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://graphics/enemy/boss/famira-wip.png" +dest_files=[ "res://.import/famira-wip.png-724a50fc63b1b570cfdaa11733d1f42e.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=true +svg/scale=1.0 diff --git a/maps/boss/boss3_arena.gd b/maps/boss/boss3_arena.gd new file mode 100644 index 0000000..b8477a4 --- /dev/null +++ b/maps/boss/boss3_arena.gd @@ -0,0 +1,3 @@ +extends "res://maps/map.gd" + + diff --git a/maps/boss/boss3_arena.tscn b/maps/boss/boss3_arena.tscn index 1f7ad9a..78ac9b5 100644 --- a/maps/boss/boss3_arena.tscn +++ b/maps/boss/boss3_arena.tscn @@ -1,76 +1,27 @@ -[gd_scene load_steps=10 format=2] +[gd_scene load_steps=5 format=2] [ext_resource path="res://objects/enemy/boss/sg2083.tscn" type="PackedScene" id=1] -[ext_resource path="res://graphics/backgrounds/factory.png" type="Texture" id=4] -[ext_resource path="res://maps/boss/boss2_arena.gd" type="Script" id=5] -[ext_resource path="res://objects/hud/hud.tscn" type="PackedScene" id=6] -[ext_resource path="res://audio/music/klystron_vip.ogg" type="AudioStream" id=7] -[ext_resource path="res://objects/lore/boss/dr_intelli.tscn" type="PackedScene" id=11] -[ext_resource path="res://objects/delayed_instance.tscn" type="PackedScene" id=12] -[ext_resource path="res://objects/environment/death tile/death_tile.tscn" type="PackedScene" id=13] -[ext_resource path="res://objects/lore/boss/2600.tscn" type="PackedScene" id=17] +[ext_resource path="res://tilesets/t_laboratory.tres" type="TileSet" id=2] +[ext_resource path="res://maps/boss/boss3_arena.gd" type="Script" id=3] +[ext_resource path="res://objects/enemy/boss/famira.tscn" type="PackedScene" id=4] [node name="Map" type="Node2D" groups=["map"]] pause_mode = 1 -script = ExtResource( 5 ) -music = ExtResource( 7 ) -lore_entries = [ ExtResource( 17 ), ExtResource( 11 ) ] +script = ExtResource( 3 ) -[node name="HUD" parent="." instance=ExtResource( 6 )] -song_name = "♫Klystron VIP" +[node name="TileMap" type="TileMap" parent="."] +tile_set = ExtResource( 2 ) +cell_size = Vector2( 8, 8 ) +format = 1 +tile_data = PoolIntArray( 1507297, 0, 1, 1507298, 0, 2, 1507299, 0, 2, 1507300, 0, 2, 1507301, 0, 2, 1507302, 0, 2, 1507303, 0, 2, 1507304, 0, 2, 1507305, 0, 2, 1507306, 0, 2, 1507307, 0, 2, 1507308, 0, 2, 1507309, 0, 2, 1507310, 0, 2, 1507311, 0, 2, 1507312, 0, 2, 1507313, 0, 2, 1507314, 0, 2, 1507315, 0, 2, 1507316, 0, 2, 1507317, 0, 2, 1507318, 0, 2, 1507319, 0, 2, 1507320, 0, 2, 1507321, 0, 2, 1507322, 0, 2, 1507323, 0, 2, 1507324, 0, 2, 1507325, 0, 2, 1507326, 0, 2, 1507327, 0, 2, 1441792, 0, 1, 1441793, 0, 2, 1441794, 0, 2, 1441795, 0, 2, 1441796, 0, 2, 1441797, 0, 2, 1441798, 0, 2, 1441799, 0, 2, 1441800, 0, 2, 1441801, 0, 2, 1441802, 0, 2, 1441803, 0, 2, 1441804, 0, 2, 1441805, 0, 2, 1441806, 0, 2, 1441807, 0, 2, 1441808, 0, 2, 1441809, 0, 2, 1441810, 0, 2, 1441811, 0, 2, 1441812, 0, 2, 1441813, 0, 2, 1441814, 0, 2, 1441815, 0, 2, 1441816, 0, 2, 1441817, 0, 2, 1441818, 0, 2, 1441819, 0, 2, 1441820, 0, 2, 1441821, 0, 2, 1441822, 0, 2, 1441823, 0, 3, 1441824, 0, 1, 1441825, 0, 2, 1441826, 0, 2, 1441827, 0, 2, 1441828, 0, 2, 1441829, 0, 2, 1441830, 0, 2, 1441831, 0, 2, 1441832, 0, 2, 1441833, 0, 2, 1441834, 0, 2, 1441835, 0, 2, 1441836, 0, 2, 1441837, 0, 2, 1441838, 0, 2, 1441839, 0, 2, 1441840, 0, 2, 1441841, 0, 2, 1441842, 0, 2, 1441843, 0, 2, 1441844, 0, 2, 1441845, 0, 2, 1441846, 0, 2, 1441847, 0, 2, 1441848, 0, 2, 1441849, 0, 2, 1441850, 0, 2, 1441851, 0, 2, 1441852, 0, 2, 1441853, 0, 2, 1441854, 0, 2, 1441855, 0, 3, 1441856, 0, 1, 1441857, 0, 2, 1441858, 0, 2, 1441859, 0, 2, 1441860, 0, 2, 1441861, 0, 2, 1441862, 0, 2, 1441863, 0, 2, 1441864, 0, 2, 1441865, 0, 2, 1441866, 0, 2, 1441867, 0, 2, 1441868, 0, 2, 1441869, 0, 2, 1441870, 0, 2, 1441871, 0, 2, 1441872, 0, 2, 1441873, 0, 2, 1441874, 0, 2, 1441875, 0, 2, 1441876, 0, 2, 1441877, 0, 2, 1441878, 0, 2, 1441879, 0, 2, 1441880, 0, 2, 1441881, 0, 2, 1441882, 0, 2, 1441883, 0, 2, 1441884, 0, 2, 1441885, 0, 2, 1441886, 0, 2, 1441887, 0, 3, 1572833, 3, 1, 1572834, 3, 2, 1572835, 3, 2, 1572836, 3, 2, 1572837, 3, 2, 1572838, 3, 2, 1572839, 3, 2, 1572840, 3, 2, 1572841, 3, 2, 1572842, 3, 2, 1572843, 3, 2, 1572844, 3, 2, 1572845, 3, 2, 1572846, 3, 2, 1572847, 3, 2, 1572848, 3, 2, 1572849, 3, 2, 1572850, 3, 2, 1572851, 3, 2, 1572852, 3, 2, 1572853, 3, 2, 1572854, 3, 2, 1572855, 3, 2, 1572856, 3, 2, 1572857, 3, 2, 1572858, 3, 2, 1572859, 3, 2, 1572860, 3, 2, 1572861, 3, 2, 1572862, 3, 2, 1572863, 3, 2, 1507328, 3, 1, 1507329, 3, 2, 1507330, 3, 2, 1507331, 3, 2, 1507332, 3, 2, 1507333, 3, 2, 1507334, 3, 2, 1507335, 3, 2, 1507336, 3, 2, 1507337, 3, 2, 1507338, 3, 2, 1507339, 3, 2, 1507340, 3, 2, 1507341, 3, 2, 1507342, 3, 2, 1507343, 3, 2, 1507344, 3, 2, 1507345, 3, 2, 1507346, 3, 2, 1507347, 3, 2, 1507348, 3, 2, 1507349, 3, 2, 1507350, 3, 2, 1507351, 3, 2, 1507352, 3, 2, 1507353, 3, 2, 1507354, 3, 2, 1507355, 3, 2, 1507356, 3, 2, 1507357, 3, 2, 1507358, 3, 2, 1507359, 3, 3, 1507360, 3, 1, 1507361, 3, 2, 1507362, 3, 2, 1507363, 3, 2, 1507364, 3, 2, 1507365, 3, 2, 1507366, 3, 2, 1507367, 3, 2, 1507368, 3, 2, 1507369, 3, 2, 1507370, 3, 2, 1507371, 3, 2, 1507372, 3, 2, 1507373, 3, 2, 1507374, 3, 2, 1507375, 3, 2, 1507376, 3, 2, 1507377, 3, 2, 1507378, 3, 2, 1507379, 3, 2, 1507380, 3, 2, 1507381, 3, 2, 1507382, 3, 2, 1507383, 3, 2, 1507384, 3, 2, 1507385, 3, 2, 1507386, 3, 2, 1507387, 3, 2, 1507388, 3, 2, 1507389, 3, 2, 1507390, 3, 2, 1507391, 3, 3, 1507392, 3, 1, 1507393, 3, 2, 1507394, 3, 2, 1507395, 3, 2, 1507396, 3, 2, 1507397, 3, 2, 1507398, 3, 2, 1507399, 3, 2, 1507400, 3, 2, 1507401, 3, 2, 1507402, 3, 2, 1507403, 3, 2, 1507404, 3, 2, 1507405, 3, 2, 1507406, 3, 2, 1507407, 3, 2, 1507408, 3, 2, 1507409, 3, 2, 1507410, 3, 2, 1507411, 3, 2, 1507412, 3, 2, 1507413, 3, 2, 1507414, 3, 2, 1507415, 3, 2, 1507416, 3, 2, 1507417, 3, 2, 1507418, 3, 2, 1507419, 3, 2, 1507420, 3, 2, 1507421, 3, 2, 1507422, 3, 2, 1507423, 3, 3, 1638369, 3, 131073, 1638370, 3, 131074, 1638371, 3, 131074, 1638372, 3, 131074, 1638373, 3, 131074, 1638374, 3, 131074, 1638375, 3, 131074, 1638376, 3, 131074, 1638377, 3, 131074, 1638378, 3, 131074, 1638379, 3, 131074, 1638380, 3, 131074, 1638381, 3, 131074, 1638382, 3, 131074, 1638383, 3, 131074, 1638384, 3, 131074, 1638385, 3, 131074, 1638386, 3, 131074, 1638387, 3, 131074, 1638388, 3, 131074, 1638389, 3, 131074, 1638390, 3, 131074, 1638391, 3, 131074, 1638392, 3, 131074, 1638393, 3, 131074, 1638394, 3, 131074, 1638395, 3, 131074, 1638396, 3, 131074, 1638397, 3, 131074, 1638398, 3, 131074, 1638399, 3, 131074, 1572864, 3, 131073, 1572865, 3, 131074, 1572866, 3, 131074, 1572867, 3, 131074, 1572868, 3, 131074, 1572869, 3, 131074, 1572870, 3, 131074, 1572871, 3, 131074, 1572872, 3, 131074, 1572873, 3, 131074, 1572874, 3, 131074, 1572875, 3, 131074, 1572876, 3, 131074, 1572877, 3, 131074, 1572878, 3, 131074, 1572879, 3, 131074, 1572880, 3, 131074, 1572881, 3, 131074, 1572882, 3, 131074, 1572883, 3, 131074, 1572884, 3, 131074, 1572885, 3, 131074, 1572886, 3, 131074, 1572887, 3, 131074, 1572888, 3, 131074, 1572889, 3, 131074, 1572890, 3, 131074, 1572891, 3, 131074, 1572892, 3, 131074, 1572893, 3, 131074, 1572894, 3, 131074, 1572895, 3, 131075, 1572896, 3, 131073, 1572897, 3, 131074, 1572898, 3, 131074, 1572899, 3, 131074, 1572900, 3, 131074, 1572901, 3, 131074, 1572902, 3, 131074, 1572903, 3, 131074, 1572904, 3, 131074, 1572905, 3, 131074, 1572906, 3, 131074, 1572907, 3, 131074, 1572908, 3, 131074, 1572909, 3, 131074, 1572910, 3, 131074, 1572911, 3, 131074, 1572912, 3, 131074, 1572913, 3, 131074, 1572914, 3, 131074, 1572915, 3, 131074, 1572916, 3, 131074, 1572917, 3, 131074, 1572918, 3, 131074, 1572919, 3, 131074, 1572920, 3, 131074, 1572921, 3, 131074, 1572922, 3, 131074, 1572923, 3, 131074, 1572924, 3, 131074, 1572925, 3, 131074, 1572926, 3, 131074, 1572927, 3, 131075, 1572928, 3, 131073, 1572929, 3, 131074, 1572930, 3, 131074, 1572931, 3, 131074, 1572932, 3, 131074, 1572933, 3, 131074, 1572934, 3, 131074, 1572935, 3, 131074, 1572936, 3, 131074, 1572937, 3, 131074, 1572938, 3, 131074, 1572939, 3, 131074, 1572940, 3, 131074, 1572941, 3, 131074, 1572942, 3, 131074, 1572943, 3, 131074, 1572944, 3, 131074, 1572945, 3, 131074, 1572946, 3, 131074, 1572947, 3, 131074, 1572948, 3, 131074, 1572949, 3, 131074, 1572950, 3, 131074, 1572951, 3, 131074, 1572952, 3, 131074, 1572953, 3, 131074, 1572954, 3, 131074, 1572955, 3, 131074, 1572956, 3, 131074, 1572957, 3, 131074, 1572958, 3, 131074, 1572959, 3, 131075 ) -[node name="Sprite" type="Sprite" parent="."] -position = Vector2( 128, 96 ) -z_index = -2 -texture = ExtResource( 4 ) -__meta__ = { -"_edit_lock_": true -} +[node name="2083" parent="." instance=ExtResource( 1 )] +position = Vector2( 0, 8 ) -[node name="DelayedArrow" parent="." instance=ExtResource( 12 )] -delay = 0.1 -autostart = true +[node name="Camera2D" type="Camera2D" parent="2083"] +offset = Vector2( 0, -8 ) +anchor_mode = 0 +current = true -[node name="DelayedArrow2" parent="." instance=ExtResource( 12 )] -delay = 0.1 - -[node name="DelayedArrow3" parent="." instance=ExtResource( 12 )] -delay = 0.1 - -[node name="DeathTile" parent="." instance=ExtResource( 13 )] -position = Vector2( 0, 192 ) -scale = Vector2( 32, 1 ) - -[node name="ExitTimer" type="Timer" parent="."] -wait_time = 5.0 -one_shot = true - -[node name="Enemies" type="Node2D" parent="."] - -[node name="ColorRect" type="ColorRect" parent="."] -visible = false -margin_left = 155.0 -margin_top = 75.0 -margin_right = 163.0 -margin_bottom = 228.0 -rect_rotation = 45.0 - -[node name="ColorRect3" type="ColorRect" parent="."] -visible = false -margin_left = 152.0 -margin_top = 67.0 -margin_right = 160.0 -margin_bottom = 220.0 -rect_rotation = 70.0 - -[node name="ColorRect2" type="ColorRect" parent="."] -visible = false -margin_left = 8.0 -margin_top = 59.0 -margin_right = 152.0 -margin_bottom = 67.0 - -[node name="2600" parent="." instance=ExtResource( 1 )] -position = Vector2( 146, 11 ) - -[connection signal="timeout" from="ExitTimer" to="." method="_on_ExitTimer_timeout"] +[node name="Famira" parent="." instance=ExtResource( 4 )] +position = Vector2( 278, 176 ) diff --git a/objects/enemy/boss/famira.gd b/objects/enemy/boss/famira.gd new file mode 100644 index 0000000..878b816 --- /dev/null +++ b/objects/enemy/boss/famira.gd @@ -0,0 +1,84 @@ +extends Node2D + + +export var decisions: Dictionary = { + "wait": 2, + "chase": 3, + "punch": 3, + "beam": 1, +} +export var wait_time: float = 1.0 +export var chase_speed: float = 50.0 + + +var rng := RandomNumberGenerator.new() +var current_action: String = "wait" + + +onready var punch_cast: RayCast2D = $PunchCast +onready var chase_cast: RayCast2D = $ChaseCast + + +func _ready() -> void: + rng.seed = "HEROMARK2".hash() + _decide_action() + + +func _physics_process(delta: float) -> void: + match current_action: + "chase": + if chase_cast.is_colliding(): + print("huh") + _decide_action() + else: + print("hehe") + position.x -= chase_speed * delta + + +func _decide_action() -> void: + # fill array based on weights + var weighted_decisions := [] + for k in decisions.keys(): + for i in decisions[k]: + weighted_decisions.append(k) + # choose an action + current_action = weighted_decisions[rng.randi() % weighted_decisions.size()] + # act based on new action + match current_action: + "wait": + wait() + "chase": + chase() + "punch": + if punch_cast.is_colliding(): + punch() + else: + current_action = "chase" + chase() + "beam": + beam() + + +func wait() -> void: + print("waiting") + yield(get_tree().create_timer(wait_time, false), "timeout") + _decide_action() + + +func chase() -> void: + # TODO: play animation + print("chasing") + + +func punch() -> void: + # TODO: play animation + print("PUNCH") + yield(get_tree().create_timer(wait_time, false), "timeout") + _decide_action() + + +func beam() -> void: + # TODO: play animation and stuff + print("BEAM") + yield(get_tree().create_timer(wait_time, false), "timeout") + _decide_action() diff --git a/objects/enemy/boss/famira.tscn b/objects/enemy/boss/famira.tscn new file mode 100644 index 0000000..11e1147 --- /dev/null +++ b/objects/enemy/boss/famira.tscn @@ -0,0 +1,36 @@ +[gd_scene load_steps=6 format=2] + +[ext_resource path="res://objects/enemy/boss/famira.gd" type="Script" id=1] +[ext_resource path="res://graphics/enemy/boss/famira-wip.png" type="Texture" id=2] +[ext_resource path="res://shaders/beam_cycle.gdshader" type="Shader" id=3] +[ext_resource path="res://graphics/enemy/boss/stg_2600/beam_gradient.png" type="Texture" id=4] + +[sub_resource type="ShaderMaterial" id=10] +shader = ExtResource( 3 ) +shader_param/cycle_speed = 1.0 +shader_param/gradient = ExtResource( 4 ) + +[node name="Famira" type="Node2D"] +script = ExtResource( 1 ) + +[node name="Sprite" type="Sprite" parent="."] +material = SubResource( 10 ) +position = Vector2( 23, -83 ) +texture = ExtResource( 2 ) +flip_h = true + +[node name="PunchCast" type="RayCast2D" parent="."] +position = Vector2( 0, -32 ) +enabled = true +cast_to = Vector2( -120, 0 ) +collision_mask = 4 +collide_with_areas = true +collide_with_bodies = false + +[node name="ChaseCast" type="RayCast2D" parent="."] +position = Vector2( 0, -16 ) +enabled = true +cast_to = Vector2( -80, 0 ) +collision_mask = 4 +collide_with_areas = true +collide_with_bodies = false diff --git a/objects/enemy/boss/sg2083.tscn b/objects/enemy/boss/sg2083.tscn index c576f33..3f870ea 100644 --- a/objects/enemy/boss/sg2083.tscn +++ b/objects/enemy/boss/sg2083.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=37 format=2] +[gd_scene load_steps=38 format=2] [ext_resource path="res://shaders/color_noise.gdshader" type="Shader" id=1] [ext_resource path="res://graphics/enemy/boss/stg_2600/tailpipes.png" type="Texture" id=2] @@ -1018,10 +1018,10 @@ tracks/6/keys = { "times": PoolRealArray( 0, 0.25, 0.5, 0.75, 1 ), "transitions": PoolRealArray( 1, 1, 1, 1, 1 ), "update": 0, -"values": [ 51.0254, 203.4, 223.8, -3444.5, 51.0254 ] +"values": [ 51.0254, 23.4, 43.8, 55.0, 51.0254 ] } tracks/7/type = "value" -tracks/7/path = NodePath("Axle/JointBack/LegBack/KneeBack:rotation_degrees") +tracks/7/path = NodePath("Axle/JointBack/LegBack:rotation_degrees") tracks/7/interp = 1 tracks/7/loop_wrap = true tracks/7/imported = false @@ -1030,18 +1030,6 @@ tracks/7/keys = { "times": PoolRealArray( 0, 0.25, 0.5, 0.75, 1 ), "transitions": PoolRealArray( 1, 1, 1, 1, 1 ), "update": 0, -"values": [ 0.0, -180.0, -180.0, 3510.0, 0.0 ] -} -tracks/8/type = "value" -tracks/8/path = NodePath("Axle/JointBack/LegBack:rotation_degrees") -tracks/8/interp = 1 -tracks/8/loop_wrap = true -tracks/8/imported = false -tracks/8/enabled = true -tracks/8/keys = { -"times": PoolRealArray( 0, 0.25, 0.5, 0.75, 1 ), -"transitions": PoolRealArray( 1, 1, 1, 1, 1 ), -"update": 0, "values": [ -26.8344, -19.6257, -38.4223, -35.1608, -26.8344 ] } @@ -1303,7 +1291,10 @@ tracks/1/keys = { "values": [ Color( 1, 1, 1, 1 ), Color( 1, 1, 1, 1 ), Color( 1, 1, 1, 0.833333 ), Color( 1, 1, 1, 0.666667 ), Color( 1, 1, 1, 0.5 ), Color( 1, 1, 1, 0.333333 ), Color( 1, 1, 1, 0.166667 ), Color( 1, 1, 1, 0 ) ] } -[node name="2600" type="Node2D"] +[sub_resource type="RectangleShape2D" id=26] +extents = Vector2( 33.5, 76 ) + +[node name="2083" type="Node2D"] script = ExtResource( 19 ) __meta__ = { "_edit_horizontal_guides_": [ 168.0, 128.0, 157.0 ], @@ -1326,7 +1317,7 @@ position = Vector2( 42, 78 ) scale = Vector2( -1, 1 ) [node name="JointBack" type="Sprite" parent="Axle"] -modulate = Color( 0.75, 0.75, 0.75, 1 ) +modulate = Color( 0.74902, 0.74902, 0.74902, 1 ) position = Vector2( -10, -4 ) z_index = -1 texture = ExtResource( 7 ) @@ -1380,12 +1371,10 @@ __meta__ = { "_gizmo_extents_": 4.0 } -[node name="KneeBack" type="Sprite" parent="Axle/JointBack/LegBack/KneeBack"] -texture = ExtResource( 8 ) -hframes = 8 -script = ExtResource( 10 ) -fps = 4.0 -rotation_lock = 0.0 +[node name="KneeGraphic" type="RemoteTransform2D" parent="Axle/JointBack/LegBack/KneeBack"] +remote_path = NodePath("../../../../KneeBack") +update_rotation = false +update_scale = false [node name="Head" type="Sprite" parent="Axle"] unique_name_in_owner = true @@ -1545,15 +1534,15 @@ scale = Vector2( 1, -1 ) [node name="Position1" type="Position2D" parent="Axle/Head/BulletPositions"] position = Vector2( 6.08833, 2.28882e-05 ) -rotation = 3.14159 +rotation = 2.87979 [node name="Position2" type="Position2D" parent="Axle/Head/BulletPositions"] position = Vector2( 6.08832, 8.00003 ) -rotation = 3.57792 +rotation = 3.14159 [node name="Position3" type="Position2D" parent="Axle/Head/BulletPositions"] position = Vector2( 6.08832, 16 ) -rotation = 4.01426 +rotation = 3.40339 [node name="JointFront" type="Sprite" parent="Axle"] position = Vector2( 11, -4 ) @@ -1605,8 +1594,26 @@ __meta__ = { "_gizmo_extents_": 4.0 } -[node name="KneeFront" type="Sprite" parent="Axle/JointFront/LegFront"] -position = Vector2( 3.8147e-06, 36 ) +[node name="KneeGraphic" type="RemoteTransform2D" parent="Axle/JointFront/LegFront"] +position = Vector2( 7.62939e-06, 36 ) +remote_path = NodePath("../../../KneeFront") +update_rotation = false +update_scale = false + +[node name="KneeBack" type="Sprite" parent="Axle"] +modulate = Color( 0.74902, 0.74902, 0.74902, 1 ) +position = Vector2( 6.25089, 28.1233 ) +scale = Vector2( 1, -1 ) +z_index = -1 +texture = ExtResource( 8 ) +hframes = 8 +script = ExtResource( 10 ) +fps = 4.0 +ping_pong = true +rotation_lock = 0.0 + +[node name="KneeFront" type="Sprite" parent="Axle"] +position = Vector2( 27.2509, 28.1233 ) texture = ExtResource( 8 ) hframes = 8 script = ExtResource( 10 ) @@ -1630,5 +1637,14 @@ __meta__ = { anims/RESET = SubResource( 17 ) anims/explode = SubResource( 18 ) +[node name="DetectionBox" type="Area2D" parent="."] +collision_layer = 4 +collision_mask = 0 +monitoring = false + +[node name="CollisionShape2D" type="CollisionShape2D" parent="DetectionBox"] +position = Vector2( 53.5, 92 ) +shape = SubResource( 26 ) + [connection signal="animation_finished" from="AnimationPlayer" to="." method="_on_animation_finished"] [connection signal="area_entered" from="Axle/Head/Beam/Hitbox" to="." method="_on_Hitbox_area_entered"] diff --git a/scripts/sprite_ext.gd b/scripts/sprite_ext.gd index 7b31681..72c8e91 100644 --- a/scripts/sprite_ext.gd +++ b/scripts/sprite_ext.gd @@ -25,7 +25,8 @@ var _time: float = 0.0 func _process(delta): # rotation lock if not is_nan(rotation_lock): - global_rotation_degrees = rotation_lock + set_deferred("global_rotation_degrees", rotation_lock) +# global_rotation_degrees = rotation_lock # do not animate if paused if stopped: return