💄 Update textures and visual effects
This commit is contained in:
@@ -37,8 +37,8 @@
|
||||
"allowedRotations": [0],
|
||||
"layer": 0
|
||||
},
|
||||
"stone_iron": {
|
||||
"scene": "res://Scenes/Tiles/StoneIronTile.tscn",
|
||||
"ore_iron": {
|
||||
"scene": "res://Scenes/Tiles/OreIronTile.tscn",
|
||||
"cost": {},
|
||||
"durability": 200,
|
||||
"buildTime": 0.0,
|
||||
|
@@ -5,6 +5,7 @@
|
||||
|
||||
[node name="Player" type="CharacterBody2D"]
|
||||
script = ExtResource("1_08t41")
|
||||
MaxZoom = 5.0
|
||||
|
||||
[node name="Sprite2D" type="Sprite2D" parent="."]
|
||||
rotation = 1.5708
|
||||
|
Binary file not shown.
Before Width: | Height: | Size: 486 KiB After Width: | Height: | Size: 367 KiB |
BIN
Scenes/Tiles/OreIronTile.png
Normal file
BIN
Scenes/Tiles/OreIronTile.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 436 KiB |
@@ -3,15 +3,15 @@
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://c3qdue55e6blv"
|
||||
path="res://.godot/imported/StoneIronTile.png-a3d6be6bb8b8b8a0f32242e23f1c00ca.ctex"
|
||||
path="res://.godot/imported/OreIronTile.png-68726be1be21a3f84cf7d705e1a39b0d.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://Scenes/Tiles/StoneIronTile.png"
|
||||
dest_files=["res://.godot/imported/StoneIronTile.png-a3d6be6bb8b8b8a0f32242e23f1c00ca.ctex"]
|
||||
source_file="res://Scenes/Tiles/OreIronTile.png"
|
||||
dest_files=["res://.godot/imported/OreIronTile.png-68726be1be21a3f84cf7d705e1a39b0d.ctex"]
|
||||
|
||||
[params]
|
||||
|
@@ -1,24 +1,26 @@
|
||||
[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="Texture2D" uid="uid://c3qdue55e6blv" path="res://Scenes/Tiles/StoneIronTile.png" id="2_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/OreIronTile.png" id="2_7v0w1"]
|
||||
|
||||
[sub_resource type="RectangleShape2D" id="RectangleShape2D_8o613"]
|
||||
size = Vector2(54, 54)
|
||||
|
||||
[node name="StoneIronTile" type="StaticBody2D"]
|
||||
[node name="OreIronTile" type="StaticBody2D"]
|
||||
collision_layer = 0
|
||||
script = ExtResource("1_ewklp")
|
||||
script = ExtResource("1_exnim")
|
||||
TileId = "stone_iron"
|
||||
|
||||
[node name="Sprite2D" type="Sprite2D" parent="."]
|
||||
scale = Vector2(0.1, 0.1)
|
||||
texture = ExtResource("2_ewklp")
|
||||
position = Vector2(1.49012e-08, -9.53674e-07)
|
||||
scale = Vector2(0.0983607, 0.0981818)
|
||||
texture = ExtResource("2_7v0w1")
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
|
||||
shape = SubResource("RectangleShape2D_8o613")
|
||||
|
||||
[node name="ProgressOverlay" type="ColorRect" parent="."]
|
||||
visible = false
|
||||
offset_left = -27.0
|
||||
offset_top = -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 |
@@ -12,13 +12,15 @@ script = ExtResource("1_rndy8")
|
||||
TileId = "stone"
|
||||
|
||||
[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")
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
|
||||
shape = SubResource("RectangleShape2D_8o613")
|
||||
|
||||
[node name="ProgressOverlay" type="ColorRect" parent="."]
|
||||
visible = false
|
||||
offset_left = -27.0
|
||||
offset_top = -27.0
|
||||
offset_right = 27.0
|
||||
|
@@ -71,7 +71,7 @@ public partial class NaturalResourceGenerator : Node2D
|
||||
if (_rng.Randf() < IronDensity)
|
||||
{
|
||||
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)
|
||||
{
|
||||
// For iron, make sure we're placing on stone
|
||||
case "stone_iron" when !_stoneTiles.Contains(cell):
|
||||
case "ore_iron" when !_stoneTiles.Contains(cell):
|
||||
continue;
|
||||
// Remove from previous layer if needed
|
||||
case "stone_iron" when _stoneTiles.Contains(cell):
|
||||
case "ore_iron" when _stoneTiles.Contains(cell):
|
||||
_stoneTiles.Remove(cell);
|
||||
break;
|
||||
case "stone" when _groundTiles.Contains(cell):
|
||||
|
@@ -9,8 +9,6 @@ public partial class BaseTile : Node2D
|
||||
{
|
||||
[Export] public string TileId { get; set; }
|
||||
|
||||
public BuildingData TileData { get; set; }
|
||||
|
||||
private CollisionShape2D _collisionShape;
|
||||
private Sprite2D _sprite;
|
||||
private ColorRect _progressOverlay;
|
||||
|
@@ -4,5 +4,11 @@ namespace AceFieldNewHorizon.Scripts.Tiles;
|
||||
|
||||
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();
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user