Created the ability to drop items on the ground after the player dies.
制作玩家死亡后,背包物品掉在地上的功能。
This commit is contained in:
parent
0dd3de228e
commit
05763c25b1
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -4,3 +4,5 @@ slogan_1,如果你想要得到爱,你就播种爱。,"If you want love, you so
|
||||||
slogan_2,快乐?伤心?痛苦?,Happy? Sad? Pain?,楽しいですか?悲しいですか?苦しいですか?
|
slogan_2,快乐?伤心?痛苦?,Happy? Sad? Pain?,楽しいですか?悲しいですか?苦しいですか?
|
||||||
slogan_3,Kawaii!,Kawaii!,Kawaii!
|
slogan_3,Kawaii!,Kawaii!,Kawaii!
|
||||||
slogan_4,魔法是想象的世界。,Magic is an imaginary world.,魔法は想像の世界です。
|
slogan_4,魔法是想象的世界。,Magic is an imaginary world.,魔法は想像の世界です。
|
||||||
|
slogan_5,也试试Minecraft!,Also try Minecraft!,Minecraftもやってみて!
|
||||||
|
slogan_6,也试试Terraria!,Also try Terraria!,Terrariaもやってみて!
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
importer="csv_translation"
|
importer="csv_translation"
|
||||||
type="Translation"
|
type="Translation"
|
||||||
uid="uid://dbgkevd34vb0d"
|
uid="uid://bgfmprv2sm645"
|
||||||
|
|
||||||
[deps]
|
[deps]
|
||||||
|
|
||||||
|
|
Binary file not shown.
Binary file not shown.
|
@ -45,3 +45,18 @@ script = ExtResource("2_6p8mv")
|
||||||
|
|
||||||
[node name="StaffOfTheUndead" parent="." instance=ExtResource("3_ud0w8")]
|
[node name="StaffOfTheUndead" parent="." instance=ExtResource("3_ud0w8")]
|
||||||
position = Vector2(231, 116)
|
position = Vector2(231, 116)
|
||||||
|
|
||||||
|
[node name="StaffOfTheUndead2" parent="." instance=ExtResource("3_ud0w8")]
|
||||||
|
position = Vector2(113, 149)
|
||||||
|
|
||||||
|
[node name="StaffOfTheUndead5" parent="." instance=ExtResource("3_ud0w8")]
|
||||||
|
position = Vector2(213, 177)
|
||||||
|
|
||||||
|
[node name="StaffOfTheUndead6" parent="." instance=ExtResource("3_ud0w8")]
|
||||||
|
position = Vector2(290, 167)
|
||||||
|
|
||||||
|
[node name="StaffOfTheUndead3" parent="." instance=ExtResource("3_ud0w8")]
|
||||||
|
position = Vector2(70, 88)
|
||||||
|
|
||||||
|
[node name="StaffOfTheUndead4" parent="." instance=ExtResource("3_ud0w8")]
|
||||||
|
position = Vector2(367, 85)
|
||||||
|
|
|
@ -147,6 +147,7 @@ hotbar_previous={
|
||||||
[internationalization]
|
[internationalization]
|
||||||
|
|
||||||
locale/translations=PackedStringArray("res://locals/DeathInfo.en.translation", "res://locals/DeathInfo.ja.translation", "res://locals/DeathInfo.zh.translation", "res://locals/InputMapping.en.translation", "res://locals/InputMapping.ja.translation", "res://locals/InputMapping.zh.translation", "res://locals/Log.en.translation", "res://locals/Log.ja.translation", "res://locals/Log.zh.translation", "res://locals/Slogan.en.translation", "res://locals/Slogan.ja.translation", "res://locals/Slogan.zh.translation", "res://locals/UI.en.translation", "res://locals/UI.ja.translation", "res://locals/UI.zh.translation", "res://locals/Weapon.en.translation", "res://locals/Weapon.ja.translation", "res://locals/Weapon.zh.translation")
|
locale/translations=PackedStringArray("res://locals/DeathInfo.en.translation", "res://locals/DeathInfo.ja.translation", "res://locals/DeathInfo.zh.translation", "res://locals/InputMapping.en.translation", "res://locals/InputMapping.ja.translation", "res://locals/InputMapping.zh.translation", "res://locals/Log.en.translation", "res://locals/Log.ja.translation", "res://locals/Log.zh.translation", "res://locals/Slogan.en.translation", "res://locals/Slogan.ja.translation", "res://locals/Slogan.zh.translation", "res://locals/UI.en.translation", "res://locals/UI.ja.translation", "res://locals/UI.zh.translation", "res://locals/Weapon.en.translation", "res://locals/Weapon.ja.translation", "res://locals/Weapon.zh.translation")
|
||||||
|
locale/test="ja"
|
||||||
|
|
||||||
[layer_names]
|
[layer_names]
|
||||||
|
|
||||||
|
|
|
@ -124,7 +124,7 @@ layout_mode = 2
|
||||||
|
|
||||||
[node name="GodotLabel" type="Label" parent="VBoxContainer2/HBoxContainer"]
|
[node name="GodotLabel" type="Label" parent="VBoxContainer2/HBoxContainer"]
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
text = "Power by"
|
text = "Powered by"
|
||||||
horizontal_alignment = 2
|
horizontal_alignment = 2
|
||||||
|
|
||||||
[node name="LinkButton" type="LinkButton" parent="VBoxContainer2/HBoxContainer"]
|
[node name="LinkButton" type="LinkButton" parent="VBoxContainer2/HBoxContainer"]
|
||||||
|
|
|
@ -13,6 +13,7 @@ public static class SloganProvider
|
||||||
static SloganProvider()
|
static SloganProvider()
|
||||||
{
|
{
|
||||||
// Calculate SloganCount From translation file
|
// Calculate SloganCount From translation file
|
||||||
|
// 从翻译文件中计算口号计数
|
||||||
var sloganTrans = ResourceLoader.Load<OptimizedTranslation>("res://locals/Slogan.en.translation")!;
|
var sloganTrans = ResourceLoader.Load<OptimizedTranslation>("res://locals/Slogan.en.translation")!;
|
||||||
SloganCount = sloganTrans.GetTranslatedMessageList().Length;
|
SloganCount = sloganTrans.GetTranslatedMessageList().Length;
|
||||||
}
|
}
|
||||||
|
|
|
@ -151,7 +151,7 @@ public partial class CharacterTemplate : CharacterBody2D
|
||||||
//Check whether the new Hp is greater than the maximum Hp. If yes, set the current Hp to the maximum Hp. If no, set the current Hp to the new HP
|
//Check whether the new Hp is greater than the maximum Hp. If yes, set the current Hp to the maximum Hp. If no, set the current Hp to the new HP
|
||||||
//判断新的Hp是否大于最大Hp,若大于那么将当前Hp设置为最大Hp,否则设置为新的Hp
|
//判断新的Hp是否大于最大Hp,若大于那么将当前Hp设置为最大Hp,否则设置为新的Hp
|
||||||
CurrentHp = newHp > MaxHp ? MaxHp : newHp;
|
CurrentHp = newHp > MaxHp ? MaxHp : newHp;
|
||||||
Visible = true;
|
Show();
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -318,7 +318,7 @@ public partial class CharacterTemplate : CharacterBody2D
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
pickAbleItem.Visible = false;
|
pickAbleItem.Hide();
|
||||||
pickAbleItem.ProcessMode = ProcessModeEnum.Disabled;
|
pickAbleItem.ProcessMode = ProcessModeEnum.Disabled;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -358,7 +358,7 @@ public partial class CharacterTemplate : CharacterBody2D
|
||||||
var timeSpan = DateTime.Now - _lastDamageTime;
|
var timeSpan = DateTime.Now - _lastDamageTime;
|
||||||
if (timeSpan > Config.HealthBarDisplaysTime)
|
if (timeSpan > Config.HealthBarDisplaysTime)
|
||||||
{
|
{
|
||||||
_healthBar.Visible = false;
|
_healthBar.Hide();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -410,7 +410,7 @@ public partial class CharacterTemplate : CharacterBody2D
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
_healthBar.Visible = true;
|
_healthBar.Show();
|
||||||
_healthBar.Value = CurrentHp;
|
_healthBar.Value = CurrentHp;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -437,6 +437,7 @@ public partial class CharacterTemplate : CharacterBody2D
|
||||||
//Character death
|
//Character death
|
||||||
//角色死亡
|
//角色死亡
|
||||||
OnDie(damageTemplate);
|
OnDie(damageTemplate);
|
||||||
|
ThrowAllItemOnDie();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -528,6 +529,44 @@ public partial class CharacterTemplate : CharacterBody2D
|
||||||
_animatedSprite2D.FlipH = FacingLeft;
|
_animatedSprite2D.FlipH = FacingLeft;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// <para>Throw all items when the creature dies</para>
|
||||||
|
/// <para>当生物死亡后抛出所有物品</para>
|
||||||
|
/// </summary>
|
||||||
|
private void ThrowAllItemOnDie()
|
||||||
|
{
|
||||||
|
//If the item container is null, then return
|
||||||
|
//如果物品容器为null,那么返回
|
||||||
|
if (_itemContainer == null)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
var len = _itemContainer.GetItemSlotCount();
|
||||||
|
if (len == 0)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
CurrentItem = null;
|
||||||
|
const float height = -Config.CellSize * 7;
|
||||||
|
const float horizontalDirection = Config.CellSize * 15;
|
||||||
|
for (var i = 0; i < len; i++)
|
||||||
|
{
|
||||||
|
//Generates a random number that controls the horizontal velocity of thrown items (range: 0.01 to 1)
|
||||||
|
//生成一个随机数,用于控制抛出物品的水平方向速度(范围为:0.01到1)
|
||||||
|
var percent = GD.Randf() + 0.01f;
|
||||||
|
if (GD.Randf() > 0.5)
|
||||||
|
{
|
||||||
|
ThrowItem(i, -1, new Vector2(horizontalDirection * percent, height));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
ThrowItem(i, -1, new Vector2(-horizontalDirection * percent, height));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// <para>Throw item</para>
|
/// <para>Throw item</para>
|
||||||
/// <para>抛出物品</para>
|
/// <para>抛出物品</para>
|
||||||
|
@ -539,6 +578,8 @@ public partial class CharacterTemplate : CharacterBody2D
|
||||||
/// <param name="number">
|
/// <param name="number">
|
||||||
/// <para>How many to throw</para>
|
/// <para>How many to throw</para>
|
||||||
/// <para>要扔几个</para>
|
/// <para>要扔几个</para>
|
||||||
|
/// <para>The amount passed into a negative number will throw all the items in the slot at once.</para>
|
||||||
|
/// <para>数量传入一个负数,将一次扔出槽内的所有物品。</para>
|
||||||
/// </param>
|
/// </param>
|
||||||
/// <param name="velocity">
|
/// <param name="velocity">
|
||||||
///<para>The speed to be applied to the item</para>
|
///<para>The speed to be applied to the item</para>
|
||||||
|
@ -563,6 +604,11 @@ public partial class CharacterTemplate : CharacterBody2D
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (item is not Node2D node2D)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
switch (item)
|
switch (item)
|
||||||
{
|
{
|
||||||
case WeaponTemplate weaponTemplate:
|
case WeaponTemplate weaponTemplate:
|
||||||
|
@ -571,7 +617,7 @@ public partial class CharacterTemplate : CharacterBody2D
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
weaponTemplate.Reparent(GameSceneNodeHolder.WeaponContainer);
|
CallDeferred("WeaponTemplateReparent", weaponTemplate);
|
||||||
var timer = new Timer();
|
var timer = new Timer();
|
||||||
weaponTemplate.AddChild(timer);
|
weaponTemplate.AddChild(timer);
|
||||||
timer.WaitTime = _itemCollisionRecoveryTime;
|
timer.WaitTime = _itemCollisionRecoveryTime;
|
||||||
|
@ -587,13 +633,17 @@ public partial class CharacterTemplate : CharacterBody2D
|
||||||
};
|
};
|
||||||
timer.Start();
|
timer.Start();
|
||||||
weaponTemplate.Sleeping = false;
|
weaponTemplate.Sleeping = false;
|
||||||
// weaponTemplate.LinearVelocity = Vector2.Zero;
|
//Setting an initial speed of 0 for items here prevents the problem of throwing items too fast.
|
||||||
|
//在这里给物品设置一个为0的初始速度,可防止扔出物品时速度过快的问题。
|
||||||
|
weaponTemplate.LinearVelocity = Vector2.Zero;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
node2D.ProcessMode = ProcessModeEnum.Inherit;
|
||||||
|
node2D.Show();
|
||||||
//We apply force to objects.
|
//We apply force to objects.
|
||||||
//我们给物品施加力。
|
//我们给物品施加力。
|
||||||
switch (CurrentItem)
|
switch (node2D)
|
||||||
{
|
{
|
||||||
case CharacterBody2D characterBody2D:
|
case CharacterBody2D characterBody2D:
|
||||||
characterBody2D.Velocity = velocity;
|
characterBody2D.Velocity = velocity;
|
||||||
|
@ -605,9 +655,25 @@ public partial class CharacterTemplate : CharacterBody2D
|
||||||
|
|
||||||
//Remove items from the item container
|
//Remove items from the item container
|
||||||
//在物品容器内移除物品
|
//在物品容器内移除物品
|
||||||
|
if (number < 0)
|
||||||
|
{
|
||||||
|
itemSlotNode.RemoveItem(item.Quantity);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
itemSlotNode.RemoveItem(number);
|
itemSlotNode.RemoveItem(number);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// <para>Replace the parent node of the weapon</para>
|
||||||
|
/// <para>替换武器的父节点</para>
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="weaponTemplate"></param>
|
||||||
|
private void WeaponTemplateReparent(WeaponTemplate weaponTemplate)
|
||||||
|
{
|
||||||
|
weaponTemplate.Reparent(GameSceneNodeHolder.WeaponContainer);
|
||||||
|
}
|
||||||
|
|
||||||
public sealed override void _PhysicsProcess(double delta)
|
public sealed override void _PhysicsProcess(double delta)
|
||||||
{
|
{
|
||||||
|
|
|
@ -353,9 +353,15 @@ public partial class Player : CharacterTemplate
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// <para>When the player dies</para>
|
||||||
|
/// <para>当玩家死亡的时候</para>
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="damageTemplate"></param>
|
||||||
protected override async Task OnDie(DamageTemplate damageTemplate)
|
protected override async Task OnDie(DamageTemplate damageTemplate)
|
||||||
{
|
{
|
||||||
Visible = false;
|
Hide();
|
||||||
|
ProcessMode = ProcessModeEnum.Disabled;
|
||||||
if (EventManager.GameOverEvent == null)
|
if (EventManager.GameOverEvent == null)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -97,7 +97,7 @@ public partial class ItemSlotNode : MarginContainer
|
||||||
|
|
||||||
if (_quantityLabel != null)
|
if (_quantityLabel != null)
|
||||||
{
|
{
|
||||||
_quantityLabel.Visible = false;
|
_quantityLabel.Hide();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -213,16 +213,16 @@ public partial class ItemSlotNode : MarginContainer
|
||||||
switch (quantity)
|
switch (quantity)
|
||||||
{
|
{
|
||||||
case null:
|
case null:
|
||||||
_quantityLabel.Visible = false;
|
_quantityLabel.Hide();
|
||||||
return;
|
return;
|
||||||
case > 1:
|
case > 1:
|
||||||
//When the quantity is greater than 1, we display the quantity.
|
//When the quantity is greater than 1, we display the quantity.
|
||||||
//当数量大于1时,我们显示数量
|
//当数量大于1时,我们显示数量
|
||||||
_quantityLabel.Text = quantity.ToString();
|
_quantityLabel.Text = quantity.ToString();
|
||||||
_quantityLabel.Visible = true;
|
_quantityLabel.Show();
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
_quantityLabel.Visible = false;
|
_quantityLabel.Hide();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -236,6 +236,6 @@ public partial class ItemSlotNode : MarginContainer
|
||||||
_iconTextureRect = GetNode<TextureRect>("BackgroundTexture/CenterContainer/IconTextureRect");
|
_iconTextureRect = GetNode<TextureRect>("BackgroundTexture/CenterContainer/IconTextureRect");
|
||||||
_quantityLabel = GetNode<Label>("Control/QuantityLabel");
|
_quantityLabel = GetNode<Label>("Control/QuantityLabel");
|
||||||
_control = GetNode<Control>("Control");
|
_control = GetNode<Control>("Control");
|
||||||
_quantityLabel.Visible = false;
|
_quantityLabel.Hide();
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -15,7 +15,7 @@ public partial class GameOverLoaderMenuLoader : UiLoaderTemplate
|
||||||
|
|
||||||
public override void InitializeUi()
|
public override void InitializeUi()
|
||||||
{
|
{
|
||||||
Visible = false;
|
Hide();
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void InitializeData()
|
public override void InitializeData()
|
||||||
|
@ -34,7 +34,7 @@ public partial class GameOverLoaderMenuLoader : UiLoaderTemplate
|
||||||
{
|
{
|
||||||
var replayEvent = new GameReplayEvent();
|
var replayEvent = new GameReplayEvent();
|
||||||
EventManager.GameReplayEvent?.Invoke(replayEvent);
|
EventManager.GameReplayEvent?.Invoke(replayEvent);
|
||||||
Visible = false;
|
Hide();
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -46,7 +46,7 @@ public partial class GameOverLoaderMenuLoader : UiLoaderTemplate
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
Visible = true;
|
Show();
|
||||||
_deathInfoLabel.Text = gameOverEvent.DeathInfo;
|
_deathInfoLabel.Text = gameOverEvent.DeathInfo;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -269,12 +269,12 @@ public partial class LevelGraphEditorLoader : UiLoaderTemplate
|
||||||
{
|
{
|
||||||
if (_nodeBinding.GraphEdit != null)
|
if (_nodeBinding.GraphEdit != null)
|
||||||
{
|
{
|
||||||
_nodeBinding.GraphEdit.Visible = false;
|
_nodeBinding.GraphEdit.Hide();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (_nodeBinding.CreateOrEditorPanel != null)
|
if (_nodeBinding.CreateOrEditorPanel != null)
|
||||||
{
|
{
|
||||||
_nodeBinding.CreateOrEditorPanel.Visible = true;
|
_nodeBinding.CreateOrEditorPanel.Show();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (_nodeBinding.RoomNameLineEdit != null && _defaultRoomName != null)
|
if (_nodeBinding.RoomNameLineEdit != null && _defaultRoomName != null)
|
||||||
|
@ -301,7 +301,7 @@ public partial class LevelGraphEditorLoader : UiLoaderTemplate
|
||||||
|
|
||||||
if (_nodeBinding.HBoxContainer != null)
|
if (_nodeBinding.HBoxContainer != null)
|
||||||
{
|
{
|
||||||
_nodeBinding.HBoxContainer.Visible = false;
|
_nodeBinding.HBoxContainer.Hide();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -377,7 +377,7 @@ public partial class LevelGraphEditorLoader : UiLoaderTemplate
|
||||||
{
|
{
|
||||||
if (_nodeBinding.SaveOrLoadPanel != null)
|
if (_nodeBinding.SaveOrLoadPanel != null)
|
||||||
{
|
{
|
||||||
_nodeBinding.SaveOrLoadPanel.Visible = false;
|
_nodeBinding.SaveOrLoadPanel.Hide();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -388,7 +388,7 @@ public partial class LevelGraphEditorLoader : UiLoaderTemplate
|
||||||
{
|
{
|
||||||
if (_nodeBinding.SaveOrLoadPanel != null)
|
if (_nodeBinding.SaveOrLoadPanel != null)
|
||||||
{
|
{
|
||||||
_nodeBinding.SaveOrLoadPanel.Visible = false;
|
_nodeBinding.SaveOrLoadPanel.Hide();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -399,7 +399,7 @@ public partial class LevelGraphEditorLoader : UiLoaderTemplate
|
||||||
{
|
{
|
||||||
if (_nodeBinding.SaveOrLoadPanel != null)
|
if (_nodeBinding.SaveOrLoadPanel != null)
|
||||||
{
|
{
|
||||||
_nodeBinding.SaveOrLoadPanel.Visible = true;
|
_nodeBinding.SaveOrLoadPanel.Show();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (_nodeBinding.ActionButton != null)
|
if (_nodeBinding.ActionButton != null)
|
||||||
|
@ -427,7 +427,7 @@ public partial class LevelGraphEditorLoader : UiLoaderTemplate
|
||||||
{
|
{
|
||||||
if (_nodeBinding.SaveOrLoadPanel != null)
|
if (_nodeBinding.SaveOrLoadPanel != null)
|
||||||
{
|
{
|
||||||
_nodeBinding.SaveOrLoadPanel.Visible = true;
|
_nodeBinding.SaveOrLoadPanel.Show();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (_nodeBinding.ActionButton != null)
|
if (_nodeBinding.ActionButton != null)
|
||||||
|
@ -716,17 +716,17 @@ public partial class LevelGraphEditorLoader : UiLoaderTemplate
|
||||||
{
|
{
|
||||||
if (_nodeBinding.GraphEdit != null)
|
if (_nodeBinding.GraphEdit != null)
|
||||||
{
|
{
|
||||||
_nodeBinding.GraphEdit.Visible = true;
|
_nodeBinding.GraphEdit.Show();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (_nodeBinding.CreateOrEditorPanel != null)
|
if (_nodeBinding.CreateOrEditorPanel != null)
|
||||||
{
|
{
|
||||||
_nodeBinding.CreateOrEditorPanel.Visible = false;
|
_nodeBinding.CreateOrEditorPanel.Hide();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (_nodeBinding.HBoxContainer != null)
|
if (_nodeBinding.HBoxContainer != null)
|
||||||
{
|
{
|
||||||
_nodeBinding.HBoxContainer.Visible = true;
|
_nodeBinding.HBoxContainer.Show();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -25,6 +25,7 @@ public partial class PlayerSpawn : Marker2D
|
||||||
{
|
{
|
||||||
if (GameSceneNodeHolder.Player != null)
|
if (GameSceneNodeHolder.Player != null)
|
||||||
{
|
{
|
||||||
|
GameSceneNodeHolder.Player.ProcessMode = ProcessModeEnum.Inherit;
|
||||||
GameSceneNodeHolder.Player.Position = GlobalPosition;
|
GameSceneNodeHolder.Player.Position = GlobalPosition;
|
||||||
GameSceneNodeHolder.Player.Revive(GameSceneNodeHolder.Player.MaxHp);
|
GameSceneNodeHolder.Player.Revive(GameSceneNodeHolder.Player.MaxHp);
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user