public void Render(float xTopleft, float yTopleft) { CluwneLib.Clear(Color.Black); DrawStars(3, (float)CluwneLib.FrameStats.FrameDrawTime / 2000); DrawStars(2, (float)CluwneLib.FrameStats.FrameDrawTime / 2000); for (int layer = 1; layer >= 0; layer--) { DrawStars(layer, (float)CluwneLib.FrameStats.FrameDrawTime / 2000); } }
public GameController() { _configurationManager = IoCManager.Resolve <IConfigurationManager>(); _configurationManager.Initialize("./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.Clear(Color.Black); CluwneLib.Screen.DispatchEvents(); CluwneLib.RunIdle(this, _frameEvent); CluwneLib.Screen.Display(); } CluwneLib.Terminate(); Console.WriteLine("Gameloop terminated."); }