public GaussianBlur_Test()
 {
     //PreTest Setup
     _resourceManager = base.GetResourceManager;
     _configurationManager = base.GetConfigurationManager;
     clock = new Clock();
     base.InitializeCluwneLib();
 }
        public GaussianBlur_Test()
        {
            //PreTest Setup
            base.InitializeCluwneLib(1280, 720, false, 60);

            _resourceManager = base.GetResourceManager;
            _configurationManager = base.GetConfigurationManager;
            clock = base.GetClock;
        }
 public UserInterfaceManager(IResourceManager resourceManager)
 {
     _resourceManager = resourceManager;
     DragInfo         = new DragDropInfo();
     _components      = new List <IGuiComponent>();
     _config          = IoCManager.Resolve <IPlayerConfigurationManager>();
     _console         = new DebugConsole("dbgConsole", new Vector2i((int)CluwneLib.Screen.Size.X, 400), resourceManager);
     _console.SetVisible(false);
 }
        public GaussianBlur_Test()
        {
            //PreTest Setup
            base.InitializeCluwneLib(1280, 720, false, 60);

            _resourceManager      = base.GetResourceManager;
            _configurationManager = base.GetConfigurationManager;
            clock = base.GetClock;
        }
Esempio n. 5
0
 protected State(IDictionary<Type, object> managers)
 {
     StateManager = (IStateManager) managers[typeof (IStateManager)];
     NetworkManager = (INetworkManager) managers[typeof (INetworkManager)];
     ResourceManager = (IResourceManager) managers[typeof (IResourceManager)];
     UserInterfaceManager = (IUserInterfaceManager) managers[typeof (IUserInterfaceManager)];
     MapManager = (IMapManager) managers[typeof (IMapManager)];
     PlayerManager = (IPlayerManager) managers[typeof (IPlayerManager)];
     ConfigurationManager = (IPlayerConfigurationManager) managers[typeof (IPlayerConfigurationManager)];
     PlacementManager = (IPlacementManager) managers[typeof (IPlacementManager)];
     KeyBindingManager = (IKeyBindingManager) managers[typeof (IKeyBindingManager)];
 }
Esempio n. 6
0
 public MessageLogger(IPlayerConfigurationManager _configurationManager)
 {
     _logging             = _configurationManager.GetMessageLogging();
     _loggerServiceClient = new MessageLoggerServiceClient("NetNamedPipeBinding_IMessageLoggerService");
     if (_logging)
     {
         Ping();
         _pingTimer          = new Timer(5000);
         _pingTimer.Elapsed += CheckServer;
         _pingTimer.Enabled  = true;
     }
 }
Esempio n. 7
0
 protected State(IDictionary <Type, object> managers)
 {
     StateManager         = (IStateManager)managers[typeof(IStateManager)];
     NetworkManager       = (INetworkManager)managers[typeof(INetworkManager)];
     ResourceManager      = (IResourceManager)managers[typeof(IResourceManager)];
     UserInterfaceManager = (IUserInterfaceManager)managers[typeof(IUserInterfaceManager)];
     MapManager           = (IMapManager)managers[typeof(IMapManager)];
     PlayerManager        = (IPlayerManager)managers[typeof(IPlayerManager)];
     ConfigurationManager = (IPlayerConfigurationManager)managers[typeof(IPlayerConfigurationManager)];
     PlacementManager     = (IPlacementManager)managers[typeof(IPlacementManager)];
     KeyBindingManager    = (IKeyBindingManager)managers[typeof(IKeyBindingManager)];
 }
Esempio n. 8
0
 public MessageLogger(IPlayerConfigurationManager _configurationManager)
 {
     _logging = _configurationManager.GetMessageLogging();
     _loggerServiceClient = new MessageLoggerServiceClient("NetNamedPipeBinding_IMessageLoggerService");
     if (_logging)
     {
         Ping();
         _pingTimer = new Timer(5000);
         _pingTimer.Elapsed += CheckServer;
         _pingTimer.Enabled = true;
     }
 }
Esempio n. 9
0
        public GameController()
        {
            var    assemblies  = new List <Assembly>();
            string assemblyDir = Path.GetDirectoryName(new Uri(Assembly.GetExecutingAssembly().CodeBase).LocalPath);

            assemblies.Add(Assembly.LoadFrom(Path.Combine(assemblyDir, "SS14.Client.Services.dll")));

            IoCManager.AddAssemblies(assemblies);

            _configurationManager = IoCManager.Resolve <IPlayerConfigurationManager>();
            _configurationManager.Initialize("./player_config.xml");

            _resourceManager = IoCManager.Resolve <IResourceManager>();

            _resourceManager.LoadBaseResources();
            _resourceManager.LoadLocalResources();

            //Setup Cluwne first, as the rest depends on it.
            SetupCluwne();

            //Initialization of private members
            _networkManager       = IoCManager.Resolve <INetworkManager>();
            _netGrapher           = IoCManager.Resolve <INetworkGrapher>();
            _stateManager         = IoCManager.Resolve <IStateManager>();
            _userInterfaceManager = IoCManager.Resolve <IUserInterfaceManager>();

            _stateManager.RequestStateChange <MainScreen> ();

            FrameEventArgs _frameEvent;
            EventArgs      _frameEventArgs;

            _clock = new SFML.System.Clock();

            while (CluwneLib.IsRunning == true)
            {
                var lastFrameTime = _clock.ElapsedTime.AsSeconds();
                _clock.Restart();
                _frameEvent = new FrameEventArgs(lastFrameTime);
                CluwneLib.ClearCurrentRendertarget(Color.Black);
                CluwneLib.Screen.DispatchEvents();
                CluwneLib.RunIdle(this, _frameEvent);
                CluwneLib.Screen.Display();
            }
            CluwneLib.Terminate();
            Console.WriteLine("Gameloop terminated.");
        }
Esempio n. 10
0
        public GameController()
        {
            _configurationManager = IoCManager.Resolve <IPlayerConfigurationManager>();
            _configurationManager.Initialize("./player_config.xml");

            _resourceManager = IoCManager.Resolve <IResourceManager>();

            _resourceManager.LoadBaseResources();
            _resourceManager.LoadLocalResources();

            //Setup Cluwne first, as the rest depends on it.
            SetupCluwne();

            //Initialization of private members
            _networkManager       = IoCManager.Resolve <INetworkManager>();
            _netGrapher           = IoCManager.Resolve <INetworkGrapher>();
            _stateManager         = IoCManager.Resolve <IStateManager>();
            _userInterfaceManager = IoCManager.Resolve <IUserInterfaceManager>();



            _stateManager.RequestStateChange <MainScreen> ();

            FrameEventArgs _frameEvent;
            EventArgs      _frameEventArgs;

            _clock = new SFML.System.Clock();


            while (CluwneLib.IsRunning == true)
            {
                var lastFrameTime = _clock.ElapsedTime.AsSeconds();
                _clock.Restart();
                _frameEvent = new FrameEventArgs(lastFrameTime);
                CluwneLib.ClearCurrentRendertarget(Color.Black);
                CluwneLib.Screen.DispatchEvents();
                CluwneLib.RunIdle(this, _frameEvent);
                CluwneLib.Screen.Display();
            }
            CluwneLib.Terminate();
            Console.WriteLine("Gameloop terminated.");
        }
Esempio n. 11
0
        public GameController()
        {
            _configurationManager = IoCManager.Resolve<IPlayerConfigurationManager>();
            _configurationManager.Initialize("./player_config.xml");

            _resourceManager = IoCManager.Resolve<IResourceManager>();

            _resourceManager.LoadBaseResources();
            _resourceManager.LoadLocalResources();

            //Setup Cluwne first, as the rest depends on it.
            SetupCluwne ();

            //Initialization of private members
            _networkManager = IoCManager.Resolve<INetworkManager>();
            _netGrapher = IoCManager.Resolve<INetworkGrapher>();
            _stateManager = IoCManager.Resolve<IStateManager>();
            _userInterfaceManager = IoCManager.Resolve<IUserInterfaceManager>();

            SetupInput ();

            _stateManager.RequestStateChange<TestState> ();

            FrameEventArgs _frameEvent;
            EventArgs _frameEventArgs;
            _clock = new SFML.System.Clock();

            while (CluwneLib.IsRunning == true)
            {
                var lastFrameTime = _clock.ElapsedTime.AsSeconds();
                _clock.Restart();
                _frameEvent = new FrameEventArgs(lastFrameTime);
                CluwneLib.ClearCurrentRendertarget (Color.Black);
                CluwneLib.Screen.DispatchEvents();
                CluwneLib.RunIdle (this, _frameEvent);
                CluwneLib.Screen.Display();
            }
            CluwneLib.Terminate();
            Console.WriteLine("Gameloop terminated.");
        }
Esempio n. 12
0
        public StateManager(IPlayerConfigurationManager configurationManager, INetworkManager networkManager,
                            IUserInterfaceManager userInterfaceManager,
                            IResourceManager resourceManager, IMapManager mapManager, IPlayerManager playerManager,
                            IPlacementManager placementManager, IKeyBindingManager keyBindingManager)
        {
            _managers = new Dictionary <Type, object>
            {
                { typeof(INetworkManager), networkManager },
                { typeof(IUserInterfaceManager), userInterfaceManager },
                { typeof(IResourceManager), resourceManager },
                { typeof(IMapManager), mapManager },
                { typeof(IPlayerManager), playerManager },
                { typeof(IPlayerConfigurationManager), configurationManager },
                { typeof(IPlacementManager), placementManager },
                { typeof(IKeyBindingManager), keyBindingManager },
                { typeof(IStateManager), this }
            };

            _loadedStates = new Dictionary <Type, IState>();
            CurrentState  = null;

            playerManager.RequestedStateSwitch += HandleStateChange;
        }
Esempio n. 13
0
 public ResourceManager(IPlayerConfigurationManager configurationManager)
 {
     _configurationManager = configurationManager;
 }
 public ResourceManager(IPlayerConfigurationManager configurationManager)
 {
     _configurationManager = configurationManager;
 }