框架上传
This commit is contained in:
7
Assets/00.StaryEvo/Runtime/Rule/IBelongToArchitecture.cs
Normal file
7
Assets/00.StaryEvo/Runtime/Rule/IBelongToArchitecture.cs
Normal file
@@ -0,0 +1,7 @@
|
||||
namespace Stary.Evo
|
||||
{
|
||||
public interface IBelongToArchitecture
|
||||
{
|
||||
IArchitecture GetArchitecture();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 29267e7525d5442b8656b4c7e32d46db
|
||||
timeCreated: 1624936941
|
||||
14
Assets/00.StaryEvo/Runtime/Rule/ICanGetModel.cs
Normal file
14
Assets/00.StaryEvo/Runtime/Rule/ICanGetModel.cs
Normal file
@@ -0,0 +1,14 @@
|
||||
namespace Stary.Evo
|
||||
{
|
||||
public interface ICanGetData: IBelongToArchitecture
|
||||
{
|
||||
|
||||
}
|
||||
public static class CanGetDataExtension
|
||||
{
|
||||
public static T GetData<T>(this ICanGetData self) where T : class, IData
|
||||
{
|
||||
return self.GetArchitecture().GetData<T>();
|
||||
}
|
||||
}
|
||||
}
|
||||
3
Assets/00.StaryEvo/Runtime/Rule/ICanGetModel.cs.meta
Normal file
3
Assets/00.StaryEvo/Runtime/Rule/ICanGetModel.cs.meta
Normal file
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 1a8db07c697b49dfb467b3adb719f864
|
||||
timeCreated: 1625107407
|
||||
16
Assets/00.StaryEvo/Runtime/Rule/ICanGetSystem.cs
Normal file
16
Assets/00.StaryEvo/Runtime/Rule/ICanGetSystem.cs
Normal file
@@ -0,0 +1,16 @@
|
||||
using UnityEngine;
|
||||
|
||||
namespace Stary.Evo
|
||||
{
|
||||
public interface ICanGetSystem: IBelongToArchitecture
|
||||
{
|
||||
|
||||
}
|
||||
public static class CanGetSystemExtension
|
||||
{
|
||||
public static T GetSystem<T>(this ICanGetSystem self) where T : class, ISystem
|
||||
{
|
||||
return self.GetArchitecture().GetSystem<T>();
|
||||
}
|
||||
}
|
||||
}
|
||||
3
Assets/00.StaryEvo/Runtime/Rule/ICanGetSystem.cs.meta
Normal file
3
Assets/00.StaryEvo/Runtime/Rule/ICanGetSystem.cs.meta
Normal file
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 98fef7169f2540d883fef0f3b57e7597
|
||||
timeCreated: 1625109288
|
||||
14
Assets/00.StaryEvo/Runtime/Rule/ICanGetUtility.cs
Normal file
14
Assets/00.StaryEvo/Runtime/Rule/ICanGetUtility.cs
Normal file
@@ -0,0 +1,14 @@
|
||||
namespace Stary.Evo
|
||||
{
|
||||
public interface ICanGetUtility: IBelongToArchitecture
|
||||
{
|
||||
|
||||
}
|
||||
public static class CanGetUtilityExtension
|
||||
{
|
||||
public static T GetUtility<T>(this ICanGetUtility self) where T : class, IUtility
|
||||
{
|
||||
return self.GetArchitecture().GetUtility<T>();
|
||||
}
|
||||
}
|
||||
}
|
||||
3
Assets/00.StaryEvo/Runtime/Rule/ICanGetUtility.cs.meta
Normal file
3
Assets/00.StaryEvo/Runtime/Rule/ICanGetUtility.cs.meta
Normal file
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: ac4506dbc33147408207becd4084b9e4
|
||||
timeCreated: 1625107159
|
||||
67
Assets/00.StaryEvo/Runtime/Rule/ICanRegisterEvent.cs
Normal file
67
Assets/00.StaryEvo/Runtime/Rule/ICanRegisterEvent.cs
Normal file
@@ -0,0 +1,67 @@
|
||||
using System;
|
||||
|
||||
namespace Stary.Evo
|
||||
{
|
||||
public interface ICanRegisterEvent:IBelongToArchitecture
|
||||
{
|
||||
|
||||
}
|
||||
public static class CanRegisterEventExtension
|
||||
{
|
||||
|
||||
public static IUnRegister RegisterEvent<T>(this ICanRegisterEvent self,T key,Action onEvent) where T : IConvertible
|
||||
{
|
||||
|
||||
return self.GetArchitecture().RegisterEvent(key,onEvent);
|
||||
}
|
||||
public static IUnRegister RegisterEvent<T,T1>(this ICanRegisterEvent self,T key,Action<T1> onEvent) where T : IConvertible
|
||||
{
|
||||
|
||||
return self.GetArchitecture().RegisterEvent(key,onEvent);
|
||||
}
|
||||
public static IUnRegister RegisterEvent<T,T1,T2>(this ICanRegisterEvent self,T key,Action<T1,T2> onEvent) where T : IConvertible
|
||||
{
|
||||
|
||||
return self.GetArchitecture().RegisterEvent(key,onEvent);
|
||||
}
|
||||
|
||||
public static IUnRegister RegisterEvent<T,T1,T2,T3>(this ICanRegisterEvent self,T key,Action<T1,T3> onEvent) where T : IConvertible
|
||||
{
|
||||
|
||||
return self.GetArchitecture().RegisterEvent(key,onEvent);
|
||||
}
|
||||
public static IUnRegister RegisterEvent<T>(this ICanRegisterEvent self,T key,Action<object[]> onEvent) where T : IConvertible
|
||||
{
|
||||
|
||||
return self.GetArchitecture().RegisterEvent(key,onEvent);
|
||||
}
|
||||
|
||||
|
||||
public static void UnRegisterEvent<T>(this ICanRegisterEvent self,T key,Action onEvent) where T : IConvertible
|
||||
{
|
||||
|
||||
self.GetArchitecture().UnRegisterEvent(key,onEvent);
|
||||
}
|
||||
public static void UnRegisterEvent<T,T1>(this ICanRegisterEvent self,T key,Action<T1> onEvent) where T : IConvertible
|
||||
{
|
||||
|
||||
self.GetArchitecture().UnRegisterEvent(key,onEvent);
|
||||
}
|
||||
public static void UnRegisterEvent<T,T1,T2>(this ICanRegisterEvent self,T key,Action<T1,T2> onEvent) where T : IConvertible
|
||||
{
|
||||
|
||||
self.GetArchitecture().UnRegisterEvent(key,onEvent);
|
||||
}
|
||||
|
||||
public static void UnRegisterEvent<T,T1,T2,T3>(this ICanRegisterEvent self,T key,Action<T1,T3> onEvent) where T : IConvertible
|
||||
{
|
||||
|
||||
self.GetArchitecture().UnRegisterEvent(key,onEvent);
|
||||
}
|
||||
public static void UnRegisterEvent<T>(this ICanRegisterEvent self,T key,Action<object[]> onEvent) where T : IConvertible
|
||||
{
|
||||
|
||||
self.GetArchitecture().UnRegisterEvent(key,onEvent);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 3afca6ed153c4f35bfbe630644c9bdab
|
||||
timeCreated: 1625124335
|
||||
21
Assets/00.StaryEvo/Runtime/Rule/ICanSendCommand.cs
Normal file
21
Assets/00.StaryEvo/Runtime/Rule/ICanSendCommand.cs
Normal file
@@ -0,0 +1,21 @@
|
||||
using UnityEngine;
|
||||
|
||||
namespace Stary.Evo
|
||||
{
|
||||
public interface ICanSendCommand: IBelongToArchitecture
|
||||
{
|
||||
|
||||
}
|
||||
public static class CanSendCommandExtension
|
||||
{
|
||||
public static void SendCommand<T>(this ICanSendCommand self) where T :class, ICommand, new()
|
||||
{
|
||||
self.GetArchitecture().SendCommand<T>();
|
||||
}
|
||||
|
||||
public static void SendCommand<T>(this ICanSendCommand self,T command) where T : ICommand
|
||||
{
|
||||
self.GetArchitecture().SendCommand<T>(command);
|
||||
}
|
||||
}
|
||||
}
|
||||
3
Assets/00.StaryEvo/Runtime/Rule/ICanSendCommand.cs.meta
Normal file
3
Assets/00.StaryEvo/Runtime/Rule/ICanSendCommand.cs.meta
Normal file
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 7d4d286b9072404a9d1eed529797d37b
|
||||
timeCreated: 1625109500
|
||||
39
Assets/00.StaryEvo/Runtime/Rule/ICanSendEvent.cs
Normal file
39
Assets/00.StaryEvo/Runtime/Rule/ICanSendEvent.cs
Normal file
@@ -0,0 +1,39 @@
|
||||
using System;
|
||||
|
||||
namespace Stary.Evo
|
||||
{
|
||||
public interface ICanSendEvent:IBelongToArchitecture
|
||||
{
|
||||
|
||||
}
|
||||
public static class CanSendEventExtension
|
||||
{
|
||||
public static void SendEvent<T>(this ICanSendEvent self,T key) where T : IConvertible
|
||||
{
|
||||
|
||||
self.GetArchitecture().SendEvent(key);
|
||||
}
|
||||
public static void SendEvent<T,T1>(this ICanSendEvent self,T key,T1 value) where T : IConvertible
|
||||
{
|
||||
|
||||
self.GetArchitecture().SendEvent(key,value);
|
||||
}
|
||||
public static void SendEvent<T,T1,T2>(this ICanSendEvent self,T key,T1 value1,T2 value2) where T : IConvertible
|
||||
{
|
||||
|
||||
self.GetArchitecture().SendEvent(key,value1,value2);
|
||||
}
|
||||
|
||||
public static void SendEvent<T,T1,T2,T3>(this ICanSendEvent self,T key,T1 value1,T2 value2,T3 value3) where T : IConvertible
|
||||
{
|
||||
|
||||
self.GetArchitecture().SendEvent(key,value1,value2, value3);
|
||||
}
|
||||
public static void SendEvent<T>(this ICanSendEvent self,T key,object[] values) where T : IConvertible
|
||||
{
|
||||
|
||||
self.GetArchitecture().SendEvent(key,values);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
3
Assets/00.StaryEvo/Runtime/Rule/ICanSendEvent.cs.meta
Normal file
3
Assets/00.StaryEvo/Runtime/Rule/ICanSendEvent.cs.meta
Normal file
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 0d5b249bb8554780a126cbe5d7189165
|
||||
timeCreated: 1625124323
|
||||
16
Assets/00.StaryEvo/Runtime/Rule/ICanSendQuery.cs
Normal file
16
Assets/00.StaryEvo/Runtime/Rule/ICanSendQuery.cs
Normal file
@@ -0,0 +1,16 @@
|
||||
namespace Stary.Evo
|
||||
{
|
||||
public interface ICanSendQuery : IBelongToArchitecture
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public static class CanSendQueryExtension
|
||||
{
|
||||
public static T SendQuery<T>(this ICanSendQuery self, IQuery<T> query)
|
||||
{
|
||||
return self.GetArchitecture().SendQuery(query);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
11
Assets/00.StaryEvo/Runtime/Rule/ICanSendQuery.cs.meta
Normal file
11
Assets/00.StaryEvo/Runtime/Rule/ICanSendQuery.cs.meta
Normal file
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 435afd9942e6ed5409bb08b235b4dc03
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
7
Assets/00.StaryEvo/Runtime/Rule/ICanSetArchitecture.cs
Normal file
7
Assets/00.StaryEvo/Runtime/Rule/ICanSetArchitecture.cs
Normal file
@@ -0,0 +1,7 @@
|
||||
namespace Stary.Evo
|
||||
{
|
||||
public interface ICanSetArchitecture
|
||||
{
|
||||
void SetArchitecture(IArchitecture architecture);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 1d30432f9f834aab87ee534ecc6e3fa4
|
||||
timeCreated: 1625018433
|
||||
Reference in New Issue
Block a user