예제 #1
0
 protected GameObjectManager(IPostOffice postOffice, IScriptController scriptController)
 {
     m_ModuleID         = Constant.enumModuleID.GAMEOBJECTMANAGER;
     m_PostOffice       = postOffice;
     m_ScriptController = scriptController;
     m_GameObjectList   = new Dictionary <String, IGameObject>();
     m_MsgTypeArray     = new Constant.enumMessage[]
     {
         Constant.enumMessage.INITIALISE,
         Constant.enumMessage.UPDATE,
         Constant.enumMessage.DRAW,
         Constant.enumMessage.SYNC_POSITIONDATA,
         Constant.enumMessage.CREATE_OBJECTS,
         Constant.enumMessage.ADD_COMPONENTS_TO_OBJECT,
         Constant.enumMessage.ADD_SCRIPT_TO_OBJECT,
         Constant.enumMessage.GET_COLLISIONDETECTIONDATA,
         Constant.enumMessage.GET_POSITION_COMPONENTS,
         Constant.enumMessage.GET_COMPONENTS,
         Constant.enumMessage.GET_GAMEOBJECT,
         Constant.enumMessage.GET_GAMEOBJECTCOMPONENTS,
         Constant.enumMessage.GET_GAMEOBJECTKEY_BY_ID,
         Constant.enumMessage.GET_GAMEOBJECTCOMPONENTS_BY_ID,
     };
     //m_Components = new List<IComponent>();
 }
예제 #2
0
 public static AIAgent Instance(IPostOffice postOff)
 {
     if (m_Instance == null)
     {
         m_Instance = new AIAgent(postOff);
     }
     return(m_Instance);
 }
예제 #3
0
 public static AIAgent Instance(IPostOffice postOff)
 {
     if (m_Instance == null)
     {
         m_Instance = new AIAgent(postOff);
     }
     return m_Instance;
 }
예제 #4
0
        public static GameObjectManager Instance(IPostOffice postOffice, IScriptController scriptController)
        {
            if (m_Instance == null)
            {
                m_Instance = new GameObjectManager(postOffice, scriptController);
            }

            return(m_Instance);
        }
예제 #5
0
        public static Physics Instance(IPostOffice postOffice)
        {
            if (m_Instance == null)
            {
                m_Instance = new Physics(postOffice);
            }

            return(m_Instance);
        }
예제 #6
0
        public static Physics Instance(IPostOffice postOffice)
        {
            if (m_Instance == null)
            {
                m_Instance = new Physics(postOffice);
            }

            return m_Instance;
        }
예제 #7
0
 public UnenrolInBlockHandler(
     IRepository <User> userRepository,
     IBlockEnrolmentService blockEnrolmentService,
     IPostOffice postOffice)
 {
     _userRepository        = userRepository;
     _blockEnrolmentService = blockEnrolmentService;
     _postOffice            = postOffice;
 }
예제 #8
0
        public static SFMLInput Instance(IPostOffice postOffice)
        {
            if (m_Instance == null)
            {
                m_Instance = new SFMLInput(postOffice);
            }

            return(m_Instance);
        }
예제 #9
0
 protected AIAgent(IPostOffice postOff)
 {
     m_PostOffice   = postOff;
     m_ModuleID     = Constant.enumModuleID.AI;
     m_MsgTypeArray = new Constant.enumMessage[]
     {
         Constant.enumMessage.INITIALISE,
         Constant.enumMessage.UPDATE,
     };
 }
예제 #10
0
 protected AIAgent(IPostOffice postOff)
 {
     m_PostOffice = postOff;
     m_ModuleID = Constant.enumModuleID.AI;
     m_MsgTypeArray = new Constant.enumMessage[]
     {
         Constant.enumMessage.INITIALISE,
         Constant.enumMessage.UPDATE,
     };
 }
예제 #11
0
 /// <summary>
 /// Initializes a new instance of the <see cref="AuthZeroEmailService"/> class.
 /// </summary>
 /// <param name="emailVerificationRepository">The email verification repository.</param>
 /// <param name="postOffice">The post office.</param>
 /// <param name="repository">The repository.</param>
 /// <param name="appSettings">The application settings.</param>
 public AuthZeroEmailService(
     IAuthZeroEmailVerificationRepository emailVerificationRepository,
     IPostOffice postOffice,
     IRepository <User> repository,
     IAppSettings appSettings)
 {
     _emailVerificationRepository = emailVerificationRepository;
     _postOffice  = postOffice;
     _repository  = repository;
     _appSettings = appSettings;
 }
예제 #12
0
 public static ScriptController Instance(IPostOffice postOffice)
 {
     if (m_Instance == null)
     {
         m_Instance = new ScriptController(postOffice);
     }
     else
     {
     }
     return(m_Instance);
 }
예제 #13
0
 protected Physics(IPostOffice postOffice)
 {
     collisions     = new Dictionary <int, List <int> >();
     m_ModuleID     = Constant.enumModuleID.PHYSICS;
     m_PostOffice   = postOffice;
     m_MsgTypeArray = new Constant.enumMessage[]
     {
         Constant.enumMessage.UPDATE,
         Constant.enumMessage.INITIALISE,
         Constant.enumMessage.SEND_COLLISIONDETECTIONDATA,
         Constant.enumMessage.SEND_POSITIONCOMPONENTS,
         Constant.enumMessage.SEND_COMPONENTS,
         Constant.enumMessage.COLLISIONDETECTION,
     };
 }
예제 #14
0
        public void PostOffice_Notify_CallSubscribersUpdate()
        {
            IPostOffice postOffice = new PostOffice();
            IPostOffice postValue  = null;
            var         yokoMock   = new Mock <Subscriber>("Yoko");

            yokoMock.Setup(x => x.Update(It.IsAny <IPostOffice>())).Callback <IPostOffice>(office => postValue = office);
            postOffice.AttachSubscriber(yokoMock.Object);

            ILetter letter = new Letter(from: "John", to: "Yoko");

            postOffice.Receive(letter);
            yokoMock.Verify(x => x.Update(postOffice), Times.Once);
            Assert.Same(postValue, postOffice);
        }
예제 #15
0
 protected Physics(IPostOffice postOffice)
 {
     collisions = new Dictionary<int, List<int>>();
     m_ModuleID = Constant.enumModuleID.PHYSICS;
     m_PostOffice = postOffice;
     m_MsgTypeArray= new Constant.enumMessage[]
     {
         Constant.enumMessage.UPDATE,
         Constant.enumMessage.INITIALISE,
         Constant.enumMessage.SEND_COLLISIONDETECTIONDATA,
         Constant.enumMessage.SEND_POSITIONCOMPONENTS,
         Constant.enumMessage.SEND_COMPONENTS,
         Constant.enumMessage.COLLISIONDETECTION,
     };
 }
예제 #16
0
 protected ScriptController(IPostOffice postOffice)
 {
     m_ModuleID     = Constant.enumModuleID.SCRIPTCONTROLLER;
     m_PostOffice   = postOffice;
     m_MsgTypeArray = new Constant.enumMessage[]
     {
         Constant.enumMessage.UPDATE,
         Constant.enumMessage.INITIALISE,
         Constant.enumMessage.DRAW,
         Constant.enumMessage.COLLISIONDETECTION,
         Constant.enumMessage.SEND_GAMEOBJECT,
     };
     m_TempMsgTypeList  = new List <Constant.enumMessage>();
     m_GameObjectIdList = new List <int>();
     scriptList         = new List <IScript>();
 }
예제 #17
0
 protected SFMLInput(IPostOffice postOffice) : this()
 {
     m_PostOffice = postOffice;
 }
예제 #18
0
 public SFMLGraphics2D(IPostOffice pOff)
     : this()
 {
     m_PostOffice = pOff;
 }
예제 #19
0
 public SFMLGraphics2D(IPostOffice pOff)
     : this()
 {
     m_PostOffice = pOff;
 }
예제 #20
0
        public static SFMLInput Instance(IPostOffice postOffice)
        {
            if (m_Instance == null)
            {
                m_Instance = new SFMLInput(postOffice);
            }

            return m_Instance;
        }
예제 #21
0
 protected SFMLInput(IPostOffice postOffice)
     : this()
 {
     m_PostOffice = postOffice;
 }
예제 #22
0
 public virtual void Update(IPostOffice postOffice)
 {
     Console.WriteLine($"{postOffice.GetLetter().ToString()}");
 }