Преглед изворни кода

1. FriendClass改成FriendOf,含义更精确
2. 修复分析器没有作用到Apps.Hotfix跟App.Model上的bug

tanghai пре 3 година
родитељ
комит
9666df0d36
61 измењених фајлова са 89 додато и 89 уклоњено
  1. 2 2
      Apps/Hotfix/Module/AOI/AOIEntitySystem.cs
  2. 1 1
      Apps/Hotfix/Module/AOI/AOIHelper.cs
  3. 3 3
      Apps/Hotfix/Module/AOI/AOIManagerComponentSystem.cs
  4. 1 1
      Apps/Hotfix/Module/AOI/CellSystem.cs
  5. 1 1
      Apps/Hotfix/Module/Actor/ActorMessageDispatcherComponentSystem.cs
  6. 1 1
      Apps/Hotfix/Module/Actor/ActorMessageSenderComponentSystem.cs
  7. 2 2
      Apps/Hotfix/Module/ActorLocation/ActorLocationSenderComponentSystem.cs
  8. 2 2
      Apps/Hotfix/Module/ActorLocation/LocationComponentSystem.cs
  9. 2 2
      Apps/Hotfix/Module/Console/ConsoleComponentSystem.cs
  10. 1 1
      Apps/Hotfix/Module/DB/DBComponentSystem.cs
  11. 1 1
      Apps/Hotfix/Module/DB/DBManagerComponentSystem.cs
  12. 1 1
      Apps/Hotfix/Module/Http/HttpComponentSystem.cs
  13. 2 2
      Apps/Hotfix/Module/MessageInner/NetInnerComponentSystem.cs
  14. 1 1
      Apps/Hotfix/Module/RobotCase/RobotCaseComponentSystem.cs
  15. 2 2
      Apps/Hotfix/Module/RobotCase/RobotCaseDispatcherComponentSystem.cs
  16. 2 2
      Apps/Hotfix/Module/Router/RouterComponentSystem.cs
  17. 1 1
      Apps/Hotfix/Module/Router/RouterNodeSystem.cs
  18. 1 1
      Apps/Hotfix/Server/GateSessionKeyComponentSystem.cs
  19. 1 1
      Apps/Hotfix/Server/PlayerComponentSystem.cs
  20. 1 1
      Apps/Hotfix/Server/PlayerSystem.cs
  21. 0 0
      Apps/Hotfix/Server/Robot/RobotCaseHelper.cs
  22. 0 0
      Apps/Hotfix/Server/Router/HttpGetRouterHandler.cs
  23. 2 2
      Apps/Hotfix/Server/Unit/UnitHelper.cs
  24. 1 1
      Apps/Hotfix/Watcher/WatcherComponentSystem.cs
  25. 0 0
      Apps/Model/Server/Recast/RecastFileReader.cs
  26. 6 6
      Share/Analyzer/Analyzer/EntityFiledAccessAnalyzer.cs
  27. 9 9
      Share/Analyzer/CodeFixer/EntityFiledAccessCodeFixProvider.cs
  28. 2 2
      Share/Analyzer/Config/AnalyzeAssembly.cs
  29. 2 2
      Unity/Assets/Core/Object/FriendOfAttribute.cs
  30. 1 1
      Unity/Assets/Core/Object/FriendOfAttribute.cs.meta
  31. 1 1
      Unity/Codes/Hotfix/Client/AI/XunLuoPathComponentSystem.cs
  32. 1 1
      Unity/Codes/Hotfix/Client/Router/RouterAddressComponentSystem.cs
  33. 1 1
      Unity/Codes/Hotfix/Client/Scene/ClientSceneManagerComponentSystem.cs
  34. 2 2
      Unity/Codes/Hotfix/Module/AI/AIComponentSystem.cs
  35. 1 1
      Unity/Codes/Hotfix/Module/AI/AIDispatcherComponentSystem.cs
  36. 1 1
      Unity/Codes/Hotfix/Module/Config/ConfigComponentSystem.cs
  37. 1 1
      Unity/Codes/Hotfix/Module/Message/MessageDispatcherComponentSystem.cs
  38. 1 1
      Unity/Codes/Hotfix/Module/Message/NetKcpComponentSystem.cs
  39. 1 1
      Unity/Codes/Hotfix/Module/Message/NetThreadComponentSystem.cs
  40. 1 1
      Unity/Codes/Hotfix/Module/Move/MoveComponentSystem.cs
  41. 1 1
      Unity/Codes/Hotfix/Module/Recast/NavmeshComponentSystem.cs
  42. 1 1
      Unity/Codes/Hotfix/Module/Recast/PathfindingComponentSystem.cs
  43. 1 1
      Unity/Codes/HotfixView/Client/Camera/CameraComponentSystem.cs
  44. 1 1
      Unity/Codes/HotfixView/Client/Opera/OperaComponentSystem.cs
  45. 1 1
      Unity/Codes/HotfixView/Client/Scene/SceneChangeComponentSystem.cs
  46. 1 1
      Unity/Codes/HotfixView/Client/UI/UILobby/UILobbyComponentSystem.cs
  47. 1 1
      Unity/Codes/HotfixView/Client/UI/UILogin/UILoginComponentSystem.cs
  48. 1 1
      Unity/Codes/HotfixView/Client/Unit/AnimatorComponentSystem.cs
  49. 1 1
      Unity/Codes/HotfixView/Module/UI/UIComponentSystem.cs
  50. 1 1
      Unity/Codes/HotfixView/Module/UI/UIEventComponentSystem.cs
  51. 2 2
      Unity/Codes/Model/Module/CoroutineLock/CoroutineLockComponent.cs
  52. 1 1
      Unity/Codes/Model/Module/CoroutineLock/CoroutineLockQueue.cs
  53. 1 1
      Unity/Codes/Model/Module/Message/OpcodeTypeComponent.cs
  54. 1 1
      Unity/Codes/Model/Module/Message/Session.cs
  55. 1 1
      Unity/Codes/Model/Module/Numeric/NumericComponent.cs
  56. 1 1
      Unity/Codes/Model/Module/Numeric/NumericWatcherComponent.cs
  57. 1 1
      Unity/Codes/Model/Module/ObjectWait/ObjectWait.cs
  58. 2 2
      Unity/Codes/Model/Module/Timer/TimerComponent.cs
  59. 4 4
      Unity/Codes/ModelView/Client/Resource/ResourcesComponent.cs
  60. 1 1
      Unity/Codes/ModelView/Client/Resource/ResourcesLoaderComponent.cs
  61. 1 1
      Unity/Codes/ModelView/Module/UI/UI.cs

