コード例 #1
0
ファイル: CommandContext.cs プロジェクト: zh880517/UnityLib
 public T NewCommand <T>() where T : ICommand, new()
 {
     return(CommandPool <T> .Get());
 }
コード例 #2
0
ファイル: CommandContext.cs プロジェクト: zh880517/UnityLib
 public void AddCommand <T>(long id, T command) where T : ICommand, new()
 {
     Commands.Enqueue(new CommandEntity {
         Id = id, Type = CommandType.Normal, Command = command, Pool = CommandPool <T> .GetPool()
     });
 }