✨ Merge stack
💫 Better miner tile vfx
This commit is contained in:
@@ -40,11 +40,12 @@ public partial class MinerTile : BaseTile
|
||||
itemPickup.Quantity = 1;
|
||||
|
||||
// Initial position (slightly below the spawn point)
|
||||
const int halfTileSize = GridUtils.TileSize / 2;
|
||||
var spawnPosition = GridUtils.GridToWorld(_gridPosition);
|
||||
var targetY = spawnPosition.Y - 27f; // Target Y position
|
||||
var targetX = spawnPosition.X + 27f + (GD.Randf() * 10f - 5f);
|
||||
var targetY = spawnPosition.Y - halfTileSize; // Target Y position
|
||||
var targetX = spawnPosition.X + halfTileSize + (GD.Randf() * 10f - 5f);
|
||||
itemPickup.Position =
|
||||
new Vector2(spawnPosition.X + 27f, spawnPosition.Y + 16); // Start below
|
||||
new Vector2(spawnPosition.X + halfTileSize, spawnPosition.Y + 16); // Start below
|
||||
itemPickup.Scale = Vector2.Zero; // Start invisible
|
||||
|
||||
// Add to the scene
|
||||
|
Reference in New Issue
Block a user