+ 2 - 2
Apps/Hotfix/Module/AOI/AOIEntitySystem.cs

@@ -3,8 +3,8 @@ using UnityEngine;
 
 namespace ET
 {
-    [FriendClass(typeof(AOIEntity))]
-    [FriendClass(typeof(Cell))]
+    [FriendOf(typeof(AOIEntity))]
+    [FriendOf(typeof(Cell))]
     public static class AOIEntitySystem
     {
         [ObjectSystem]

+ 1 - 1
Apps/Hotfix/Module/AOI/AOIHelper.cs

@@ -2,7 +2,7 @@
 
 namespace ET
 {
-    [FriendClass(typeof(AOIEntity))]
+    [FriendOf(typeof(AOIEntity))]
     public static class AOIHelper
     {
         public static long CreateCellId(int x, int y)

+ 3 - 3
Apps/Hotfix/Module/AOI/AOIManagerComponentSystem.cs

@@ -2,9 +2,9 @@
 
 namespace ET
 {
-    [FriendClass(typeof(AOIManagerComponent))]
-    [FriendClass(typeof(AOIEntity))]
-    [FriendClass(typeof(Cell))]
+    [FriendOf(typeof(AOIManagerComponent))]
+    [FriendOf(typeof(AOIEntity))]
+    [FriendOf(typeof(Cell))]
     public static class AOIManagerComponentSystem
     {
         public static void Add(this AOIManagerComponent self, AOIEntity aoiEntity, float x, float y)

+ 1 - 1
Apps/Hotfix/Module/AOI/CellSystem.cs

@@ -3,7 +3,7 @@ using System.Text;
 
 namespace ET
 {
-    [FriendClass(typeof(Cell))]
+    [FriendOf(typeof(Cell))]
     public static class CellSystem
     {
         [ObjectSystem]

+ 1 - 1
Apps/Hotfix/Module/Actor/ActorMessageDispatcherComponentSystem.cs

@@ -6,7 +6,7 @@ namespace ET
     /// <summary>
     /// Actor消息分发组件
     /// </summary>
-    [FriendClass(typeof(ActorMessageDispatcherComponent))]
+    [FriendOf(typeof(ActorMessageDispatcherComponent))]
     public static class ActorMessageDispatcherComponentHelper
     {
         [ObjectSystem]

+ 1 - 1
Apps/Hotfix/Module/Actor/ActorMessageSenderComponentSystem.cs

@@ -3,7 +3,7 @@ using System.IO;
 
 namespace ET
 {
-    [FriendClass(typeof(ActorMessageSenderComponent))]
+    [FriendOf(typeof(ActorMessageSenderComponent))]
     public static class ActorMessageSenderComponentSystem
     {
         [Callback(CallbackType.ActorMessageSenderChecker)]

+ 2 - 2
Apps/Hotfix/Module/ActorLocation/ActorLocationSenderComponentSystem.cs

@@ -42,8 +42,8 @@ namespace ET
         }
     }
 
-    [FriendClass(typeof(ActorLocationSenderComponent))]
-    [FriendClass(typeof(ActorLocationSender))]
+    [FriendOf(typeof(ActorLocationSenderComponent))]
+    [FriendOf(typeof(ActorLocationSender))]
     public static class ActorLocationSenderComponentSystem
     {
         public static void Check(this ActorLocationSenderComponent self)

+ 2 - 2
Apps/Hotfix/Module/ActorLocation/LocationComponentSystem.cs

@@ -20,8 +20,8 @@
         }
     }
     
-    [FriendClass(typeof(LocationComponent))]
-    [FriendClass(typeof(LockInfo))]
+    [FriendOf(typeof(LocationComponent))]
+    [FriendOf(typeof(LockInfo))]
     public static class LocationComponentSystem
     {
         public static async ETTask Add(this LocationComponent self, long key, long instanceId)

+ 2 - 2
Apps/Hotfix/Module/Console/ConsoleComponentSystem.cs

@@ -5,8 +5,8 @@ using System.Threading.Tasks;
 
 namespace ET
 {
-    [FriendClass(typeof(ConsoleComponent))]
-    [FriendClass(typeof(ModeContex))]
+    [FriendOf(typeof(ConsoleComponent))]
+    [FriendOf(typeof(ModeContex))]
     public static class ConsoleComponentSystem
     {
         [ObjectSystem]

+ 1 - 1
Apps/Hotfix/Module/DB/DBComponentSystem.cs

@@ -5,7 +5,7 @@ using MongoDB.Driver;
 
 namespace ET
 {
-	[FriendClass(typeof(DBComponent))]
+	[FriendOf(typeof(DBComponent))]
     public static class DBComponentSystem
     {
 	    public class DBComponentAwakeSystem : AwakeSystem<DBComponent, string, string, int>

+ 1 - 1
Apps/Hotfix/Module/DB/DBManagerComponentSystem.cs

@@ -2,7 +2,7 @@
 
 namespace ET
 {
-    [FriendClass(typeof(DBManagerComponent))]
+    [FriendOf(typeof(DBManagerComponent))]
     public static class DBManagerComponentSystem
     {
         [ObjectSystem]

+ 1 - 1
Apps/Hotfix/Module/Http/HttpComponentSystem.cs

@@ -4,7 +4,7 @@ using System.Net;
 
 namespace ET
 {
-    [FriendClass(typeof(HttpComponent))]
+    [FriendOf(typeof(HttpComponent))]
     public static class HttpComponentSystem
     {
         public class HttpComponentAwakeSystem : AwakeSystem<HttpComponent, string>

+ 2 - 2
Apps/Hotfix/Module/MessageInner/NetInnerComponentSystem.cs

@@ -3,8 +3,8 @@ using System.Net;
 
 namespace ET
 {
-    [FriendClass(typeof(NetInnerComponent))]
-    [FriendClass(typeof(NetThreadComponent))]
+    [FriendOf(typeof(NetInnerComponent))]
+    [FriendOf(typeof(NetThreadComponent))]
     public static class NetInnerComponentSystem
     {
         [ObjectSystem]

+ 1 - 1
Apps/Hotfix/Module/RobotCase/RobotCaseComponentSystem.cs

@@ -3,7 +3,7 @@ using System.Collections.Generic;
 
 namespace ET
 {
-    [FriendClass(typeof(RobotCaseComponent))]
+    [FriendOf(typeof(RobotCaseComponent))]
     public static class RobotCaseComponentSystem
     {
         [ObjectSystem]

+ 2 - 2
Apps/Hotfix/Module/RobotCase/RobotCaseDispatcherComponentSystem.cs

@@ -3,8 +3,8 @@ using System.Collections.Generic;
 
 namespace ET
 {
-    [FriendClass(typeof(RobotCaseDispatcherComponent))]
-    [FriendClass(typeof(RobotCase))]
+    [FriendOf(typeof(RobotCaseDispatcherComponent))]
+    [FriendOf(typeof(RobotCase))]
     public static class RobotCaseDispatcherComponentSystem
     {
         [ObjectSystem]

+ 2 - 2
Apps/Hotfix/Module/Router/RouterComponentSystem.cs

@@ -5,8 +5,8 @@ using System.Runtime.InteropServices;
 
 namespace ET
 {
-    [FriendClass(typeof (RouterComponent))]
-    [FriendClass(typeof (RouterNode))]
+    [FriendOf(typeof (RouterComponent))]
+    [FriendOf(typeof (RouterNode))]
     public static class RouterComponentSystem
     {
         [ObjectSystem]

+ 1 - 1
Apps/Hotfix/Module/Router/RouterNodeSystem.cs

@@ -1,6 +1,6 @@
 namespace ET
 {
-    [FriendClass(typeof(RouterNode))]
+    [FriendOf(typeof(RouterNode))]
     public static class RouterNodeSystem
     {
         [ObjectSystem]

+ 1 - 1
Apps/Hotfix/Server/GateSessionKeyComponentSystem.cs

@@ -1,6 +1,6 @@
 namespace ET.Server
 {
-    [FriendClass(typeof(GateSessionKeyComponent))]
+    [FriendOf(typeof(GateSessionKeyComponent))]
     public static class GateSessionKeyComponentSystem
     {
         public static void Add(this GateSessionKeyComponent self, long key, string account)

+ 1 - 1
Apps/Hotfix/Server/PlayerComponentSystem.cs

@@ -2,7 +2,7 @@
 
 namespace ET.Server
 {
-    [FriendClass(typeof(PlayerComponent))]
+    [FriendOf(typeof(PlayerComponent))]
     public static class PlayerComponentSystem
     {
         public static void Add(this PlayerComponent self, Player player)

+ 1 - 1
Apps/Hotfix/Server/PlayerSystem.cs

@@ -1,6 +1,6 @@
 namespace ET.Server
 {
-    [FriendClass(typeof(Player))]
+    [FriendOf(typeof(Player))]
     public static class PlayerSystem
     {
         [ObjectSystem]

+ 0 - 0
Apps/Hotfix/Server/Robot/RobotCaseSystem.cs → Apps/Hotfix/Server/Robot/RobotCaseHelper.cs


+ 0 - 0
Apps/Hotfix/Server/RouterManager/HttpGetRouterHandler.cs → Apps/Hotfix/Server/Router/HttpGetRouterHandler.cs


+ 2 - 2
Apps/Hotfix/Server/Unit/UnitHelper.cs

@@ -3,8 +3,8 @@ using UnityEngine;
 
 namespace ET.Server
 {
-    [FriendClass(typeof(MoveComponent))]
-    [FriendClass(typeof(NumericComponent))]
+    [FriendOf(typeof(MoveComponent))]
+    [FriendOf(typeof(NumericComponent))]
     public static class UnitHelper
     {
         public static UnitInfo CreateUnitInfo(Unit unit)

+ 1 - 1
Apps/Hotfix/Watcher/WatcherComponentSystem.cs

@@ -3,7 +3,7 @@ using System.Diagnostics;
 
 namespace ET
 {
-    [FriendClass(typeof(WatcherComponent))]
+    [FriendOf(typeof(WatcherComponent))]
     public static class WatcherComponentSystem
     {
         public class WatcherComponentAwakeSystem: AwakeSystem<WatcherComponent>

+ 0 - 0
Apps/Model/Server/RecastLoader/RecastFileReader.cs → Apps/Model/Server/Recast/RecastFileReader.cs


+ 6 - 6
Share/Analyzer/Analyzer/EntityFiledAccessAnalyzer.cs

@@ -12,7 +12,7 @@ namespace ET.Analyzer
     {
         private const string Title = "实体字段访问错误";
 
-        private const string MessageFormat = "实体: {0} 字段: {1} 只能在实体类生命周期组件或友元类(含有FriendClassAttribute)中访问";
+        private const string MessageFormat = "实体: {0} 字段: {1} 只能在实体类生命周期组件或友元类(含有FriendOfAttribute)中访问";
 
         private const string Description = "请使用实体类属性或方法访问其他实体字段.";
 
@@ -22,7 +22,7 @@ namespace ET.Analyzer
 
         private const string ISystemType = "ET.ISystemType";
 
-        private const string FriendClassAttribute = "ET.FriendClassAttribute";
+        private const string FriendOfAttribute = "ET.FriendOfAttribute";
 
         private static readonly DiagnosticDescriptor Rule = new DiagnosticDescriptor(DiagnosticIds.EntityFiledAccessAnalyzerRuleId,
             Title,
@@ -109,13 +109,13 @@ namespace ET.Analyzer
             }
 
             //判断是否在实体类的友元类中
-            if (this.CheckIsEntityFriendClass(accessFieldClassSymbol, filedSymbol.ContainingType))
+            if (this.CheckIsEntityFriendOf(accessFieldClassSymbol, filedSymbol.ContainingType))
             {
                 return;
             }
 
             var builder = ImmutableDictionary.CreateBuilder<string, string?>();
-            builder.Add("FriendClassType",filedSymbol.ContainingType.ToString());
+            builder.Add("FriendOfType",filedSymbol.ContainingType.ToString());
             Diagnostic diagnostic = Diagnostic.Create(Rule, memberAccessExpressionSyntax.GetLocation(), builder.ToImmutable(),filedSymbol.ContainingType.ToString(),
                 filedSymbol.Name);
             context.ReportDiagnostic(diagnostic);
@@ -148,12 +148,12 @@ namespace ET.Analyzer
             return false;
         }
 
-        private bool CheckIsEntityFriendClass(INamedTypeSymbol accessFieldTypeSymbol, INamedTypeSymbol entityTypeSymbol)
+        private bool CheckIsEntityFriendOf(INamedTypeSymbol accessFieldTypeSymbol, INamedTypeSymbol entityTypeSymbol)
         {
             var attributes = accessFieldTypeSymbol.GetAttributes();
             foreach (AttributeData? attributeData in attributes)
             {
-                if (attributeData.AttributeClass?.ToString() != FriendClassAttribute)
+                if (attributeData.AttributeClass?.ToString() != FriendOfAttribute)
                 {
                     continue;
                 }

+ 9 - 9
Share/Analyzer/CodeFixer/EntityFiledAccessCodeFixProvider.cs

@@ -26,8 +26,8 @@ namespace ET.Analyzer
             Diagnostic diagnostic = context.Diagnostics.First();
 
             Microsoft.CodeAnalysis.Text.TextSpan diagnosticSpan = diagnostic.Location.SourceSpan;
-            // 获取diagnostic 传递来的 FriendClassType 值
-            diagnostic.Properties.TryGetValue("FriendClassType", out string? frienClassType);
+            // 获取diagnostic 传递来的 FriendOfType 值
+            diagnostic.Properties.TryGetValue("FriendOfType", out string? frienClassType);
             if (frienClassType==null)
             {
                 return;
@@ -36,8 +36,8 @@ namespace ET.Analyzer
             ClassDeclarationSyntax? classDeclaration = root?.FindToken(diagnosticSpan.Start).Parent?.AncestorsAndSelf().OfType<ClassDeclarationSyntax>().First();
             // 构造Code Action
             CodeAction action = CodeAction.Create(
-                "Add FriendClass Attribute",
-                c => AddFriendClassAttributeAsync(context.Document, classDeclaration,frienClassType, c),
+                "Add FriendOf Attribute",
+                c => AddFriendOfAttributeAsync(context.Document, classDeclaration,frienClassType, c),
                 equivalenceKey: nameof(EntityFiledAccessCodeFixProvider));
 
             // 注册codeFix Code Action
@@ -45,13 +45,13 @@ namespace ET.Analyzer
         }
 
 
-        private static async Task<Document> AddFriendClassAttributeAsync(Document document, ClassDeclarationSyntax? classDeclaration, string friendClassType, CancellationToken cancellationToken)
+        private static async Task<Document> AddFriendOfAttributeAsync(Document document, ClassDeclarationSyntax? classDeclaration, string friendOfType, CancellationToken cancellationToken)
         {
-            // 构造FriendClassAttribute 语法节点
-            AttributeArgumentSyntax attributeArgument = SyntaxFactory.AttributeArgument(SyntaxFactory.TypeOfExpression(SyntaxFactory.ParseTypeName(friendClassType)));
-            AttributeSyntax attributeSyntax = SyntaxFactory.Attribute(SyntaxFactory.IdentifierName("FriendClassAttribute"))
+            // 构造FriendOfAttribute 语法节点
+            AttributeArgumentSyntax attributeArgument = SyntaxFactory.AttributeArgument(SyntaxFactory.TypeOfExpression(SyntaxFactory.ParseTypeName(friendOfType)));
+            AttributeSyntax attributeSyntax = SyntaxFactory.Attribute(SyntaxFactory.IdentifierName("FriendOfAttribute"))
                     .WithArgumentList(SyntaxFactory.AttributeArgumentList(SyntaxFactory.SingletonSeparatedList(attributeArgument)));
-            // 构造添加构造FriendClassAttribute 得AttributeList语法节点
+            // 构造添加构造FriendOfAttribute 得AttributeList语法节点
             SyntaxList<AttributeListSyntax>? attributes = classDeclaration?.AttributeLists.Add(
                 SyntaxFactory.AttributeList(SyntaxFactory.SingletonSeparatedList(attributeSyntax)).NormalizeWhitespace());
 

+ 2 - 2
Share/Analyzer/Config/AnalyzeAssembly.cs

@@ -2,9 +2,9 @@
 {
     public static class AnalyzeAssembly
     {
-        public const string AppsModel = "Apps.Model";
+        public const string AppsModel = "Model";
 
-        public const string AppsHotfix = "Apps.Hotfix";
+        public const string AppsHotfix = "Hotfix";
 
         public const string UnityModel = "Unity.Model";
 

+ 2 - 2
Unity/Assets/Core/Object/FriendClassAttribute.cs → Unity/Assets/Core/Object/FriendOfAttribute.cs

@@ -4,11 +4,11 @@ namespace ET
 {
     
     [AttributeUsage(AttributeTargets.Class, AllowMultiple = true, Inherited = false)]
-    public class FriendClassAttribute : Attribute
+    public class FriendOfAttribute : Attribute
     {
         public Type Type;
         
-        public FriendClassAttribute(Type type)
+        public FriendOfAttribute(Type type)
         {
             this.Type = type;
         }

+ 1 - 1
Unity/Assets/Core/Object/FriendClassAttribute.cs.meta → Unity/Assets/Core/Object/FriendOfAttribute.cs.meta

@@ -1,5 +1,5 @@
 fileFormatVersion: 2
-guid: 30150e05b017878419f706b422fda6b0
+guid: 6d7a9b6f8af735a41969637187243fcb
 MonoImporter:
   externalObjects: {}
   serializedVersion: 2

+ 1 - 1
Unity/Codes/Hotfix/Client/AI/XunLuoPathComponentSystem.cs

@@ -2,7 +2,7 @@ using UnityEngine;
 
 namespace ET.Client
 {
-    [FriendClass(typeof(XunLuoPathComponent))]
+    [FriendOf(typeof(XunLuoPathComponent))]
     public static class XunLuoPathComponentSystem
     {
         public static Vector3 GetCurrent(this XunLuoPathComponent self)

+ 1 - 1
Unity/Codes/Hotfix/Client/Router/RouterAddressComponentSystem.cs

@@ -6,7 +6,7 @@ using System.Runtime.InteropServices;
 
 namespace ET.Client
 {
-    [FriendClass(typeof(RouterAddressComponent))]
+    [FriendOf(typeof(RouterAddressComponent))]
     public static class RouterAddressComponentSystem
     {
         public class RouterAddressComponentAwakeSystem: AwakeSystem<RouterAddressComponent, string>

+ 1 - 1
Unity/Codes/Hotfix/Client/Scene/ClientSceneManagerComponentSystem.cs

@@ -2,7 +2,7 @@
 
 namespace ET.Client
 {
-    [FriendClass(typeof(ClientSceneManagerComponent))]
+    [FriendOf(typeof(ClientSceneManagerComponent))]
     public static class ClientSceneManagerComponentSystem
     {
         [ObjectSystem]

+ 2 - 2
Unity/Codes/Hotfix/Module/AI/AIComponentSystem.cs

@@ -2,8 +2,8 @@ using System;
 
 namespace ET
 {
-    [FriendClass(typeof(AIComponent))]
-    [FriendClass(typeof(AIDispatcherComponent))]
+    [FriendOf(typeof(AIComponent))]
+    [FriendOf(typeof(AIDispatcherComponent))]
     public static class AIComponentSystem
     {
         [Callback(CallbackType.AITimer)]

+ 1 - 1
Unity/Codes/Hotfix/Module/AI/AIDispatcherComponentSystem.cs

@@ -2,7 +2,7 @@ using System;
 
 namespace ET
 {
-    [FriendClass(typeof(AIDispatcherComponent))]
+    [FriendOf(typeof(AIDispatcherComponent))]
     public static class AIDispatcherComponentSystem
     {
         [ObjectSystem]

+ 1 - 1
Unity/Codes/Hotfix/Module/Config/ConfigComponentSystem.cs

@@ -4,7 +4,7 @@ using System.Threading.Tasks;
 
 namespace ET
 {
-	[FriendClass(typeof(ConfigComponent))]
+	[FriendOf(typeof(ConfigComponent))]
 	public static class ConfigComponentSystem
 	{
 		[ObjectSystem]

+ 1 - 1
Unity/Codes/Hotfix/Module/Message/MessageDispatcherComponentSystem.cs

@@ -6,7 +6,7 @@ namespace ET
     /// <summary>
     /// 消息分发组件
     /// </summary>
-    [FriendClass(typeof(MessageDispatcherComponent))]
+    [FriendOf(typeof(MessageDispatcherComponent))]
     public static class MessageDispatcherComponentHelper
     {
         [ObjectSystem]

+ 1 - 1
Unity/Codes/Hotfix/Module/Message/NetKcpComponentSystem.cs

@@ -4,7 +4,7 @@ using System.Net;
 
 namespace ET
 {
-    [FriendClass(typeof(NetKcpComponent))]
+    [FriendOf(typeof(NetKcpComponent))]
     public static class NetKcpComponentSystem
     {
         [ObjectSystem]

+ 1 - 1
Unity/Codes/Hotfix/Module/Message/NetThreadComponentSystem.cs

@@ -3,7 +3,7 @@ using System.Threading;
 
 namespace ET
 {
-    [FriendClass(typeof(NetThreadComponent))]
+    [FriendOf(typeof(NetThreadComponent))]
     public static class NetThreadComponentSystem
     {
         [ObjectSystem]

+ 1 - 1
Unity/Codes/Hotfix/Module/Move/MoveComponentSystem.cs

@@ -4,7 +4,7 @@ using UnityEngine;
 
 namespace ET
 {
-    [FriendClass(typeof(MoveComponent))]
+    [FriendOf(typeof(MoveComponent))]
     public static class MoveComponentSystem
     {
         [Callback(CallbackType.MoveTimer)]

+ 1 - 1
Unity/Codes/Hotfix/Module/Recast/NavmeshComponentSystem.cs

@@ -2,7 +2,7 @@
 
 namespace ET
 {
-    [FriendClass(typeof(NavmeshComponent))]
+    [FriendOf(typeof(NavmeshComponent))]
     public static class NavmeshComponentSystem
     {
         public class AwakeSystem: AwakeSystem<NavmeshComponent>

+ 1 - 1
Unity/Codes/Hotfix/Module/Recast/PathfindingComponentSystem.cs

@@ -4,7 +4,7 @@ using UnityEngine;
 
 namespace ET
 {
-    [FriendClass(typeof(PathfindingComponent))]
+    [FriendOf(typeof(PathfindingComponent))]
     public static class PathfindingComponentSystem
     {
         [ObjectSystem]

+ 1 - 1
Unity/Codes/HotfixView/Client/Camera/CameraComponentSystem.cs

@@ -2,7 +2,7 @@
 
 namespace ET.Client
 {
-	[FriendClass(typeof(CameraComponent))]
+	[FriendOf(typeof(CameraComponent))]
 	public static class CameraComponentSystem
 	{
 		[ObjectSystem]

+ 1 - 1
Unity/Codes/HotfixView/Client/Opera/OperaComponentSystem.cs

@@ -3,7 +3,7 @@ using UnityEngine;
 
 namespace ET.Client
 {
-    [FriendClass(typeof(OperaComponent))]
+    [FriendOf(typeof(OperaComponent))]
     public static class OperaComponentSystem
     {
         [ObjectSystem]

+ 1 - 1
Unity/Codes/HotfixView/Client/Scene/SceneChangeComponentSystem.cs

@@ -2,7 +2,7 @@
 
 namespace ET.Client
 {
-    [FriendClass(typeof(SceneChangeComponent))]
+    [FriendOf(typeof(SceneChangeComponent))]
     public static class SceneChangeComponentSystem
     {
         public class SceneChangeComponentUpdateSystem: UpdateSystem<SceneChangeComponent>

+ 1 - 1
Unity/Codes/HotfixView/Client/UI/UILobby/UILobbyComponentSystem.cs

@@ -3,7 +3,7 @@ using UnityEngine.UI;
 
 namespace ET.Client
 {
-    [FriendClass(typeof(UILobbyComponent))]
+    [FriendOf(typeof(UILobbyComponent))]
     public static class UILobbyComponentSystem
     {
         [ObjectSystem]

+ 1 - 1
Unity/Codes/HotfixView/Client/UI/UILogin/UILoginComponentSystem.cs

@@ -3,7 +3,7 @@ using UnityEngine.UI;
 
 namespace ET.Client
 {
-	[FriendClass(typeof(UILoginComponent))]
+	[FriendOf(typeof(UILoginComponent))]
 	public static class UILoginComponentSystem
 	{
 		[ObjectSystem]

+ 1 - 1
Unity/Codes/HotfixView/Client/Unit/AnimatorComponentSystem.cs

@@ -3,7 +3,7 @@ using UnityEngine;
 
 namespace ET.Client
 {
-	[FriendClass(typeof(AnimatorComponent))]
+	[FriendOf(typeof(AnimatorComponent))]
 	public static class AnimatorComponentSystem
 	{
 		[ObjectSystem]

+ 1 - 1
Unity/Codes/HotfixView/Module/UI/UIComponentSystem.cs

@@ -5,7 +5,7 @@ namespace ET
 	/// <summary>
 	/// 管理Scene上的UI
 	/// </summary>
-	[FriendClass(typeof(UIComponent))]
+	[FriendOf(typeof(UIComponent))]
 	public static class UIComponentSystem
 	{
 		public static async ETTask<UI> Create(this UIComponent self, string uiType, UILayer uiLayer)

+ 1 - 1
Unity/Codes/HotfixView/Module/UI/UIEventComponentSystem.cs

@@ -7,7 +7,7 @@ namespace ET
 	/// <summary>
 	/// 管理所有UI GameObject 以及UI事件
 	/// </summary>
-	[FriendClass(typeof(UIEventComponent))]
+	[FriendOf(typeof(UIEventComponent))]
 	public static class UIEventComponentSystem
 	{
 		[ObjectSystem]

+ 2 - 2
Unity/Codes/Model/Module/CoroutineLock/CoroutineLockComponent.cs

@@ -3,7 +3,7 @@ using System.Collections.Generic;
 
 namespace ET
 {
-    [FriendClass(typeof (CoroutineLockComponent))]
+    [FriendOf(typeof (CoroutineLockComponent))]
     public static class CoroutineLockComponentSystem
     {
         [ObjectSystem]
@@ -38,7 +38,7 @@ namespace ET
             }
         }
 
-        [FriendClass(typeof (CoroutineLock))]
+        [FriendOf(typeof (CoroutineLock))]
         public class CoroutineLockComponentUpdateSystem: UpdateSystem<CoroutineLockComponent>
         {
             public override void Update(CoroutineLockComponent self)

+ 1 - 1
Unity/Codes/Model/Module/CoroutineLock/CoroutineLockQueue.cs

@@ -8,7 +8,7 @@ namespace ET
         public int Time;
     }
 
-    [FriendClass(typeof(CoroutineLockQueue))]
+    [FriendOf(typeof(CoroutineLockQueue))]
     public static class CoroutineLockQueueSystem
     {
         [ObjectSystem]

+ 1 - 1
Unity/Codes/Model/Module/Message/OpcodeTypeComponent.cs

@@ -3,7 +3,7 @@ using System.Collections.Generic;
 
 namespace ET
 {
-    [FriendClass(typeof(OpcodeTypeComponent))]
+    [FriendOf(typeof(OpcodeTypeComponent))]
     public static class OpcodeTypeComponentSystem
     {
         [ObjectSystem]

+ 1 - 1
Unity/Codes/Model/Module/Message/Session.cs

@@ -18,7 +18,7 @@ namespace ET
         }
     }
     
-    [FriendClass(typeof(Session))]
+    [FriendOf(typeof(Session))]
     public static class SessionSystem
     {
         [ObjectSystem]

+ 1 - 1
Unity/Codes/Model/Module/Numeric/NumericComponent.cs

@@ -4,7 +4,7 @@ using MongoDB.Bson.Serialization.Options;
 
 namespace ET
 {
-    [FriendClass(typeof (NumericComponent))]
+    [FriendOf(typeof (NumericComponent))]
     public static class NumericComponentSystem
     {
         public static float GetAsFloat(this NumericComponent self, int numericType)

+ 1 - 1
Unity/Codes/Model/Module/Numeric/NumericWatcherComponent.cs

@@ -3,7 +3,7 @@ using System.Collections.Generic;
 
 namespace ET
 {
-    [FriendClass(typeof(NumericWatcherComponent))]
+    [FriendOf(typeof(NumericWatcherComponent))]
     public static class NumericWatcherComponentSystem
     {
         [ObjectSystem]

+ 1 - 1
Unity/Codes/Model/Module/ObjectWait/ObjectWait.cs

@@ -21,7 +21,7 @@ namespace ET
         }
     }
 
-    [FriendClass(typeof(ObjectWait))]
+    [FriendOf(typeof(ObjectWait))]
     public static class ObjectWaitSystem
     {
         [ObjectSystem]

+ 2 - 2
Unity/Codes/Model/Module/Timer/TimerComponent.cs

@@ -46,8 +46,8 @@ namespace ET
         public int Type;
     }
 
-    [FriendClass(typeof(TimerAction))]
-    [FriendClass(typeof(TimerComponent))]
+    [FriendOf(typeof(TimerAction))]
+    [FriendOf(typeof(TimerComponent))]
     public static class TimerComponentSystem
     {
         [ObjectSystem]

+ 4 - 4
Unity/Codes/ModelView/Client/Resource/ResourcesComponent.cs

@@ -7,7 +7,7 @@ using UnityEngine;
 
 namespace ET.Client
 {
-    [FriendClass(typeof(ABInfo))]
+    [FriendOf(typeof(ABInfo))]
     public static class ABInfoSystem
     {
         [ObjectSystem]
@@ -59,7 +59,7 @@ namespace ET.Client
     }
 
     // 用于字符串转换,减少GC
-    [FriendClass(typeof(ResourcesComponent))]
+    [FriendOf(typeof(ResourcesComponent))]
     public static class AssetBundleHelper
     {
         public static async ETTask<AssetBundle> UnityLoadBundleAsync(string path)
@@ -125,8 +125,8 @@ namespace ET.Client
 
 
 
-    [FriendClass(typeof(ABInfo))]
-    [FriendClass(typeof(ResourcesComponent))]
+    [FriendOf(typeof(ABInfo))]
+    [FriendOf(typeof(ResourcesComponent))]
     public static class ResourcesComponentSystem
     {
         [ObjectSystem]

+ 1 - 1
Unity/Codes/ModelView/Client/Resource/ResourcesLoaderComponent.cs

@@ -2,7 +2,7 @@ using System.Collections.Generic;
 
 namespace ET.Client
 {
-    [FriendClass(typeof(ResourcesLoaderComponent))]
+    [FriendOf(typeof(ResourcesLoaderComponent))]
     public static class ResourcesLoaderComponentSystem
     {
         [ObjectSystem]

+ 1 - 1
Unity/Codes/ModelView/Module/UI/UI.cs

@@ -3,7 +3,7 @@ using UnityEngine;
 
 namespace ET
 {
-    [FriendClass(typeof(UI))]
+    [FriendOf(typeof(UI))]
     public static class UISystem
     {
         [ObjectSystem]