Миксер

Почини интерфейс
This commit is contained in:
ThomasCharester committed 2026-03-23 23:59:32 +03:00
1 parent 1aceea1b79
commit 60c28f54f2
74 files changed
+8060 -1059

No files matched your search

@@ -1,5 +1,6 @@
#if UNITY_EDITOR
using Code.Infrastructure.UI;
using Code.Infrastructure.UI;
using Unity.VisualScripting;
using UnityCodeGen;
using UnityEditor;
@@ -43,6 +44,33 @@ namespace Code.Infrastructure.Generators
}}
";
if(st.HasAttribute(typeof(UIEventOpenClose)))
{
fireStatesCode += $@"
protected override void FireOpenedEvent()
{{
_eventBus.RaiseEvent<I{st.Name}OpenedHandle>(h => h.{st.Name}Opened(this));
}}
protected override void FireClosedEvent()
{{
_eventBus.RaiseEvent<I{st.Name}ClosedHandle>(h => h.{st.Name}Closed());
base.FireClosedEvent();
}}
";
fireStatesInterfacesCode += $@"
public interface I{st.Name}OpenedHandle : IGlobalSubscriber
{{
void {st.Name}Opened(UIPanel panel);
}}
public interface I{st.Name}ClosedHandle : IGlobalSubscriber
{{
void {st.Name}Closed();
}}
";
}
var statesCode = $@"
// retard-generated