small bugfixes
parent
0aa90ea4b3
commit
7b85ffb5f6
|
@ -272,7 +272,10 @@ public partial class Character : CharacterBody2D, IFaction
|
|||
{
|
||||
HurtAnimation.Stop();
|
||||
HurtAnimation.Play("hurt");
|
||||
HurtAnimation.Queue("hurt_flash");
|
||||
if (HurtAnimation.HasAnimation("hurt_flash"))
|
||||
{
|
||||
HurtAnimation.Queue("hurt_flash");
|
||||
}
|
||||
}
|
||||
|
||||
// if anyone involved is a player, shake their screen
|
||||
|
|
|
@ -373,7 +373,7 @@ use_parent_material = true
|
|||
position = Vector2(0, -8)
|
||||
texture = ExtResource("16_lr46v")
|
||||
offset = Vector2(0, -4)
|
||||
hframes = 18
|
||||
hframes = 35
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
|
||||
position = Vector2(0, -4)
|
||||
|
|
|
@ -437,6 +437,7 @@ stream = ExtResource("13_bxguv")
|
|||
stream = ExtResource("12_vvem5")
|
||||
|
||||
[node name="Camera2D" parent="." instance=ExtResource("4_ym125")]
|
||||
zoom = Vector2(4, 4)
|
||||
limit_smoothed = true
|
||||
position_smoothing_speed = 8.0
|
||||
|
||||
|
|
|
@ -10,13 +10,32 @@
|
|||
[node name="World" type="Node2D" node_paths=PackedStringArray("UIController", "MusicPlayer", "DialogueBalloon")]
|
||||
script = ExtResource("1_1k6ew")
|
||||
StartingArea = ExtResource("2_pksaj")
|
||||
UIController = NodePath("CanvasLayer/UI")
|
||||
UIController = NodePath("CanvasLayer/SubViewportContainer/UIViewport/CanvasLayer/UI")
|
||||
MusicPlayer = NodePath("MusicPlayer")
|
||||
DialogueBalloon = NodePath("DialogBalloon")
|
||||
DialogueBalloon = NodePath("CanvasLayer/SubViewportContainer/UIViewport/DialogBalloon")
|
||||
|
||||
[node name="CanvasLayer" type="CanvasLayer" parent="."]
|
||||
|
||||
[node name="UI" type="Control" parent="CanvasLayer" node_paths=PackedStringArray("BossBar")]
|
||||
[node name="SubViewportContainer" type="SubViewportContainer" parent="CanvasLayer"]
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
stretch = true
|
||||
stretch_shrink = 2
|
||||
|
||||
[node name="UIViewport" type="SubViewport" parent="CanvasLayer/SubViewportContainer"]
|
||||
transparent_bg = true
|
||||
handle_input_locally = false
|
||||
size = Vector2i(960, 540)
|
||||
render_target_update_mode = 4
|
||||
|
||||
[node name="DialogBalloon" parent="CanvasLayer/SubViewportContainer/UIViewport" instance=ExtResource("6_2bdwl")]
|
||||
|
||||
[node name="CanvasLayer" type="CanvasLayer" parent="CanvasLayer/SubViewportContainer/UIViewport"]
|
||||
|
||||
[node name="UI" type="Control" parent="CanvasLayer/SubViewportContainer/UIViewport/CanvasLayer" node_paths=PackedStringArray("BossBar")]
|
||||
z_index = 128
|
||||
layout_mode = 3
|
||||
anchors_preset = 15
|
||||
|
@ -29,23 +48,23 @@ size_flags_vertical = 3
|
|||
script = ExtResource("3_fe62s")
|
||||
BossBar = NodePath("Bottom/BossBar")
|
||||
|
||||
[node name="Top" type="HBoxContainer" parent="CanvasLayer/UI"]
|
||||
[node name="Top" type="HBoxContainer" parent="CanvasLayer/SubViewportContainer/UIViewport/CanvasLayer/UI"]
|
||||
layout_mode = 1
|
||||
anchors_preset = 10
|
||||
anchor_right = 1.0
|
||||
offset_bottom = 40.0
|
||||
grow_horizontal = 2
|
||||
|
||||
[node name="Margin" type="MarginContainer" parent="CanvasLayer/UI/Top"]
|
||||
[node name="Margin" type="MarginContainer" parent="CanvasLayer/SubViewportContainer/UIViewport/CanvasLayer/UI/Top"]
|
||||
layout_mode = 2
|
||||
theme_override_constants/margin_left = 16
|
||||
theme_override_constants/margin_top = 16
|
||||
|
||||
[node name="HealthBar" parent="CanvasLayer/UI/Top/Margin" instance=ExtResource("3_5rhge")]
|
||||
[node name="HealthBar" parent="CanvasLayer/SubViewportContainer/UIViewport/CanvasLayer/UI/Top/Margin" instance=ExtResource("3_5rhge")]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
|
||||
[node name="Bottom" type="HBoxContainer" parent="CanvasLayer/UI"]
|
||||
[node name="Bottom" type="HBoxContainer" parent="CanvasLayer/SubViewportContainer/UIViewport/CanvasLayer/UI"]
|
||||
layout_mode = 1
|
||||
anchors_preset = 12
|
||||
anchor_top = 1.0
|
||||
|
@ -56,7 +75,7 @@ grow_horizontal = 2
|
|||
grow_vertical = 0
|
||||
alignment = 1
|
||||
|
||||
[node name="BossBar" parent="CanvasLayer/UI/Bottom" instance=ExtResource("5_8njq4")]
|
||||
[node name="BossBar" parent="CanvasLayer/SubViewportContainer/UIViewport/CanvasLayer/UI/Bottom" instance=ExtResource("5_8njq4")]
|
||||
visible = false
|
||||
layout_mode = 2
|
||||
|
||||
|
@ -72,5 +91,3 @@ grow_horizontal = 2
|
|||
grow_vertical = 2
|
||||
|
||||
[node name="MusicPlayer" type="AudioStreamPlayer" parent="."]
|
||||
|
||||
[node name="DialogBalloon" parent="." instance=ExtResource("6_2bdwl")]
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
[ext_resource type="PackedScene" uid="uid://dldnp8eunxj3q" path="res://BoundingBoxes/InteractionTrigger.tscn" id="9_3401j"]
|
||||
[ext_resource type="Script" path="res://BoundingBoxes/ConnectorBox.cs" id="9_fg062"]
|
||||
|
||||
[sub_resource type="ShaderMaterial" id="ShaderMaterial_iqdtp"]
|
||||
[sub_resource type="ShaderMaterial" id="ShaderMaterial_bk1di"]
|
||||
resource_local_to_scene = true
|
||||
shader = ExtResource("5_h8k5p")
|
||||
shader_parameter/color = Quaternion(1, 1, 1, 1)
|
||||
|
@ -111,7 +111,7 @@ visible = false
|
|||
position = Vector2(120, -112)
|
||||
|
||||
[node name="Doc" parent="Entities" index="0" instance=ExtResource("4_ej0f3")]
|
||||
material = SubResource("ShaderMaterial_iqdtp")
|
||||
material = SubResource("ShaderMaterial_bk1di")
|
||||
|
||||
[node name="PointLight2D" type="PointLight2D" parent="Entities" index="1"]
|
||||
position = Vector2(168, -42)
|
||||
|
|
|
@ -42,6 +42,10 @@ public partial class DocShungiteDartState : DocAttackState
|
|||
protected override void Attack()
|
||||
{
|
||||
var player = NPC.FindBestTarget();
|
||||
if (player is null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
var playerPos = player.GlobalPosition;
|
||||
// global position is (from npc to player) * 2 = (2 * npc) - player
|
||||
//projectile.GlobalPosition = 2 * NPC.GlobalPosition - playerPos;
|
||||
|
|
|
@ -49,6 +49,10 @@ public partial class DocShungiteSpikeState : DocShungiteDartState
|
|||
protected override void Attack()
|
||||
{
|
||||
var player = NPC.FindBestTarget();
|
||||
if (player is null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
var playerPos = player.GlobalPosition;
|
||||
var docPos = NPC.GlobalPosition;
|
||||
var projectile = SpawnProjectile(docPos, Vector2.Zero) as ShungiteSpike;
|
||||
|
|
|
@ -33,10 +33,8 @@ public partial class DocUnwantedFrequencyState : DocShungiteSpikeState
|
|||
protected override void Attack()
|
||||
{
|
||||
Doc.TelegraphAnimation.Play("unwanted_frequencies");
|
||||
var player = _world.CurrentPlayer;
|
||||
var playerPos = player.GlobalPosition;
|
||||
var docPos = NPC.GlobalPosition;
|
||||
var projectile = SpawnProjectile(docPos, docPos.DirectionTo(playerPos))
|
||||
var projectile = SpawnProjectile(docPos, Vector2.Zero)
|
||||
as UnwantedFrequency;
|
||||
projectile.CharacterTarget = NPC.FindBestTarget();
|
||||
|
||||
|
|
|
@ -30,8 +30,8 @@ general/wrap_lines=true
|
|||
|
||||
[display]
|
||||
|
||||
window/size/viewport_width=640
|
||||
window/size/viewport_height=360
|
||||
window/size/viewport_width=1920
|
||||
window/size/viewport_height=1080
|
||||
window/stretch/mode="viewport"
|
||||
window/stretch/aspect="expand"
|
||||
|
||||
|
|
Loading…
Reference in New Issue