Развитие системы растений

This commit is contained in:
ThomasCharester committed 2026-03-02 18:25:46 +03:00
1 parent 1b578067f3
commit ba49ef5015
218 files changed
+70415 -1519

No files matched your search

@@ -0,0 +1,43 @@
using System;
using Code.Calendar.Constants;
using Code.Calendar.DataStructures;
using Code.Infrastructure.UI;
using PrimeTween;
using Reflex.Attributes;
using TMPro;
using UnityEngine;
using UnityEngine.UI;
namespace Code.Calendar.Panels
{
public class PlantAddPanel : UIPanel
{
[Inject] private IPlantService _plantService;
[SerializeField] private TMP_InputField plantName;
[SerializeField] private Image image;
public void TryGetIcon()
{
}
public void TryAddPlant()
{
Plant newPlant = new()
{
Name = plantName.text,
IconPath = null
};
_plantService.AddPlant(newPlant);
}
public override void Open(Action callback = null)
{
Tween.Alpha(image, 1f, 1f).OnComplete(target: this, _ => callback?.Invoke());
}
public override void Close(Action callback = null)
{
Tween.Alpha(image, 0f, 1f).OnComplete(target: this, _ => callback?.Invoke());
}
}
}