Fixed links
This commit is contained in:
parent
bdf02db5c8
commit
eb408a62bb
18 changed files with 40 additions and 42 deletions
|
|
@ -5,8 +5,8 @@ public partial class PrototypeWindow : AcceptDialog
|
|||
{
|
||||
public override void _Ready()
|
||||
{
|
||||
if (Utility.Splash) return;
|
||||
Utility.Splash = true;
|
||||
if (Settings.Splash) return;
|
||||
Settings.Splash = true;
|
||||
PopupCentered();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -22,15 +22,15 @@ public partial class ShovelButton : TextureButton
|
|||
|
||||
if (@event.IsActionPressed("primary_action") && ButtonPressed)
|
||||
{
|
||||
var checkedPosition = (PoolContainer.Instance.Plants.GetGlobalMousePosition() / Utility.Tile).Ceil() * Utility.Tile - new Vector2(20, 14);
|
||||
var checkedPosition = (PoolContainer.Instance.Plants.GetGlobalMousePosition() / FieldParams.Tile).Ceil() * FieldParams.Tile - new Vector2(20, 14);
|
||||
|
||||
for (int i = Utility.LayersCount - 1; i >= 0; i--)
|
||||
for (int i = FieldParams.LayersCount - 1; i >= 0; i--)
|
||||
{
|
||||
if (PoolContainer.Instance.EntityField[i].TryGetValue(checkedPosition, out var entity) && entity is RuntimePlantData plantData)
|
||||
{
|
||||
plantData.Kill();
|
||||
|
||||
PoolContainer.Instance.SpawnParticles(particles, plantData.GlobalPosition + Vector2.Down * Utility.TileHeight / 2.0f);
|
||||
PoolContainer.Instance.SpawnParticles(particles, plantData.GlobalPosition + Vector2.Down * FieldParams.TileHeight / 2.0f);
|
||||
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ public partial class ZombieLevelPreviewer : Node2D
|
|||
var spawned = zombie.Scene.Instantiate<RuntimeZombieData>();
|
||||
spawned.DisableBrain();
|
||||
AddChild(spawned);
|
||||
spawned.Position += new Vector2(rng_x*Utility.TileWidth, rng_y*Utility.TileHeight);
|
||||
spawned.Position += new Vector2(rng_x*FieldParams.TileWidth, rng_y*FieldParams.TileHeight);
|
||||
}
|
||||
}
|
||||
public List<ZombieResource> FindUnique()
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ public class ChoosableHandler : SeedpacketHandler, ISeedpacketPress
|
|||
|
||||
public void Pressed()
|
||||
{
|
||||
if (LevelGUIElements.Instance.SeedpacketsHotbar.GetChildCount() >= Utility.MaxSeedpackets) return;
|
||||
if (LevelGUIElements.Instance.SeedpacketsHotbar.GetChildCount() >= PlayerInfo.MaxSeedpackets) return;
|
||||
_owner.disablePacket = true;
|
||||
|
||||
var hotbarSeedpacket = Seedpacket.Prefab.Instantiate<Seedpacket>();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue