🐛 fixed field outline
This commit is contained in:
Binary file not shown.
|
After Width: | Height: | Size: 5.9 KiB |
@@ -0,0 +1,40 @@
|
|||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="CompressedTexture2D"
|
||||||
|
uid="uid://bovypw2hsn2nq"
|
||||||
|
path="res://.godot/imported/field_outline_1_outline.png-45f43538274c8b9489711c885b999170.ctex"
|
||||||
|
metadata={
|
||||||
|
"vram_texture": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://art/masks/field_outline_1_outline.png"
|
||||||
|
dest_files=["res://.godot/imported/field_outline_1_outline.png-45f43538274c8b9489711c885b999170.ctex"]
|
||||||
|
|
||||||
|
[params]
|
||||||
|
|
||||||
|
compress/mode=0
|
||||||
|
compress/high_quality=false
|
||||||
|
compress/lossy_quality=0.7
|
||||||
|
compress/uastc_level=0
|
||||||
|
compress/rdo_quality_loss=0.0
|
||||||
|
compress/hdr_compression=1
|
||||||
|
compress/normal_map=0
|
||||||
|
compress/channel_pack=0
|
||||||
|
mipmaps/generate=false
|
||||||
|
mipmaps/limit=-1
|
||||||
|
roughness/mode=0
|
||||||
|
roughness/src_normal=""
|
||||||
|
process/channel_remap/red=0
|
||||||
|
process/channel_remap/green=1
|
||||||
|
process/channel_remap/blue=2
|
||||||
|
process/channel_remap/alpha=3
|
||||||
|
process/fix_alpha_border=true
|
||||||
|
process/premult_alpha=false
|
||||||
|
process/normal_map_invert_y=false
|
||||||
|
process/hdr_as_srgb=false
|
||||||
|
process/hdr_clamp_exposure=false
|
||||||
|
process/size_limit=0
|
||||||
|
detect_3d/compress_to=1
|
||||||
Binary file not shown.
|
After Width: | Height: | Size: 6.7 KiB |
@@ -0,0 +1,40 @@
|
|||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="CompressedTexture2D"
|
||||||
|
uid="uid://50qn027e5lvh"
|
||||||
|
path="res://.godot/imported/field_outline_2_outline.png-866d5c097a49b7c63eee72f4455558ee.ctex"
|
||||||
|
metadata={
|
||||||
|
"vram_texture": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://art/masks/field_outline_2_outline.png"
|
||||||
|
dest_files=["res://.godot/imported/field_outline_2_outline.png-866d5c097a49b7c63eee72f4455558ee.ctex"]
|
||||||
|
|
||||||
|
[params]
|
||||||
|
|
||||||
|
compress/mode=0
|
||||||
|
compress/high_quality=false
|
||||||
|
compress/lossy_quality=0.7
|
||||||
|
compress/uastc_level=0
|
||||||
|
compress/rdo_quality_loss=0.0
|
||||||
|
compress/hdr_compression=1
|
||||||
|
compress/normal_map=0
|
||||||
|
compress/channel_pack=0
|
||||||
|
mipmaps/generate=false
|
||||||
|
mipmaps/limit=-1
|
||||||
|
roughness/mode=0
|
||||||
|
roughness/src_normal=""
|
||||||
|
process/channel_remap/red=0
|
||||||
|
process/channel_remap/green=1
|
||||||
|
process/channel_remap/blue=2
|
||||||
|
process/channel_remap/alpha=3
|
||||||
|
process/fix_alpha_border=true
|
||||||
|
process/premult_alpha=false
|
||||||
|
process/normal_map_invert_y=false
|
||||||
|
process/hdr_as_srgb=false
|
||||||
|
process/hdr_clamp_exposure=false
|
||||||
|
process/size_limit=0
|
||||||
|
detect_3d/compress_to=1
|
||||||
Binary file not shown.
|
After Width: | Height: | Size: 7.6 KiB |
@@ -0,0 +1,40 @@
|
|||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="CompressedTexture2D"
|
||||||
|
uid="uid://wjtvno2jj4nl"
|
||||||
|
path="res://.godot/imported/field_outline_3_outline.png-00e4af97c20bd898c6461491100baa4e.ctex"
|
||||||
|
metadata={
|
||||||
|
"vram_texture": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://art/masks/field_outline_3_outline.png"
|
||||||
|
dest_files=["res://.godot/imported/field_outline_3_outline.png-00e4af97c20bd898c6461491100baa4e.ctex"]
|
||||||
|
|
||||||
|
[params]
|
||||||
|
|
||||||
|
compress/mode=0
|
||||||
|
compress/high_quality=false
|
||||||
|
compress/lossy_quality=0.7
|
||||||
|
compress/uastc_level=0
|
||||||
|
compress/rdo_quality_loss=0.0
|
||||||
|
compress/hdr_compression=1
|
||||||
|
compress/normal_map=0
|
||||||
|
compress/channel_pack=0
|
||||||
|
mipmaps/generate=false
|
||||||
|
mipmaps/limit=-1
|
||||||
|
roughness/mode=0
|
||||||
|
roughness/src_normal=""
|
||||||
|
process/channel_remap/red=0
|
||||||
|
process/channel_remap/green=1
|
||||||
|
process/channel_remap/blue=2
|
||||||
|
process/channel_remap/alpha=3
|
||||||
|
process/fix_alpha_border=true
|
||||||
|
process/premult_alpha=false
|
||||||
|
process/normal_map_invert_y=false
|
||||||
|
process/hdr_as_srgb=false
|
||||||
|
process/hdr_clamp_exposure=false
|
||||||
|
process/size_limit=0
|
||||||
|
detect_3d/compress_to=1
|
||||||
@@ -1,24 +1,29 @@
|
|||||||
[gd_scene load_steps=11 format=3 uid="uid://b1d2e7ely6hyw"]
|
[gd_scene load_steps=14 format=3 uid="uid://b1d2e7ely6hyw"]
|
||||||
|
|
||||||
[ext_resource type="Script" uid="uid://bdffon388rkty" path="res://scripts/CSharp/Common/Farming/FieldBehaviour2D.cs" id="1_qa01x"]
|
[ext_resource type="Script" uid="uid://bdffon388rkty" path="res://scripts/CSharp/Common/Farming/FieldBehaviour2D.cs" id="1_qa01x"]
|
||||||
[ext_resource type="Texture2D" uid="uid://cgmu3qlovdr22" path="res://art/masks/field_outline_1.png" id="2_w8caw"]
|
[ext_resource type="Texture2D" uid="uid://cgmu3qlovdr22" path="res://art/masks/field_outline_1.png" id="2_w8caw"]
|
||||||
|
[ext_resource type="Texture2D" uid="uid://50qn027e5lvh" path="res://art/masks/field_outline_2_outline.png" id="3_2eegd"]
|
||||||
[ext_resource type="Texture2D" uid="uid://eg5ej0mtuac" path="res://art/masks/field_outline_2.png" id="3_c014y"]
|
[ext_resource type="Texture2D" uid="uid://eg5ej0mtuac" path="res://art/masks/field_outline_2.png" id="3_c014y"]
|
||||||
|
[ext_resource type="Texture2D" uid="uid://wjtvno2jj4nl" path="res://art/masks/field_outline_3_outline.png" id="4_svbd7"]
|
||||||
[ext_resource type="Texture2D" uid="uid://djpigvoyadvjs" path="res://art/masks/field_outline_3.png" id="4_teirr"]
|
[ext_resource type="Texture2D" uid="uid://djpigvoyadvjs" path="res://art/masks/field_outline_3.png" id="4_teirr"]
|
||||||
[ext_resource type="Texture2D" uid="uid://c2pirgay3jfnn" path="res://art/farm/tilable grounds/böden/trockene farming erde.png" id="5_wx561"]
|
[ext_resource type="Texture2D" uid="uid://c2pirgay3jfnn" path="res://art/farm/tilable grounds/böden/trockene farming erde.png" id="5_wx561"]
|
||||||
[ext_resource type="Texture2D" uid="uid://ctvdxwgmfaj5c" path="res://art/farm/tilable grounds/böden/nasse farming erde.png" id="6_7m4xq"]
|
[ext_resource type="Texture2D" uid="uid://ctvdxwgmfaj5c" path="res://art/farm/tilable grounds/böden/nasse farming erde.png" id="6_7m4xq"]
|
||||||
[ext_resource type="PackedScene" uid="uid://cqc72e4hq6bcd" path="res://prefabs/interactions/interaction_area_2d.tscn" id="7_2eegd"]
|
[ext_resource type="PackedScene" uid="uid://cqc72e4hq6bcd" path="res://prefabs/interactions/interaction_area_2d.tscn" id="7_2eegd"]
|
||||||
[ext_resource type="Resource" uid="uid://d284vxftxhym0" path="res://resources/itemRepository.tres" id="7_w8caw"]
|
[ext_resource type="Resource" uid="uid://d284vxftxhym0" path="res://resources/itemRepository.tres" id="7_w8caw"]
|
||||||
[ext_resource type="Script" uid="uid://b5dotkx17gvxg" path="res://scripts/CSharp/Low Code/Events/EventRaiser.cs" id="9_teirr"]
|
[ext_resource type="Script" uid="uid://b5dotkx17gvxg" path="res://scripts/CSharp/Low Code/Events/EventRaiser.cs" id="9_teirr"]
|
||||||
|
[ext_resource type="Texture2D" uid="uid://bovypw2hsn2nq" path="res://art/masks/field_outline_1_outline.png" id="9_wx561"]
|
||||||
[ext_resource type="Resource" uid="uid://b4hawvsc7cmkn" path="res://resources/low code/farming/event_newPlantCreated.tres" id="10_wx561"]
|
[ext_resource type="Resource" uid="uid://b4hawvsc7cmkn" path="res://resources/low code/farming/event_newPlantCreated.tres" id="10_wx561"]
|
||||||
|
|
||||||
[node name="BaseField" type="Node2D"]
|
[node name="BaseField" type="Node2D"]
|
||||||
|
|
||||||
[node name="FieldBehaviour" type="Sprite2D" parent="." node_paths=PackedStringArray("_fieldSprite", "_maskSprite", "PlantingInteraction", "PlantingPlaceholder")]
|
[node name="FieldBehaviour" type="Sprite2D" parent="." node_paths=PackedStringArray("_fieldSprite", "_maskSprite", "_outlineSprite", "PlantingInteraction", "PlantingPlaceholder")]
|
||||||
z_index = -1
|
z_index = -1
|
||||||
scale = Vector2(0.9, 1)
|
scale = Vector2(0.9, 1)
|
||||||
script = ExtResource("1_qa01x")
|
script = ExtResource("1_qa01x")
|
||||||
_fieldSprite = NodePath("MaskedField/FieldTexture")
|
_fieldSprite = NodePath("MaskedField/FieldTexture")
|
||||||
_maskSprite = NodePath("MaskedField")
|
_maskSprite = NodePath("MaskedField")
|
||||||
|
_outlineSprite = NodePath("OutlineSprite")
|
||||||
|
_maskOutlineTextures = Array[Texture2D]([ExtResource("9_wx561"), ExtResource("3_2eegd"), ExtResource("4_svbd7")])
|
||||||
_maskTexture = Array[Texture2D]([ExtResource("2_w8caw"), ExtResource("3_c014y"), ExtResource("4_teirr")])
|
_maskTexture = Array[Texture2D]([ExtResource("2_w8caw"), ExtResource("3_c014y"), ExtResource("4_teirr")])
|
||||||
Tilled = ExtResource("5_wx561")
|
Tilled = ExtResource("5_wx561")
|
||||||
Watered = ExtResource("6_7m4xq")
|
Watered = ExtResource("6_7m4xq")
|
||||||
@@ -36,11 +41,15 @@ texture = ExtResource("5_wx561")
|
|||||||
|
|
||||||
[node name="PlantPlaceholder" type="Node2D" parent="FieldBehaviour"]
|
[node name="PlantPlaceholder" type="Node2D" parent="FieldBehaviour"]
|
||||||
|
|
||||||
|
[node name="OutlineSprite" type="Sprite2D" parent="FieldBehaviour"]
|
||||||
|
self_modulate = Color(1, 1, 1, 0)
|
||||||
|
z_index = 1
|
||||||
|
scale = Vector2(1.5, 1.5)
|
||||||
|
texture = ExtResource("9_wx561")
|
||||||
|
|
||||||
[node name="InteractionArea" parent="." node_paths=PackedStringArray("_spritesToOutline") instance=ExtResource("7_2eegd")]
|
[node name="InteractionArea" parent="." node_paths=PackedStringArray("_spritesToOutline") instance=ExtResource("7_2eegd")]
|
||||||
position = Vector2(-16, -54)
|
position = Vector2(-26, -57)
|
||||||
_useOutline = false
|
_spritesToOutline = [NodePath("../FieldBehaviour/OutlineSprite")]
|
||||||
_outlineMaterial = null
|
|
||||||
_spritesToOutline = [NodePath("../FieldBehaviour/MaskedField")]
|
|
||||||
|
|
||||||
[node name="PlantCreationEventRaiser" type="Node" parent="."]
|
[node name="PlantCreationEventRaiser" type="Node" parent="."]
|
||||||
script = ExtResource("9_teirr")
|
script = ExtResource("9_teirr")
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
using System;
|
using System;
|
||||||
using Babushka.scripts.CSharp.Common.CharacterControls;
|
using Babushka.scripts.CSharp.Common.CharacterControls;
|
||||||
using Babushka.scripts.CSharp.Common.Inventory;
|
using Babushka.scripts.CSharp.Common.Inventory;
|
||||||
using Babushka.scripts.CSharp.Low_Code.Variables;
|
|
||||||
using Godot;
|
using Godot;
|
||||||
|
|
||||||
namespace Babushka.scripts.CSharp.Common.Farming;
|
namespace Babushka.scripts.CSharp.Common.Farming;
|
||||||
@@ -11,6 +10,8 @@ public partial class FieldBehaviour2D : Sprite2D
|
|||||||
{
|
{
|
||||||
[Export] private Sprite2D _fieldSprite;
|
[Export] private Sprite2D _fieldSprite;
|
||||||
[Export] private Sprite2D _maskSprite;
|
[Export] private Sprite2D _maskSprite;
|
||||||
|
[Export] private Sprite2D _outlineSprite;
|
||||||
|
[Export] private Texture2D[] _maskOutlineTextures;
|
||||||
[Export] private Texture2D[] _maskTexture;
|
[Export] private Texture2D[] _maskTexture;
|
||||||
[Export] private Texture2D Tilled;
|
[Export] private Texture2D Tilled;
|
||||||
[Export] private Texture2D Watered;
|
[Export] private Texture2D Watered;
|
||||||
@@ -26,10 +27,10 @@ public partial class FieldBehaviour2D : Sprite2D
|
|||||||
|
|
||||||
public override void _Ready()
|
public override void _Ready()
|
||||||
{
|
{
|
||||||
|
|
||||||
UpdateFieldState(FieldState);
|
UpdateFieldState(FieldState);
|
||||||
int randomIndex = new Random().Next(0, _maskTexture.Length);
|
int randomIndex = new Random().Next(0, _maskTexture.Length);
|
||||||
_maskSprite.Texture = _maskTexture[randomIndex];
|
_maskSprite.Texture = _maskTexture[randomIndex];
|
||||||
|
_outlineSprite.Texture = _maskOutlineTextures[randomIndex];
|
||||||
base._Ready();
|
base._Ready();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user