diff --git a/Characters/Character.cs b/Characters/Character.cs index e6c86ba..c7e4d86 100644 --- a/Characters/Character.cs +++ b/Characters/Character.cs @@ -212,7 +212,8 @@ namespace SupaLidlGame.Characters if (this.GetNode("HurtSound") is AudioStreamPlayer2D sound) { - sound.PlayOnRoot(); + // very small pitch deviation + sound.At(GlobalPosition).WithPitchDeviation(0.125f).Play(); } } } diff --git a/Characters/ExampleEnemy.tscn b/Characters/ExampleEnemy.tscn index 267652d..6654a4f 100644 --- a/Characters/ExampleEnemy.tscn +++ b/Characters/ExampleEnemy.tscn @@ -13,7 +13,7 @@ [sub_resource type="ShaderMaterial" id="ShaderMaterial_ms3xg"] shader = ExtResource("1_fx1w5") -shader_parameter/color = null +shader_parameter/color = Quaternion(1, 1, 1, 1) shader_parameter/intensity = 0.0 [sub_resource type="AtlasTexture" id="AtlasTexture_6d2tf"] @@ -46,12 +46,33 @@ region = Rect2(144, 0, 24, 24) [sub_resource type="SpriteFrames" id="SpriteFrames_4tm2b"] animations = [{ -"frames": [SubResource("AtlasTexture_6d2tf"), SubResource("AtlasTexture_bdyma")], +"frames": [{ +"duration": 1.0, +"texture": SubResource("AtlasTexture_6d2tf") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_bdyma") +}], "loop": true, "name": &"idle", "speed": 5.0 }, { -"frames": [SubResource("AtlasTexture_0dwbr"), SubResource("AtlasTexture_r7fn6"), SubResource("AtlasTexture_py8k0"), SubResource("AtlasTexture_g3nb2"), SubResource("AtlasTexture_jauql")], +"frames": [{ +"duration": 1.0, +"texture": SubResource("AtlasTexture_0dwbr") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_r7fn6") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_py8k0") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_g3nb2") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_jauql") +}], "loop": true, "name": &"move", "speed": 12.0 @@ -113,9 +134,8 @@ StateMachine = NodePath("StateMachine") Faction = 2 [node name="Sprite" type="AnimatedSprite2D" parent="."] -frames = SubResource("SpriteFrames_4tm2b") +sprite_frames = SubResource("SpriteFrames_4tm2b") animation = &"move" -playing = true [node name="CollisionShape2D" type="CollisionShape2D" parent="."] position = Vector2(0, 8) diff --git a/Characters/NPC.cs b/Characters/NPC.cs index 85f957b..164c4dd 100644 --- a/Characters/NPC.cs +++ b/Characters/NPC.cs @@ -277,17 +277,21 @@ namespace SupaLidlGame.Characters protected virtual void Think() { // TODO: the entity should wander if it doesn't find a best target - Vector2 pos = FindBestTarget().GlobalPosition; - Target = pos - GlobalPosition; - Vector2 dir = Target; - float dist = GlobalPosition.DistanceSquaredTo(pos); - UpdateWeights(pos); - - if (Target.LengthSquared() < 1024) + Character bestTarget = FindBestTarget(); + if (bestTarget is not null) { - if (Inventory.SelectedItem is Weapon weapon) + Vector2 pos = FindBestTarget().GlobalPosition; + Target = pos - GlobalPosition; + Vector2 dir = Target; + float dist = GlobalPosition.DistanceSquaredTo(pos); + UpdateWeights(pos); + + if (Target.LengthSquared() < 1024) { - UseCurrentItem(); + if (Inventory.SelectedItem is Weapon weapon) + { + UseCurrentItem(); + } } } } diff --git a/Characters/Player.cs b/Characters/Player.cs index 9c619be..81ecdb3 100644 --- a/Characters/Player.cs +++ b/Characters/Player.cs @@ -52,6 +52,7 @@ namespace SupaLidlGame.Characters public override void Stun(float time) { base.Stun(time); + Camera.Shake(2, 0.8f); // TODO: implement visual effects for stun } diff --git a/Characters/Player.tscn b/Characters/Player.tscn index 0adcac6..f119421 100644 --- a/Characters/Player.tscn +++ b/Characters/Player.tscn @@ -209,6 +209,7 @@ libraries = { [node name="HurtSound" type="AudioStreamPlayer2D" parent="."] stream = ExtResource("12_h0x0g") +max_distance = 64.0 [node name="AudioListener2D" type="AudioListener2D" parent="."] current = true diff --git a/Entities/Campfire.tscn b/Entities/Campfire.tscn index 2ef7afc..013222b 100644 --- a/Entities/Campfire.tscn +++ b/Entities/Campfire.tscn @@ -26,12 +26,27 @@ region = Rect2(64, 0, 16, 16) [sub_resource type="SpriteFrames" id="SpriteFrames_o6lfi"] animations = [{ -"frames": [SubResource("AtlasTexture_68qj1"), SubResource("AtlasTexture_rt0be"), SubResource("AtlasTexture_0embb"), SubResource("AtlasTexture_victi")], +"frames": [{ +"duration": 1.0, +"texture": SubResource("AtlasTexture_68qj1") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_rt0be") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_0embb") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_victi") +}], "loop": true, "name": &"active", "speed": 5.0 }, { -"frames": [SubResource("AtlasTexture_jg745")], +"frames": [{ +"duration": 1.0, +"texture": SubResource("AtlasTexture_jg745") +}], "loop": true, "name": &"default", "speed": 8.0 @@ -46,9 +61,8 @@ position = Vector2(0, -8) script = ExtResource("1_w4gfp") [node name="Sprite2D" type="AnimatedSprite2D" parent="."] -frames = SubResource("SpriteFrames_o6lfi") +sprite_frames = SubResource("SpriteFrames_o6lfi") animation = &"active" -playing = true [node name="PointLight2D" type="PointLight2D" parent="."] color = Color(0.976471, 0.564706, 0.168627, 1) diff --git a/Extensions/AudioStreamPlayer2D.cs b/Extensions/AudioStreamPlayer2D.cs index a8b4e02..0daa21a 100644 --- a/Extensions/AudioStreamPlayer2D.cs +++ b/Extensions/AudioStreamPlayer2D.cs @@ -1,24 +1,83 @@ using Godot; +using System; +using SupaLidlGame.Utils; -namespace SupaLidlGame +namespace SupaLidlGame.Extensions { public static class AudioStreamPlayer2DExtensions { - public static void PlayOn(this AudioStreamPlayer2D audio, Node parent) + public static AudioBuilder Derive(this AudioStreamPlayer2D audio) { var clone = audio.Duplicate() as AudioStreamPlayer2D; - parent.AddChild(clone); - clone.Play(); clone.Finished += () => { clone.QueueFree(); }; + return new AudioBuilder(clone); } - public static void PlayOnRoot(this AudioStreamPlayer2D audio) + public static AudioStreamPlayer2D Clone( + this AudioStreamPlayer2D audio) { - var root = audio.GetTree().Root.GetChild(0); - audio.PlayOn(root); + var clone = audio.Duplicate() as AudioStreamPlayer2D; + clone.Finished += () => + { + clone.QueueFree(); + }; + return clone; + } + + public static AudioStreamPlayer2D On( + this AudioStreamPlayer2D audio, + Node parent) + { + var clone = audio.Clone(); + parent.AddChild(clone); + clone.GlobalPosition = audio.GlobalPosition; + return clone; + } + + public static AudioStreamPlayer2D OnWorld( + this AudioStreamPlayer2D audio) + { + var world = audio.GetTree().Root.GetNode("World/TileMap"); + if (world is null) + { + throw new NullReferenceException("World does not exist"); + } + var clone = audio.On(world); + clone.GlobalPosition = audio.GlobalPosition; + return clone; + } + + public static AudioStreamPlayer2D At( + this AudioStreamPlayer2D audio, + Vector2 globalPosition) + { + var world = audio.GetTree().Root.GetNode("World/TileMap"); + if (world is null) + { + throw new NullReferenceException("World does not exist"); + } + + var parent = new Node2D(); + world.AddChild(parent); + parent.GlobalPosition = globalPosition; + + var clone = audio.On(world); + clone.Finished += () => + { + parent.QueueFree(); + }; + return clone; + } + + public static AudioStreamPlayer2D WithPitchDeviation( + this AudioStreamPlayer2D audio, + float deviation) + { + audio.PitchScale = (float)GD.Randfn(audio.PitchScale, deviation); + return audio; } } } diff --git a/Extensions/Vector2.cs b/Extensions/Vector2.cs index e480eb9..070b22e 100644 --- a/Extensions/Vector2.cs +++ b/Extensions/Vector2.cs @@ -25,6 +25,9 @@ namespace SupaLidlGame.Extensions return new Vector2(x / length, y / length); } + /// + /// Returns this vector 90 degrees counter clockwise (x, y) -> (-y, x) + /// public static Vector2 Counterclockwise90(this Vector2 vector) { return new Vector2(-vector.Y, vector.X); diff --git a/Items/Inventory.cs b/Items/Inventory.cs index bee0019..55f787d 100644 --- a/Items/Inventory.cs +++ b/Items/Inventory.cs @@ -14,30 +14,57 @@ namespace SupaLidlGame.Items private Item _selectedItem; + private Item _offhandItem; + public Item SelectedItem { get => _selectedItem; - set + set => EquipItem(value, ref _selectedItem); + } + + public Item OffhandItem + { + get => _selectedItem; + set => EquipItem(value, ref _offhandItem); + } + + private bool EquipItem(Item item, ref Item slot) + { + if (item is not null && item.IsOneHanded) { - if (!Items.Contains(value)) + // we can not equip this if either hand is occupied by + // two-handed item + + if (_selectedItem is not null && !_selectedItem.IsOneHanded) { - GD.PrintErr("Tried to equip an item not in the inventory."); - return; + return false; } - if (_selectedItem is not null) + if (_offhandItem is not null && !_offhandItem.IsOneHanded) { - _selectedItem.Unequip(Character); - } - - _selectedItem = value; - - // this is to handle if item was manually unequipped - if (_selectedItem is not null) - { - _selectedItem.Equip(Character); + return false; } } + + if (!Items.Contains(item)) + { + GD.PrintErr("Tried to equip an item not in the inventory."); + return false; + } + + if (slot is not null) + { + slot.Unequip(Character); + } + + slot = item; + + if (item is not null) + { + item.Equip(Character); + } + + return true; } public Item AddItem(Item item) @@ -57,6 +84,7 @@ namespace SupaLidlGame.Items { item.CharacterOwner = null; item.Visible = true; + var e = SelectedItem = item; throw new System.NotImplementedException(); } diff --git a/Items/Item.cs b/Items/Item.cs index 63cc101..db7078e 100644 --- a/Items/Item.cs +++ b/Items/Item.cs @@ -12,30 +12,32 @@ namespace SupaLidlGame.Items public string Description { get; set; } [Export] - public int StackSize { get; set; } + public bool CanStack { get; set; } = false; public int Count { get; set; } = 1; public Character CharacterOwner { get; set; } + public bool IsOneHanded { get; set; } = false; + /// - /// Determines if this item can stack with other items + /// Determines if this item can directly stack with other items /// public virtual bool StacksWith(Item item) { + if (!CanStack) + { + return false; + } + if (ItemName != item.ItemName) { return false; } - if (Count + item.Count <= StackSize) - { - return true; - } - // several more conditions may be added soon - return false; + return true; } public abstract void Equip(Character character); diff --git a/Items/Weapons/Sword.cs b/Items/Weapons/Sword.cs index fc6856f..d618958 100644 --- a/Items/Weapons/Sword.cs +++ b/Items/Weapons/Sword.cs @@ -139,7 +139,7 @@ namespace SupaLidlGame.Items.Weapons IsParried = true; AnimationPlayer.SpeedScale = 0.25f; Character.Stun(1.5f); - GetNode("ParrySound").PlayOnRoot(); + GetNode("ParrySound").OnWorld().Play(); } } //this.GetAncestor().AddChild(instance); diff --git a/Items/Weapons/Sword.tscn b/Items/Weapons/Sword.tscn index b911951..1790005 100644 --- a/Items/Weapons/Sword.tscn +++ b/Items/Weapons/Sword.tscn @@ -323,7 +323,7 @@ texture = ExtResource("2_rnfo4") position = Vector2(-0.221825, -3.12132) rotation = 0.785398 emitting = false -amount = 12 +amount = 24 lifetime = 0.4 one_shot = true explosiveness = 1.0 @@ -365,9 +365,11 @@ texture = ExtResource("5_pywek") hframes = 4 [node name="SwingSound" type="AudioStreamPlayer2D" parent="."] +max_distance = 256.0 [node name="ParrySound" type="AudioStreamPlayer2D" parent="."] stream = ExtResource("6_8nxjm") +max_distance = 256.0 [connection signal="Hit" from="Hitbox" to="." method="_on_hitbox_hit"] diff --git a/Scenes/Level.tscn b/Scenes/Level.tscn index ccd3ce4..b7d1ce6 100644 --- a/Scenes/Level.tscn +++ b/Scenes/Level.tscn @@ -1141,36 +1141,37 @@ layer_3/y_sort_origin = 0 layer_3/z_index = -2 layer_3/tile_data = PackedInt32Array(-458765, 393216, 1, -393229, 327680, 0, -393228, 393216, 0, -327692, 393216, 0, -262156, 327680, 1, -262155, 393216, 1, -196619, 327680, 1, -196618, 327680, 1, -131082, 393216, 0, -131081, 393216, 1, -131080, 327680, 1, -131079, 327680, 0, -131078, 393216, 0, -196614, 327680, 0, -262150, 327680, 0, -327687, 327680, 1, -393223, 327680, 1, -393224, 393216, 1, -458764, 327680, 0, -458763, 393216, 0, -458762, 327680, 1, -458761, 327680, 0, -458760, 327680, 1, -458759, 327680, 1, -524294, 327680, 1, -524293, 327680, 1, -524292, 327680, 1, -524291, 393216, 1, -524290, 393216, 1, -524289, 327680, 1, -589824, 327680, 0, -589823, 393216, 0, -589822, 327680, 1, -589821, 393216, 0, -589820, 393216, 1, -589819, 327680, 1, -524301, 327680, 0, -589811, 327680, 0, -589812, 327680, 0, -589813, 393216, 1, -589817, 327680, 0, -589818, 327680, 1, -589814, 393216, 0, -589815, 393216, 0, -589816, 327680, 0, -524295, 393216, 0, -524296, 393216, 0, -524297, 393216, 1, -524298, 327680, 0, -524299, 327680, 1, -524300, 327680, 1, -327693, 393216, 1, -262157, 327680, 1, -196621, 393216, 0, -131085, 327680, 0, -65549, 327680, 0, -13, 327680, 0, 65523, 327680, 0, 131059, 327680, 0, 196595, 327680, 1, 262131, 393216, 0, 327667, 327680, 0, 393203, 393216, 1, 458739, 327680, 1, 458740, 327680, 0, 458741, 393216, 1, 458742, 327680, 0, 458743, 327680, 0, 458744, 327680, 0, 458745, 393216, 1, 458746, 327680, 1, 458747, 327680, 0, 458748, 327680, 0, 458749, 327680, 0, 458750, 393216, 0, 458751, 327680, 0, 393216, 327680, 1, 393217, 327680, 0, 393218, 327680, 0, 393219, 393216, 1, 393220, 327680, 1, 393221, 327680, 1, 393222, 327680, 1, 393223, 393216, 0, 393224, 393216, 1, 393225, 327680, 0, 393226, 327680, 0, 393227, 393216, 0, 393228, 327680, 1, 393229, 327680, 1, -524275, 393216, 0, -458739, 327680, 1, -393203, 327680, 1, -327667, 393216, 0, -262131, 327680, 0, -196595, 327680, 1, -131059, 327680, 0, -65523, 393216, 0, 13, 393216, 1, 65549, 393216, 0, 131085, 393216, 0, 196621, 327680, 0, 262157, 393216, 0, 327693, 393216, 1, -327689, 393216, 1, -327688, 327680, 1, -393225, 393216, 1, -393226, 327680, 1, -393227, 327680, 1, -327691, 393216, 0, -327690, 393216, 1, -262154, 393216, 1, -262153, 327680, 1, -262152, 327680, 0, -196616, 393216, 1, -262151, 327680, 0, -196617, 327680, 0, -196615, 393216, 0, -262145, 327680, 1, -65538, 327680, 1, -2, 327680, 1, -1, 327680, 1, 65535, 327680, 0, 131071, 393216, 0, -196620, 327680, 1, -131084, 327680, 1, -65548, 393216, 0, -12, 327680, 1, -11, 327680, 0, 65525, 327680, 0, 131061, 327680, 0, 131060, 327680, 0, 196596, 327680, 1, 262132, 327680, 1, 327668, 327680, 1, 393204, 327680, 0, -65547, 327680, 1, -65546, 393216, 1, 65524, 393216, 0, -131083, 327680, 1, -10, 327680, 0, 196597, 327680, 0, 262133, 327680, 1, 262134, 327680, 0, 327670, 393216, 1, 393206, 327680, 0, 393205, 327680, 0, 327669, 327680, 1, 327671, 327680, 1, 327672, 327680, 0, 327673, 327680, 1, 327674, 327680, 1, 327675, 327680, 1, 327676, 327680, 1, 393212, 327680, 0, 393213, 327680, 0, 393214, 327680, 0, 393215, 327680, 0, 327680, 327680, 0, 393211, 327680, 0, 393210, 327680, 0, 393209, 327680, 0, 393208, 393216, 0, 393207, 327680, 1, 327677, 327680, 1, 327678, 393216, 0, 327679, 327680, 1, 262144, 327680, 0, 262145, 327680, 1, 262146, 327680, 0, 262147, 327680, 0, 262148, 327680, 0, 262149, 393216, 0, 327685, 393216, 1, 327684, 393216, 0, 327683, 327680, 0, 327682, 327680, 0, 327681, 327680, 0, 327686, 393216, 0, 327687, 393216, 1, 327688, 327680, 0, 262153, 393216, 0, 262154, 393216, 1, 262155, 327680, 1, 262156, 393216, 1, 327692, 393216, 1, 327691, 327680, 1, 327690, 327680, 1, 327689, 393216, 1, 262152, 327680, 1, 262151, 393216, 1, 262150, 327680, 0, 196615, 327680, 0, 196614, 327680, 0, 196613, 327680, 0, 196612, 327680, 0, 196611, 327680, 0, 196610, 327680, 0, 196609, 327680, 0, 196608, 327680, 0, 262143, 327680, 0, 196606, 327680, 0, 196605, 327680, 0, 196604, 327680, 1, 196603, 393216, 1, 196602, 327680, 1, 131066, 393216, 1, 131065, 327680, 1, 131064, 327680, 0, 65528, 327680, 0, 65527, 327680, 0, -9, 327680, 0, 65526, 327680, 0, 131062, 327680, 1, 131063, 327680, 0, 196599, 393216, 0, 196598, 327680, 1, 196600, 327680, 0, 196601, 393216, 0, 262139, 327680, 0, 262140, 327680, 0, 262141, 393216, 0, 262142, 327680, 0, 262138, 327680, 1, 262137, 393216, 1, 262136, 327680, 1, 262135, 393216, 0, 65529, 327680, 0, -7, 327680, 0, -65543, 327680, 0, -65544, 327680, 1, -65545, 327680, 0, -8, 327680, 0, -65542, 327680, 1, -65541, 393216, 0, -65540, 327680, 0, -6, 327680, 0, -5, 393216, 0, -65539, 393216, 1, -131074, 327680, 1, 65533, 327680, 0, 131068, 393216, 1, 131067, 327680, 1, 65532, 327680, 0, -3, 327680, 0, 131069, 327680, 0, 131070, 327680, 0, 65536, 327680, 1, 65537, 327680, 0, 65538, 327680, 0, 3, 327680, 1, -65534, 327680, 1, -131070, 327680, 0, -196607, 327680, 0, -196608, 327680, 1, -131073, 327680, 1, -131075, 327680, 0, -131076, 393216, 1, -131077, 393216, 0, 65531, 327680, 0, 196607, 327680, 1, 131072, 393216, 0, 131073, 327680, 1, 131074, 393216, 1, 131075, 327680, 1, 131076, 327680, 1, 65534, 327680, 0, -65536, 393216, 1, -131071, 327680, 1, -196606, 327680, 0, -131072, 327680, 1, -65537, 327680, 0, -4, 327680, 1, -262149, 327680, 0, -327685, 327680, 0, -393221, 393216, 0, -196613, 393216, 0, 65530, 327680, 0, -327686, 393216, 1, -393222, 393216, 1, -458757, 327680, 1, -458756, 393216, 0, -458755, 327680, 1, -458754, 393216, 1, -458753, 393216, 1, -458758, 327680, 0, -524288, 327680, 0, -524287, 327680, 1, -524286, 393216, 1, -524285, 393216, 0, -524284, 393216, 1, -524283, 327680, 0, -524282, 393216, 0, -524281, 393216, 1, -524280, 327680, 0, -524279, 393216, 1, -524278, 393216, 1, -524277, 393216, 1, -524276, 327680, 1, -458740, 393216, 0, -458741, 393216, 1, -458742, 327680, 0, -458743, 393216, 1, -458744, 393216, 1, -458745, 393216, 0, -458746, 393216, 1, -393211, 393216, 0, -393212, 327680, 0, -393213, 393216, 1, -393214, 327680, 0, -393215, 393216, 1, -393216, 393216, 1, -327681, 393216, 1, -327682, 327680, 1, -327683, 327680, 0, -327684, 327680, 0, -458748, 327680, 1, -458749, 327680, 1, -458750, 393216, 1, -458751, 327680, 0, -458752, 327680, 1, -393217, 327680, 1, -393218, 393216, 1, -393219, 393216, 1, -393220, 393216, 0, -458747, 327680, 1, -262148, 327680, 0, -262147, 393216, 0, -262146, 327680, 1, -327680, 393216, 0, -262143, 327680, 1, -262142, 393216, 1, -262141, 327680, 0, -262140, 393216, 1, -262144, 327680, 0, -196609, 327680, 0, -196610, 327680, 1, -196611, 327680, 1, -196612, 327680, 0, -327679, 327680, 0, -327678, 327680, 1, -327677, 327680, 1, -327676, 393216, 0, -327675, 327680, 1, -327674, 327680, 1, -393209, 327680, 0, -393210, 393216, 1, -393208, 393216, 1, -327673, 327680, 1, -262137, 393216, 1, -196602, 327680, 0, -131067, 327680, 0, -131068, 393216, 1, -65532, 327680, 0, -65533, 393216, 0, -131069, 327680, 0, -196605, 393216, 1, -196604, 327680, 1, -65535, 327680, 1, 0, 327680, 1, 2, 327680, 1, 65539, 327680, 1, 1, 327680, 1, -196603, 327680, 0, -262138, 327680, 1, -262139, 327680, 1, -327672, 327680, 1, -393207, 393216, 0, -393206, 393216, 1, -327670, 393216, 1, -262135, 393216, 1, -196599, 393216, 1, -196600, 393216, 1, -131064, 327680, 1, -131065, 327680, 1, -65529, 393216, 0, -65530, 393216, 0, -65531, 327680, 0, 5, 327680, 0, 4, 327680, 0, 65540, 327680, 0, 131077, 327680, 0, 131078, 327680, 1, 131079, 327680, 1, 65544, 327680, 1, 8, 327680, 0, -65528, 327680, 0, -327671, 393216, 0, 6, 327680, 0, -131066, 327680, 1, -196601, 327680, 1, -262136, 327680, 1, 65541, 327680, 1, 65542, 327680, 1, 7, 327680, 0, 65543, 327680, 1, 131080, 327680, 0, 131081, 393216, 0, 196617, 327680, 0, 196616, 327680, 0, 196618, 327680, 0, 131082, 327680, 0, 131083, 393216, 0, 131084, 393216, 1, 196620, 327680, 1, 196619, 327680, 1, 65547, 327680, 1, 11, 327680, 1, -65526, 327680, 0, -131062, 393216, 1, -131063, 327680, 1, -65527, 327680, 0, 9, 327680, 0, 65545, 327680, 1, 65546, 327680, 1, 10, 393216, 1, -196598, 393216, 0, -262134, 393216, 0, -327669, 393216, 0, -262133, 393216, 0, -196597, 393216, 1, -131061, 327680, 0, -65525, 327680, 1, -393205, 327680, 0, -327668, 393216, 0, -262132, 327680, 1, -196596, 393216, 1, -131060, 327680, 0, -65524, 393216, 1, 12, 393216, 0, -393204, 327680, 1, 65548, 327680, 1, -262158, 327680, 0, -196622, 327680, 0, -131086, 327680, 0, -65550, 327680, 0, -14, 327680, 0, 65522, 327680, 0, 131058, 327680, 0, 196594, 327680, 0, 262130, 327680, 0, 327666, 327680, 0, 393202, 327680, 0, 458738, 327680, 0, -589810, 327680, 0, -524274, 327680, 0, -458738, 327680, 0, -393202, 327680, 0, -327666, 327680, 0, -262130, 327680, 0, -196594, 327680, 0, -131058, 327680, 0, -65522, 327680, 0, 14, 327680, 0, 65550, 327680, 0, 131086, 327680, 0, 196622, 327680, 0, 262158, 327680, 0, 327694, 327680, 0, 393230, 327680, 0, 524274, 327680, 0, 524275, 327680, 0, 524276, 327680, 0, 524277, 327680, 0, 524278, 327680, 0, 524279, 327680, 0, 524280, 327680, 0, 524281, 327680, 0, 524282, 327680, 0, 524283, 327680, 0, 524284, 327680, 0, 524285, 327680, 0, 524286, 327680, 0, 524287, 327680, 0, 458752, 327680, 0, 458753, 327680, 0, 458754, 327680, 0, 458755, 327680, 0, 458756, 327680, 0, 458757, 327680, 0, 458758, 327680, 0, 458759, 327680, 0, 458760, 327680, 0, 458761, 327680, 0, 458762, 327680, 0, 458763, 327680, 0, 458764, 327680, 0, 458765, 327680, 0, 458766, 327680, 0) -[node name="Player" parent="TileMap" instance=ExtResource("1_m35hr")] -position = Vector2(-81, -34) -motion_mode = 1 - -[node name="ExampleEnemy" parent="TileMap" instance=ExtResource("2_uti3y")] -position = Vector2(38, 42) -scale = Vector2(1.00571, 1) - -[node name="ExampleEnemy2" parent="TileMap" instance=ExtResource("2_uti3y")] -position = Vector2(190, 99) -scale = Vector2(1.00571, 1) - -[node name="ExampleEnemy3" parent="TileMap" instance=ExtResource("2_uti3y")] -position = Vector2(175, 2) -scale = Vector2(1.00571, 1) - -[node name="ExampleEnemy4" parent="TileMap" instance=ExtResource("2_uti3y")] -position = Vector2(-139, -39) -scale = Vector2(1.00571, 1) -Faction = 1 - -[node name="ExampleEnemy5" parent="TileMap" instance=ExtResource("2_uti3y")] -position = Vector2(-144, 62) -scale = Vector2(1.00571, 1) -Faction = 1 - -[node name="Spawners" type="Node2D" parent="TileMap"] - [node name="Campfire" parent="TileMap" instance=ExtResource("4_6awvs")] position = Vector2(-168, 24) [node name="CanvasModulate" type="CanvasModulate" parent="TileMap"] -color = Color(0.521569, 0.443137, 0.431373, 1) + +[node name="Entities" type="Node2D" parent="TileMap"] + +[node name="Player" parent="TileMap/Entities" instance=ExtResource("1_m35hr")] +position = Vector2(-81, -34) +motion_mode = 1 + +[node name="ExampleEnemy" parent="TileMap/Entities" instance=ExtResource("2_uti3y")] +position = Vector2(38, 42) +scale = Vector2(1.00571, 1) + +[node name="ExampleEnemy2" parent="TileMap/Entities" instance=ExtResource("2_uti3y")] +position = Vector2(190, 99) +scale = Vector2(1.00571, 1) + +[node name="ExampleEnemy3" parent="TileMap/Entities" instance=ExtResource("2_uti3y")] +position = Vector2(175, 2) +scale = Vector2(1.00571, 1) + +[node name="ExampleEnemy4" parent="TileMap/Entities" instance=ExtResource("2_uti3y")] +position = Vector2(-139, -39) +scale = Vector2(1.00571, 1) +Faction = 1 + +[node name="ExampleEnemy5" parent="TileMap/Entities" instance=ExtResource("2_uti3y")] +position = Vector2(-144, 62) +scale = Vector2(1.00571, 1) +Faction = 1 + +[node name="Spawners" type="Node2D" parent="TileMap/Entities"]