💄 Update textures and visual effects

This commit is contained in:
2025-08-28 21:41:26 +08:00
parent 19f7243101
commit af31914ada
12 changed files with 27 additions and 18 deletions

View File

@@ -37,8 +37,8 @@
"allowedRotations": [0], "allowedRotations": [0],
"layer": 0 "layer": 0
}, },
"stone_iron": { "ore_iron": {
"scene": "res://Scenes/Tiles/StoneIronTile.tscn", "scene": "res://Scenes/Tiles/OreIronTile.tscn",
"cost": {}, "cost": {},
"durability": 200, "durability": 200,
"buildTime": 0.0, "buildTime": 0.0,

View File

@@ -5,6 +5,7 @@
[node name="Player" type="CharacterBody2D"] [node name="Player" type="CharacterBody2D"]
script = ExtResource("1_08t41") script = ExtResource("1_08t41")
MaxZoom = 5.0
[node name="Sprite2D" type="Sprite2D" parent="."] [node name="Sprite2D" type="Sprite2D" parent="."]
rotation = 1.5708 rotation = 1.5708

Binary file not shown.

Before

Width:  |  Height:  |  Size: 486 KiB

After

Width:  |  Height:  |  Size: 367 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 436 KiB

View File

@@ -3,15 +3,15 @@
importer="texture" importer="texture"
type="CompressedTexture2D" type="CompressedTexture2D"
uid="uid://c3qdue55e6blv" uid="uid://c3qdue55e6blv"
path="res://.godot/imported/StoneIronTile.png-a3d6be6bb8b8b8a0f32242e23f1c00ca.ctex" path="res://.godot/imported/OreIronTile.png-68726be1be21a3f84cf7d705e1a39b0d.ctex"
metadata={ metadata={
"vram_texture": false "vram_texture": false
} }
[deps] [deps]
source_file="res://Scenes/Tiles/StoneIronTile.png" source_file="res://Scenes/Tiles/OreIronTile.png"
dest_files=["res://.godot/imported/StoneIronTile.png-a3d6be6bb8b8b8a0f32242e23f1c00ca.ctex"] dest_files=["res://.godot/imported/OreIronTile.png-68726be1be21a3f84cf7d705e1a39b0d.ctex"]
[params] [params]

View File

@@ -1,24 +1,26 @@
[gd_scene load_steps=4 format=3 uid="uid://dnkcl5ucmip40"] [gd_scene load_steps=4 format=3 uid="uid://dnkcl5ucmip40"]
[ext_resource type="Script" uid="uid://dh0jdeplrigxu" path="res://Scripts/Tiles/GroundTile.cs" id="1_ewklp"] [ext_resource type="Script" uid="uid://dh0jdeplrigxu" path="res://Scripts/Tiles/GroundTile.cs" id="1_exnim"]
[ext_resource type="Texture2D" uid="uid://c3qdue55e6blv" path="res://Scenes/Tiles/StoneIronTile.png" id="2_ewklp"] [ext_resource type="Texture2D" uid="uid://c3qdue55e6blv" path="res://Scenes/Tiles/OreIronTile.png" id="2_7v0w1"]
[sub_resource type="RectangleShape2D" id="RectangleShape2D_8o613"] [sub_resource type="RectangleShape2D" id="RectangleShape2D_8o613"]
size = Vector2(54, 54) size = Vector2(54, 54)
[node name="StoneIronTile" type="StaticBody2D"] [node name="OreIronTile" type="StaticBody2D"]
collision_layer = 0 collision_layer = 0
script = ExtResource("1_ewklp") script = ExtResource("1_exnim")
TileId = "stone_iron" TileId = "stone_iron"
[node name="Sprite2D" type="Sprite2D" parent="."] [node name="Sprite2D" type="Sprite2D" parent="."]
scale = Vector2(0.1, 0.1) position = Vector2(1.49012e-08, -9.53674e-07)
texture = ExtResource("2_ewklp") scale = Vector2(0.0983607, 0.0981818)
texture = ExtResource("2_7v0w1")
[node name="CollisionShape2D" type="CollisionShape2D" parent="."] [node name="CollisionShape2D" type="CollisionShape2D" parent="."]
shape = SubResource("RectangleShape2D_8o613") shape = SubResource("RectangleShape2D_8o613")
[node name="ProgressOverlay" type="ColorRect" parent="."] [node name="ProgressOverlay" type="ColorRect" parent="."]
visible = false
offset_left = -27.0 offset_left = -27.0
offset_top = -27.0 offset_top = -27.0
offset_right = 27.0 offset_right = 27.0

Binary file not shown.

Before

Width:  |  Height:  |  Size: 474 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 590 KiB

After

Width:  |  Height:  |  Size: 558 KiB

View File

@@ -12,13 +12,15 @@ script = ExtResource("1_rndy8")
TileId = "stone" TileId = "stone"
[node name="Sprite2D" type="Sprite2D" parent="."] [node name="Sprite2D" type="Sprite2D" parent="."]
scale = Vector2(0.1, 0.1) position = Vector2(1.01328e-06, 1.01328e-06)
scale = Vector2(0.0976562, 0.0976562)
texture = ExtResource("2_rndy8") texture = ExtResource("2_rndy8")
[node name="CollisionShape2D" type="CollisionShape2D" parent="."] [node name="CollisionShape2D" type="CollisionShape2D" parent="."]
shape = SubResource("RectangleShape2D_8o613") shape = SubResource("RectangleShape2D_8o613")
[node name="ProgressOverlay" type="ColorRect" parent="."] [node name="ProgressOverlay" type="ColorRect" parent="."]
visible = false
offset_left = -27.0 offset_left = -27.0
offset_top = -27.0 offset_top = -27.0
offset_right = 27.0 offset_right = 27.0

View File

@@ -71,7 +71,7 @@ public partial class NaturalResourceGenerator : Node2D
if (_rng.Randf() < IronDensity) if (_rng.Randf() < IronDensity)
{ {
var veinSize = _rng.RandiRange(MinIronVeinSize, MaxIronVeinSize); var veinSize = _rng.RandiRange(MinIronVeinSize, MaxIronVeinSize);
PlaceVein(stoneCell, "stone_iron", veinSize, _ironTiles); PlaceVein(stoneCell, "ore_iron", veinSize, _ironTiles);
} }
} }
} }
@@ -93,10 +93,10 @@ public partial class NaturalResourceGenerator : Node2D
switch (tileType) switch (tileType)
{ {
// For iron, make sure we're placing on stone // For iron, make sure we're placing on stone
case "stone_iron" when !_stoneTiles.Contains(cell): case "ore_iron" when !_stoneTiles.Contains(cell):
continue; continue;
// Remove from previous layer if needed // Remove from previous layer if needed
case "stone_iron" when _stoneTiles.Contains(cell): case "ore_iron" when _stoneTiles.Contains(cell):
_stoneTiles.Remove(cell); _stoneTiles.Remove(cell);
break; break;
case "stone" when _groundTiles.Contains(cell): case "stone" when _groundTiles.Contains(cell):

View File

@@ -9,8 +9,6 @@ public partial class BaseTile : Node2D
{ {
[Export] public string TileId { get; set; } [Export] public string TileId { get; set; }
public BuildingData TileData { get; set; }
private CollisionShape2D _collisionShape; private CollisionShape2D _collisionShape;
private Sprite2D _sprite; private Sprite2D _sprite;
private ColorRect _progressOverlay; private ColorRect _progressOverlay;

View File

@@ -4,5 +4,11 @@ namespace AceFieldNewHorizon.Scripts.Tiles;
public partial class GroundTile : BaseTile public partial class GroundTile : BaseTile
{ {
public override void _Ready()
{
var sprite = GetNode<Sprite2D>("Sprite2D");
sprite.Modulate = new Color(0.75f, 0.75f, 0.75f); // Makes the sprite 25% darker
base._Ready();
}
} }