├── .gitignore
├── Contrib
├── Adapters
│ └── Xemio.GameLibrary.Unity
│ │ ├── Libraries
│ │ └── UnityEngine.dll
│ │ ├── Properties
│ │ └── AssemblyInfo.cs
│ │ ├── UnityAdapter.cs
│ │ └── Xemio.GameLibrary.Unity.csproj
├── Engines
│ └── Xemio.Tentacle
│ │ ├── Properties
│ │ └── AssemblyInfo.cs
│ │ ├── Xemio.Tentacle.csproj
│ │ └── packages.config
├── Network
│ ├── Xemio.GameLibrary.Network.Commander
│ │ ├── Properties
│ │ │ └── AssemblyInfo.cs
│ │ └── Xemio.GameLibrary.Network.Commander.csproj
│ ├── Xemio.GameLibrary.Network.Pipes
│ │ ├── NamedPipeClientProtocol.cs
│ │ ├── NamedPipeServerConnection.cs
│ │ ├── NamedPipeServerProtocol.cs
│ │ ├── Properties
│ │ │ └── AssemblyInfo.cs
│ │ ├── Xemio.GameLibrary.Network.Pipes.csproj
│ │ └── packages.config
│ ├── Xemio.GameLibrary.Network.Syncput
│ │ ├── Consoles
│ │ │ ├── ClientConsole.cs
│ │ │ ├── EmptyConsole.cs
│ │ │ ├── IConsole.cs
│ │ │ └── ServerConsole.cs
│ │ ├── Core
│ │ │ ├── Lobby.cs
│ │ │ └── Player.cs
│ │ ├── Logic
│ │ │ ├── Client
│ │ │ │ ├── InitializationClientLogic.cs
│ │ │ │ ├── MessageClientLogic.cs
│ │ │ │ ├── PlayerJoinedClientLogic.cs
│ │ │ │ ├── PlayerLeftClientLogic.cs
│ │ │ │ ├── StartGameClientLogic.cs
│ │ │ │ └── TurnClientLogic.cs
│ │ │ └── Server
│ │ │ │ ├── JoinLobbyServerLogic.cs
│ │ │ │ ├── MessageServerLogic.cs
│ │ │ │ └── TurnServerLogic.cs
│ │ ├── NuGet
│ │ │ └── Xemio-GameLibrary-Syncput.nuspec
│ │ ├── Packages
│ │ │ ├── InitializationPackage.cs
│ │ │ ├── MessagePackage.cs
│ │ │ ├── PlayerJoinedPackage.cs
│ │ │ ├── PlayerLeftPackage.cs
│ │ │ ├── Requests
│ │ │ │ ├── JoinLobbyRequest.cs
│ │ │ │ ├── MessageRequest.cs
│ │ │ │ └── TurnRequest.cs
│ │ │ ├── StartGamePackage.cs
│ │ │ └── TurnPackage.cs
│ │ ├── Properties
│ │ │ └── AssemblyInfo.cs
│ │ ├── RemoteListener.cs
│ │ ├── Syncput.cs
│ │ ├── SyncputClient.cs
│ │ ├── SyncputConnection.cs
│ │ ├── SyncputInitializer.cs
│ │ ├── SyncputServer.cs
│ │ ├── Turns
│ │ │ ├── TurnSender.cs
│ │ │ └── TurnSynchronizer.cs
│ │ ├── Xemio.GameLibrary.Network.Syncput.csproj
│ │ └── packages.config
│ └── Xemio.GameLibrary.Network.SyncputServer
│ │ ├── MainForm.Designer.cs
│ │ ├── MainForm.cs
│ │ ├── MainForm.resx
│ │ ├── Program.cs
│ │ ├── Properties
│ │ └── AssemblyInfo.cs
│ │ ├── Scenes
│ │ ├── ListScene.cs
│ │ ├── PlayerOptionsScene.cs
│ │ ├── ServerScene.cs
│ │ ├── TransitionDirection.cs
│ │ └── TransitionScene.cs
│ │ ├── Xemio.GameLibrary.Network.SyncputServer.csproj
│ │ └── packages.config
├── Rendering
│ ├── Xemio.GameLibrary.Rendering.GdiPlus
│ │ ├── Gdi.cs
│ │ ├── GdiInitializationFactory.cs
│ │ ├── GdiInitializer.cs
│ │ ├── GdiRasterOperations.cs
│ │ ├── GdiRenderFactory.cs
│ │ ├── GdiRenderManager.cs
│ │ ├── GdiRenderTarget.cs
│ │ ├── GdiTexture.cs
│ │ ├── GdiTextureAccessor.cs
│ │ ├── Geometry
│ │ │ ├── GdiBrush.cs
│ │ │ └── GdiPen.cs
│ │ ├── ManagedGdiRenderManager.cs
│ │ ├── NativeGdiRenderManager.cs
│ │ ├── NuGet
│ │ │ ├── Xemio-GameLibrary-GDI-Renderer.1.0.0.nupkg
│ │ │ ├── Xemio-GameLibrary-GDI-Renderer.1.0.1.nupkg
│ │ │ ├── Xemio-GameLibrary-GDI-Renderer.1.0.2.nupkg
│ │ │ ├── Xemio-GameLibrary-GDI-Renderer.1.1.0.nupkg
│ │ │ ├── Xemio-GameLibrary-GDI-Renderer.1.2.0.nupkg
│ │ │ ├── Xemio-GameLibrary-GDI-Renderer.1.3.0.nupkg
│ │ │ └── Xemio-GameLibrary-GDI-Renderer.nuspec
│ │ ├── Processors
│ │ │ └── TintEffectProcessor.cs
│ │ ├── Properties
│ │ │ └── AssemblyInfo.cs
│ │ ├── Serialization
│ │ │ ├── GdiTextureReader.cs
│ │ │ └── GdiTextureWriter.cs
│ │ ├── Xemio.GameLibrary.Rendering.GdiPlus.csproj
│ │ ├── Xemio.GameLibrary.Rendering.GdiPlus.csproj.orig
│ │ ├── packages.config
│ │ └── packages.config.orig
│ ├── Xemio.GameLibrary.Rendering.Html5
│ │ ├── Geometry
│ │ │ ├── HTMLBrush.cs
│ │ │ ├── HTMLGeometryFactory.cs
│ │ │ └── HTMLGeometryManager.cs
│ │ ├── HTMLGraphicsInitializer.cs
│ │ ├── HTMLHelper.cs
│ │ ├── HTMLRenderFactory.cs
│ │ ├── HTMLRenderManager.cs
│ │ ├── HTMLRenderTarget.cs
│ │ ├── HTMLTexture.cs
│ │ ├── Properties
│ │ │ └── AssemblyInfo.cs
│ │ ├── Serialization
│ │ │ ├── HTMLTextureReader.cs
│ │ │ └── HTMLTextureWriter.cs
│ │ ├── WebGameLoop.cs
│ │ ├── WebSurface.cs
│ │ ├── Xemio.GameLibrary.Rendering.Html5.csproj
│ │ └── packages.config
│ └── Xemio.GameLibrary.Rendering.Xna
│ │ ├── NuGet
│ │ ├── Xemio-GameLibrary-Xna-Renderer.0.2.0.nupkg
│ │ ├── Xemio-GameLibrary-Xna-Renderer.0.3.0.nupkg
│ │ ├── Xemio-GameLibrary-Xna-Renderer.0.4.0.nupkg
│ │ └── Xemio-GameLibrary-Xna-Renderer.nuspec
│ │ ├── Properties
│ │ └── AssemblyInfo.cs
│ │ ├── Serialization
│ │ ├── XnaTextureReader.cs
│ │ └── XnaTextureWriter.cs
│ │ ├── Xemio.GameLibrary.Rendering.Xna.csproj
│ │ ├── Xemio.GameLibrary.Rendering.Xna.csproj.orig
│ │ ├── XnaGraphicsInitializer.cs
│ │ ├── XnaHelper.cs
│ │ ├── XnaRenderFactory.cs
│ │ ├── XnaRenderManager.cs
│ │ ├── XnaRenderTarget.cs
│ │ ├── XnaTexture.cs
│ │ ├── packages.config
│ │ └── packages.config.orig
├── Sound
│ └── Xemio.GameLibrary.Sound.WPF
│ │ ├── Properties
│ │ └── AssemblyInfo.cs
│ │ ├── SoundDisposer.cs
│ │ ├── WPFSound.cs
│ │ ├── WPFSoundFactory.cs
│ │ ├── WPFSoundInitializer.cs
│ │ ├── WPFSoundProvider.cs
│ │ ├── Xemio.GameLibrary.Sound.WPF.csproj
│ │ └── packages.config
└── Testing
│ ├── Xemio.Contrib.Testing.HTML5
│ ├── Program.cs
│ ├── Properties
│ │ ├── AssemblyInfo.cs
│ │ ├── Resources.Designer.cs
│ │ ├── Resources.resx
│ │ ├── Settings.Designer.cs
│ │ └── Settings.settings
│ ├── TestScene.cs
│ ├── Xemio.Contrib.Testing.HTML5.csproj
│ └── packages.config
│ ├── Xemio.Contrib.Testing.Syncput
│ ├── Entities
│ │ ├── TestEntity.cs
│ │ └── TestEntityRenderer.cs
│ ├── MainForm.Designer.cs
│ ├── MainForm.cs
│ ├── MainForm.resx
│ ├── Program.cs
│ ├── Properties
│ │ ├── AssemblyInfo.cs
│ │ ├── Resources.Designer.cs
│ │ ├── Resources.resx
│ │ ├── Settings.Designer.cs
│ │ └── Settings.settings
│ ├── Resources
│ │ └── boy.png
│ ├── Scenes
│ │ ├── LobbyScene.cs
│ │ └── MainScene.cs
│ ├── Utility.cs
│ ├── Xemio.Contrib.Testing.Syncput.csproj
│ ├── Xemio.Contrib.Testing.Syncput.csproj.orig
│ ├── packages.config
│ └── packages.config.orig
│ └── Xemio.Contrib.Testing.Xna
│ ├── GameForm.Designer.cs
│ ├── GameForm.cs
│ ├── Program.cs
│ ├── Properties
│ ├── AssemblyInfo.cs
│ ├── Resources.Designer.cs
│ ├── Resources.resx
│ ├── Settings.Designer.cs
│ └── Settings.settings
│ ├── TestScene.cs
│ ├── TestScene2.cs
│ ├── Xemio.Contrib.Testing.Xna.csproj
│ ├── Xemio.Contrib.Testing.Xna.csproj.orig
│ ├── packages.config
│ ├── packages.config.orig
│ └── res
│ └── tilesheet.png
├── GameLibrary
├── BasicConfigurator.cs
├── Common
│ ├── ActionDisposable.cs
│ ├── ApplicationExceptionHandler.cs
│ ├── Collections
│ │ ├── AutoProtectedDictionary.cs
│ │ ├── AutoProtectedList.cs
│ │ ├── Cache.cs
│ │ ├── DictionaryActions
│ │ │ ├── AddAction.cs
│ │ │ ├── ClearAction.cs
│ │ │ ├── IDictionaryAction.cs
│ │ │ ├── IndexerAction.cs
│ │ │ └── RemoveAction.cs
│ │ ├── DictionaryCatalog.cs
│ │ ├── ICatalog.cs
│ │ ├── IComputationProvider.cs
│ │ ├── IStorage.cs
│ │ ├── ListActions
│ │ │ ├── AddAction.cs
│ │ │ ├── ClearAction.cs
│ │ │ ├── IListAction.cs
│ │ │ ├── IndexerAction.cs
│ │ │ ├── InsertAction.cs
│ │ │ ├── RemoveAction.cs
│ │ │ └── RemoveAtAction.cs
│ │ ├── ListCatalog.cs
│ │ ├── ProtectedDictionary.cs
│ │ ├── ProtectedList.cs
│ │ └── SignaledQueue.cs
│ ├── Disposable.cs
│ ├── Enumerables.cs
│ ├── ImageExtensions.cs
│ ├── Lambdas.cs
│ ├── Link
│ │ ├── AutomaticLinker.cs
│ │ ├── CreationType.cs
│ │ ├── DuplicateBehavior.cs
│ │ ├── HashLinker.cs
│ │ ├── ILinkable.cs
│ │ ├── Linker.cs
│ │ └── ManuallyLinkedAttribute.cs
│ ├── ObjectStorage.cs
│ ├── Parser
│ │ ├── ITypedParser.cs
│ │ ├── ParserResult.cs
│ │ ├── Primitives
│ │ │ ├── BooleanParser.cs
│ │ │ ├── CharParser.cs
│ │ │ ├── NumericParser.cs
│ │ │ ├── RectangleParser.cs
│ │ │ └── VectorParser.cs
│ │ └── StringParser.cs
│ ├── Properties.cs
│ ├── Property.cs
│ ├── PropertyHelper.cs
│ ├── Randomization
│ │ ├── CryptoRandom.cs
│ │ ├── IRandom.cs
│ │ ├── PerlinNoise.cs
│ │ ├── SeedableRandom.cs
│ │ └── SimpleRandom.cs
│ ├── References
│ │ ├── IReference.cs
│ │ └── StaticReference.cs
│ ├── Reflection.cs
│ ├── Retry.cs
│ ├── Singleton.cs
│ ├── SystemHelper.cs
│ └── Threads
│ │ ├── IThreadInvoker.cs
│ │ ├── ThreadInvoker.cs
│ │ ├── ThreadStartBehavior.cs
│ │ └── Worker.cs
├── Components
│ ├── Attributes
│ │ ├── AbstractionAttribute.cs
│ │ └── RequireAttribute.cs
│ ├── ComponentCatalog.cs
│ ├── IComponent.cs
│ ├── IComponentCatalog.cs
│ ├── IConstructable.cs
│ └── MissingComponentException.cs
├── Config
│ ├── Configuration.cs
│ ├── Dependencies
│ │ ├── Dependency.cs
│ │ ├── DependencyException.cs
│ │ └── DependencyManager.cs
│ ├── FluentConfiguration.cs
│ ├── FluentExtensions.cs
│ ├── Fluently.cs
│ ├── IConfigurationAccess.cs
│ ├── Installation
│ │ ├── AbstractInstaller.cs
│ │ ├── ContentInstaller.cs
│ │ ├── EventInstaller.cs
│ │ ├── FileSystemInstaller.cs
│ │ ├── GameLoopInstaller.cs
│ │ ├── GraphicsInstaller.cs
│ │ ├── IInstaller.cs
│ │ ├── INestedInstaller.cs
│ │ ├── InputInstaller.cs
│ │ ├── PluginInstaller.cs
│ │ ├── PreInstaller.cs
│ │ ├── SceneInstaller.cs
│ │ ├── ScriptInstaller.cs
│ │ ├── SerializationInstaller.cs
│ │ ├── SurfaceInstaller.cs
│ │ └── ThreadInstaller.cs
│ └── Validation
│ │ ├── ComponentNotExists.cs
│ │ ├── FunctionValidator.cs
│ │ ├── IValidator.cs
│ │ ├── InstallerNotExists.cs
│ │ ├── InversiveValidator.cs
│ │ ├── RequireComponent.cs
│ │ ├── RequireInstaller.cs
│ │ ├── ValidationEntry.cs
│ │ ├── ValidationException.cs
│ │ ├── ValidationManager.cs
│ │ └── ValidationScope.cs
├── Content
│ ├── Caching
│ │ ├── ContentCache.cs
│ │ ├── IContentCache.cs
│ │ └── InstanceNotCachedException.cs
│ ├── Compressor.cs
│ ├── ContentManager.cs
│ ├── ContentReader.cs
│ ├── ContentReference.cs
│ ├── ContentSerializer.cs
│ ├── ContentTracker.cs
│ ├── ContentWriter.cs
│ ├── Exceptions
│ │ ├── DuplicateGuidException.cs
│ │ └── GuidNotFoundException.cs
│ ├── FileSystem
│ │ ├── Compression
│ │ │ └── CompressedFileSystem.cs
│ │ ├── Disk
│ │ │ ├── DiskFileSystem.cs
│ │ │ ├── DiskFileSystemWatcher.cs
│ │ │ └── DiskPath.cs
│ │ ├── Extendable
│ │ │ ├── ExtendableFileSystem.cs
│ │ │ └── IFileSystemExtension.cs
│ │ ├── IFileSystem.cs
│ │ ├── IFileSystemListener.cs
│ │ ├── IPath.cs
│ │ └── IVirtualFileSystem.cs
│ ├── Formats
│ │ ├── Binary
│ │ │ ├── BinaryFormat.cs
│ │ │ ├── BinaryReader.cs
│ │ │ └── BinaryWriter.cs
│ │ ├── Format.cs
│ │ ├── IFormat.cs
│ │ ├── IFormatReader.cs
│ │ ├── IFormatWriter.cs
│ │ ├── None
│ │ │ ├── FormatlessFormat.cs
│ │ │ ├── FormatlessReader.cs
│ │ │ ├── FormatlessWriter.cs
│ │ │ └── InvalidFormatException.cs
│ │ └── Xml
│ │ │ ├── XmlFormat.cs
│ │ │ ├── XmlReader.cs
│ │ │ └── XmlWriter.cs
│ ├── IContentReader.cs
│ ├── IContentWriter.cs
│ ├── Layouts
│ │ ├── AutomaticLayoutSerializer.cs
│ │ ├── BaseElement.cs
│ │ ├── Collections
│ │ │ ├── ArrayElement.cs
│ │ │ ├── CollectionBaseElement.cs
│ │ │ ├── CollectionElement.cs
│ │ │ ├── CollectionWithDerivableChildrenElement.cs
│ │ │ ├── DerivableCollectionElement.cs
│ │ │ ├── DerivableCollectionWithDerivableChildrenElement.cs
│ │ │ └── DerivableScope.cs
│ │ ├── Exceptions
│ │ │ └── ReferenceNotFoundException.cs
│ │ ├── Generation
│ │ │ ├── DerivableAttribute.cs
│ │ │ ├── DerivableElementsAttribute.cs
│ │ │ ├── ElementTagAttribute.cs
│ │ │ ├── ExcludeAttribute.cs
│ │ │ ├── LayoutGenerator.cs
│ │ │ └── TagAttribute.cs
│ │ ├── IElementContainer.cs
│ │ ├── ILayoutElement.cs
│ │ ├── LayoutSerializer.cs
│ │ ├── Link
│ │ │ └── LinkableElement.cs
│ │ ├── Migration
│ │ │ ├── DynamicPersistenceLayout.cs
│ │ │ ├── ILayoutMigration.cs
│ │ │ └── MigrationManager.cs
│ │ ├── PersistenceLayout.cs
│ │ ├── Primitives
│ │ │ ├── BooleanElement.cs
│ │ │ ├── ByteElement.cs
│ │ │ ├── CharElement.cs
│ │ │ ├── DoubleElement.cs
│ │ │ ├── FloatElement.cs
│ │ │ ├── GuidElement.cs
│ │ │ ├── IntegerElement.cs
│ │ │ ├── LongElement.cs
│ │ │ ├── RectangleElement.cs
│ │ │ ├── ShortElement.cs
│ │ │ ├── StringElement.cs
│ │ │ ├── TypeElement.cs
│ │ │ └── Vector2Element.cs
│ │ ├── References
│ │ │ ├── DerivableReferenceElement.cs
│ │ │ └── ReferenceElement.cs
│ │ └── SectionElement.cs
│ ├── Loading
│ │ ├── BatchedContentLoader.cs
│ │ ├── ContentLoader.cs
│ │ ├── IContentLoader.cs
│ │ └── ILoadingHandler.cs
│ ├── Metadata
│ │ ├── DefaultMetadata.cs
│ │ ├── IMetadata.cs
│ │ └── MetadataSerializer.cs
│ ├── Serialization
│ │ ├── BooleanSerializer.cs
│ │ ├── ByteSerializer.cs
│ │ ├── CharSerializer.cs
│ │ ├── DoubleSerializer.cs
│ │ ├── FloatSerializer.cs
│ │ ├── GuidSerializer.cs
│ │ ├── IntegerSerializer.cs
│ │ ├── LongSerializer.cs
│ │ ├── ShortSerializer.cs
│ │ ├── StringSerializer.cs
│ │ └── VectorSerializer.cs
│ ├── SerializationManager.cs
│ ├── Streams
│ │ ├── LinkedMemoryStream.cs
│ │ ├── StreamedReader.cs
│ │ ├── StreamedSerializer.cs
│ │ └── StreamedWriter.cs
│ └── Texts
│ │ ├── TextReader.cs
│ │ ├── TextSerializer.cs
│ │ └── TextWriter.cs
├── EngineState.cs
├── Entities
│ ├── Components
│ │ ├── EntityComponent.cs
│ │ ├── IPositionModifier.cs
│ │ ├── TransformComponent.cs
│ │ └── TransformComponentSerializer.cs
│ ├── Entity.cs
│ ├── EntityEnvironment.cs
│ ├── EntitySerializer.cs
│ ├── EntitySystem.cs
│ └── Events
│ │ └── EntityPositionChangedEvent.cs
├── Events
│ ├── ActionObserver.cs
│ ├── EventFilter.cs
│ ├── EventManager.cs
│ ├── Handles
│ │ ├── Handle.cs
│ │ ├── HandleObserver.cs
│ │ ├── IAsyncHandle.cs
│ │ ├── IHandle.cs
│ │ └── IHandleContainer.cs
│ ├── ICancelableEvent.cs
│ ├── IEvent.cs
│ ├── IEventManager.cs
│ ├── IInstigatedEvent.cs
│ └── InstigatedEvent.cs
├── Game
│ ├── GameLoop.cs
│ ├── IGameLoop.cs
│ ├── LagCompensation.cs
│ ├── Scenes
│ │ ├── ColorScene.cs
│ │ ├── LoadingScene.cs
│ │ ├── Scene.cs
│ │ ├── SceneContainer.cs
│ │ ├── SceneLoadingReport.cs
│ │ ├── SceneManager.cs
│ │ ├── SplashScreen.cs
│ │ └── Transitions
│ │ │ ├── ColorTransition.cs
│ │ │ ├── FadeTransition.cs
│ │ │ ├── ITransition.cs
│ │ │ ├── SlideTransition.cs
│ │ │ └── TransitionScene.cs
│ ├── Subscribers
│ │ ├── IRenderSubscriber.cs
│ │ ├── ISortableRenderSubscriber.cs
│ │ ├── ISortableTickSubscriber.cs
│ │ ├── ISubscriber.cs
│ │ └── ITickSubscriber.cs
│ └── Timing
│ │ ├── Frame.cs
│ │ ├── FrameDelayAction.cs
│ │ ├── GameTime.cs
│ │ └── GameTimeMode.cs
├── Input
│ ├── Adapters
│ │ ├── BaseInputAdapter.cs
│ │ ├── IInputAdapter.cs
│ │ ├── KeyboardAdapter.cs
│ │ └── MouseAdapter.cs
│ ├── InputManager.cs
│ ├── InputReference.cs
│ ├── InputState.cs
│ ├── InputStateEvent.cs
│ └── PlayerInput.cs
├── Localization
│ ├── Language.cs
│ ├── LanguageSerializer.cs
│ └── LocalizationManager.cs
├── Logging
│ ├── LogLevel.cs
│ ├── LogManager.cs
│ ├── Logger.cs
│ └── Providers
│ │ ├── ConsoleLoggingProvider.cs
│ │ └── ILoggingProvider.cs
├── Math
│ ├── MathHelper.cs
│ ├── Rectangle.cs
│ ├── Vector2.cs
│ └── Vector3.cs
├── NLog.config
├── Network
│ ├── Client.cs
│ ├── Dispatchers
│ │ ├── ClientOutputQueue.cs
│ │ ├── ClientPackageDispatcher.cs
│ │ ├── OutputQueue.cs
│ │ ├── ServerOutputQueue.cs
│ │ └── ServerPackageDispatcher.cs
│ ├── Events
│ │ ├── Clients
│ │ │ ├── ClientLostConnectionEvent.cs
│ │ │ ├── ClientPackageEvent.cs
│ │ │ ├── ClientReceivedPackageEvent.cs
│ │ │ ├── ClientSendingPackageEvent.cs
│ │ │ └── ClientSentPackageEvent.cs
│ │ └── Servers
│ │ │ ├── ChannelClosedEvent.cs
│ │ │ ├── ChannelOpenedEvent.cs
│ │ │ ├── ServerPackageEvent.cs
│ │ │ ├── ServerReceivedPackageEvent.cs
│ │ │ ├── ServerSendingPackageEvent.cs
│ │ │ └── ServerSentPackageEvent.cs
│ ├── Exceptions
│ │ ├── ChannelLostConnectionException.cs
│ │ └── ClientLostConnectionException.cs
│ ├── Handlers
│ │ ├── Attributes
│ │ │ ├── IClientHandlerAttribute.cs
│ │ │ ├── IServerHandlerAttribute.cs
│ │ │ ├── OnClientJoinedAttribute.cs
│ │ │ ├── OnClientLeftAttribute.cs
│ │ │ ├── OnDisconnectedAttribute.cs
│ │ │ ├── OnReceiveAttribute.cs
│ │ │ ├── OnSendingAttribute.cs
│ │ │ └── OnSentAttribute.cs
│ │ ├── ClientHandler.cs
│ │ ├── Forwarding
│ │ │ ├── ForwardingOptions.cs
│ │ │ ├── ForwardingServerHandler.cs
│ │ │ └── IForwarded.cs
│ │ ├── IClientHandler.cs
│ │ ├── IServerHandler.cs
│ │ ├── ReflectedClientHandler.cs
│ │ ├── ReflectedHandler.cs
│ │ ├── ReflectedServerHandler.cs
│ │ └── ServerHandler.cs
│ ├── ISender.cs
│ ├── Intercetors
│ │ ├── IClientInterceptor.cs
│ │ └── IServerInterceptor.cs
│ ├── Packages
│ │ └── Package.cs
│ ├── Protocols
│ │ ├── IClientProtocol.cs
│ │ ├── IProtocol.cs
│ │ ├── IServerChannelProtocol.cs
│ │ ├── IServerProtocol.cs
│ │ ├── Local
│ │ │ ├── Local.cs
│ │ │ ├── LocalChannel.cs
│ │ │ ├── LocalClient.cs
│ │ │ ├── LocalServer.cs
│ │ │ ├── LocalServerChannel.cs
│ │ │ └── LocalTarget.cs
│ │ ├── ProtocolFactory.cs
│ │ ├── Streamed
│ │ │ ├── BufferedSerializer.cs
│ │ │ ├── StreamedClientProtocol.cs
│ │ │ └── StreamedServerChannelProtocol.cs
│ │ └── Tcp
│ │ │ ├── TcpClientProtocol.cs
│ │ │ ├── TcpDelay.cs
│ │ │ ├── TcpServerConnection.cs
│ │ │ └── TcpServerProtocol.cs
│ ├── Server.cs
│ ├── ServerChannel.cs
│ └── Timing
│ │ ├── LatencyClientHandler.cs
│ │ ├── LatencyInformation.cs
│ │ ├── LatencyPackage.cs
│ │ ├── TimeSyncClientHandler.cs
│ │ ├── TimeSyncInformation.cs
│ │ ├── TimeSyncPackage.cs
│ │ ├── TimeSyncServerHandler.cs
│ │ └── TimeSyncServerWorker.cs
├── Plugins
│ ├── ContextFactory.cs
│ ├── Contexts
│ │ ├── FileAssemblyContext.cs
│ │ ├── MergedAssemblyContext.cs
│ │ ├── MultipleAssemblyContext.cs
│ │ └── SingleAssemblyContext.cs
│ ├── IAssemblyContext.cs
│ ├── ILibraryInitializer.cs
│ ├── Implementations
│ │ ├── IImplementationManager.cs
│ │ └── ImplementationManager.cs
│ └── LibraryLoader.cs
├── Properties
│ ├── AssemblyInfo.cs
│ ├── Resources.Designer.cs
│ ├── Resources.resources
│ └── Resources.resx
├── Rendering
│ ├── AbstractRenderManager.cs
│ ├── Color.cs
│ ├── DisplayMode.cs
│ ├── Effects
│ │ ├── BlendMode.cs
│ │ ├── BlendModeExtensions.cs
│ │ ├── EffectBundle.cs
│ │ ├── FlipEffect.cs
│ │ ├── FlipEffectOptions.cs
│ │ ├── IEffect.cs
│ │ ├── Processors
│ │ │ ├── EffectProcessor.cs
│ │ │ ├── IEffectProcessor.cs
│ │ │ ├── ScaleEffectProcessor.cs
│ │ │ ├── TranslateEffectProcessor.cs
│ │ │ └── TranslateToEffectProcessor.cs
│ │ ├── RotateEffect.cs
│ │ ├── ScaleEffect.cs
│ │ ├── TintEffect.cs
│ │ ├── TranslateEffect.cs
│ │ └── TranslateToEffect.cs
│ ├── Events
│ │ ├── DrawArcEvent.cs
│ │ ├── DrawEllipseEvent.cs
│ │ ├── DrawLineEvent.cs
│ │ ├── DrawPieEvent.cs
│ │ ├── DrawPolygonEvent.cs
│ │ ├── DrawRectangleEvent.cs
│ │ ├── FillEllipseEvent.cs
│ │ ├── FillPieEvent.cs
│ │ ├── FillPolygonEvent.cs
│ │ ├── FillRectangleEvent.cs
│ │ ├── RegionEvent.cs
│ │ ├── RenderTextEvent.cs
│ │ ├── RenderTextureEvent.cs
│ │ ├── ResolutionChangedEvent.cs
│ │ └── VertexEvent.cs
│ ├── Fonts
│ │ ├── FontStyle.cs
│ │ ├── IFont.cs
│ │ ├── ITextRasterizer.cs
│ │ ├── SpriteFont.cs
│ │ └── SpriteFontRasterizer.cs
│ ├── GraphicsDevice.cs
│ ├── GraphicsDeviceFeatures.cs
│ ├── IBrush.cs
│ ├── IPen.cs
│ ├── IRenderFactory.cs
│ ├── IRenderManager.cs
│ ├── IRenderTarget.cs
│ ├── ITexture.cs
│ ├── ITextureAccessor.cs
│ ├── Initialization
│ │ ├── Default
│ │ │ ├── NullBrush.cs
│ │ │ ├── NullFont.cs
│ │ │ ├── NullInitializationFactory.cs
│ │ │ ├── NullInitializer.cs
│ │ │ ├── NullPen.cs
│ │ │ ├── NullRenderFactory.cs
│ │ │ ├── NullRenderManager.cs
│ │ │ ├── NullTextRasterizer.cs
│ │ │ ├── NullTexture.cs
│ │ │ ├── NullTextureAccessor.cs
│ │ │ ├── NullTextureReader.cs
│ │ │ └── NullTextureWriter.cs
│ │ ├── IInitializationFactory.cs
│ │ ├── IInitializer.cs
│ │ ├── NamedInitializer.cs
│ │ └── PriorizedInitializer.cs
│ ├── InterpolationMode.cs
│ ├── Serialization
│ │ ├── TextureReader.cs
│ │ └── TextureWriter.cs
│ ├── Shapes
│ │ ├── ArcShape.cs
│ │ ├── Cached
│ │ │ ├── CachedArcShape.cs
│ │ │ ├── CachedEllipseShape.cs
│ │ │ ├── CachedLineShape.cs
│ │ │ ├── CachedPieShape.cs
│ │ │ ├── CachedPolygonShape.cs
│ │ │ └── CachedRectangleShape.cs
│ │ ├── EllipseShape.cs
│ │ ├── Factories
│ │ │ ├── CachedShapeFactory.cs
│ │ │ ├── IShapeFactory.cs
│ │ │ └── ShapeFactory.cs
│ │ ├── IShape.cs
│ │ ├── LineShape.cs
│ │ ├── PieShape.cs
│ │ ├── PolygonShape.cs
│ │ └── RectangleShape.cs
│ ├── SmoothingMode.cs
│ └── Surfaces
│ │ ├── ISurface.cs
│ │ ├── NullSurface.cs
│ │ └── WindowSurface.cs
├── Resources
│ └── intro.png
├── Script
│ ├── CompilerError.cs
│ ├── CompilerResult.cs
│ ├── DynamicScriptLoader.cs
│ ├── IScript.cs
│ ├── ScriptCompiler.cs
│ └── ScriptExecutor.cs
├── XGL.cs
├── Xemio.GameLibrary.csproj
└── Xemio.GameLibrary.csproj.orig
├── LICENSE.txt
├── NLog.dll
├── NuGet
├── Xemio-GameLibrary.0.5.0.nupkg
├── Xemio-GameLibrary.0.5.1.nupkg
├── Xemio-GameLibrary.0.5.10.1.nupkg
├── Xemio-GameLibrary.0.5.10.nupkg
├── Xemio-GameLibrary.0.5.11.nupkg
├── Xemio-GameLibrary.0.5.12.nupkg
├── Xemio-GameLibrary.0.5.13.nupkg
├── Xemio-GameLibrary.0.5.14.nupkg
├── Xemio-GameLibrary.0.5.15.nupkg
├── Xemio-GameLibrary.0.5.16.nupkg
├── Xemio-GameLibrary.0.5.17.nupkg
├── Xemio-GameLibrary.0.5.18.nupkg
├── Xemio-GameLibrary.0.5.19.nupkg
├── Xemio-GameLibrary.0.5.2.nupkg
├── Xemio-GameLibrary.0.5.20.nupkg
├── Xemio-GameLibrary.0.5.21.nupkg
├── Xemio-GameLibrary.0.5.22.nupkg
├── Xemio-GameLibrary.0.5.23.nupkg
├── Xemio-GameLibrary.0.5.24.1.nupkg
├── Xemio-GameLibrary.0.5.24.10.nupkg
├── Xemio-GameLibrary.0.5.24.11.nupkg
├── Xemio-GameLibrary.0.5.24.12.nupkg
├── Xemio-GameLibrary.0.5.24.13.nupkg
├── Xemio-GameLibrary.0.5.24.14.nupkg
├── Xemio-GameLibrary.0.5.24.15.nupkg
├── Xemio-GameLibrary.0.5.24.16.nupkg
├── Xemio-GameLibrary.0.5.24.17.nupkg
├── Xemio-GameLibrary.0.5.24.18.nupkg
├── Xemio-GameLibrary.0.5.24.19.nupkg
├── Xemio-GameLibrary.0.5.24.2.nupkg
├── Xemio-GameLibrary.0.5.24.20.nupkg
├── Xemio-GameLibrary.0.5.24.21.nupkg
├── Xemio-GameLibrary.0.5.24.22.nupkg
├── Xemio-GameLibrary.0.5.24.23.nupkg
├── Xemio-GameLibrary.0.5.24.24.nupkg
├── Xemio-GameLibrary.0.5.24.25.nupkg
├── Xemio-GameLibrary.0.5.24.3.nupkg
├── Xemio-GameLibrary.0.5.24.4.nupkg
├── Xemio-GameLibrary.0.5.24.5.nupkg
├── Xemio-GameLibrary.0.5.24.6.nupkg
├── Xemio-GameLibrary.0.5.24.7.nupkg
├── Xemio-GameLibrary.0.5.24.8.nupkg
├── Xemio-GameLibrary.0.5.24.9.nupkg
├── Xemio-GameLibrary.0.5.24.nupkg
├── Xemio-GameLibrary.0.5.25.nupkg
├── Xemio-GameLibrary.0.5.26.nupkg
├── Xemio-GameLibrary.0.5.27.1.nupkg
├── Xemio-GameLibrary.0.5.27.2.nupkg
├── Xemio-GameLibrary.0.5.27.nupkg
├── Xemio-GameLibrary.0.5.28.nupkg
├── Xemio-GameLibrary.0.5.29.nupkg
├── Xemio-GameLibrary.0.5.3.nupkg
├── Xemio-GameLibrary.0.5.30.nupkg
├── Xemio-GameLibrary.0.5.31.nupkg
├── Xemio-GameLibrary.0.5.32.nupkg
├── Xemio-GameLibrary.0.5.33.nupkg
├── Xemio-GameLibrary.0.5.34.nupkg
├── Xemio-GameLibrary.0.5.35.nupkg
├── Xemio-GameLibrary.0.5.36.nupkg
├── Xemio-GameLibrary.0.5.37.nupkg
├── Xemio-GameLibrary.0.5.38.nupkg
├── Xemio-GameLibrary.0.5.39.nupkg
├── Xemio-GameLibrary.0.5.4.nupkg
├── Xemio-GameLibrary.0.5.5.nupkg
├── Xemio-GameLibrary.0.5.6.nupkg
├── Xemio-GameLibrary.0.5.7.nupkg
├── Xemio-GameLibrary.0.5.8.nupkg
├── Xemio-GameLibrary.0.5.9.nupkg
├── Xemio-GameLibrary.0.6.21.nupkg
├── Xemio-GameLibrary.0.6.22.nupkg
├── Xemio-GameLibrary.0.6.23.nupkg
├── Xemio-GameLibrary.0.6.24.1.nupkg
├── Xemio-GameLibrary.0.6.24.2.nupkg
├── Xemio-GameLibrary.0.6.24.3.nupkg
├── Xemio-GameLibrary.0.6.24.4.nupkg
├── Xemio-GameLibrary.0.6.24.nupkg
└── Xemio-GameLibrary.nuspec
├── README.md
├── Testing
├── Xemio.Testing.EventSystem
│ ├── Program.cs
│ ├── Properties
│ │ └── AssemblyInfo.cs
│ ├── RedEvent.cs
│ ├── TestEvent.cs
│ ├── Xemio.Testing.EventSystem.csproj
│ └── app.config
├── Xemio.Testing.Input
│ ├── InputForm.Designer.cs
│ ├── InputForm.cs
│ ├── InputForm.resx
│ ├── Program.cs
│ ├── Properties
│ │ └── AssemblyInfo.cs
│ ├── Scenes
│ │ └── TestScene.cs
│ ├── Xemio.Testing.Input.csproj
│ └── app.config
├── Xemio.Testing.Localization
│ ├── Program.cs
│ ├── Properties
│ │ └── AssemblyInfo.cs
│ ├── Xemio.Testing.Localization.csproj
│ └── app.config
├── Xemio.Testing.Mono
│ ├── Program.cs
│ ├── TestScene.cs
│ ├── TestSceneLoader.cs
│ └── Xemio.Testing.Mono.csproj
├── Xemio.Testing.Network
│ ├── Program.cs
│ ├── Properties
│ │ └── AssemblyInfo.cs
│ ├── Xemio.Testing.Network.csproj
│ └── app.config
├── Xemio.Testing.ReactiveExtensions
│ ├── Program.cs
│ ├── Properties
│ │ └── AssemblyInfo.cs
│ ├── Xemio.Testing.ReactiveExtensions.csproj
│ └── app.config
├── Xemio.Testing.Script
│ ├── Program.cs
│ ├── Properties
│ │ └── AssemblyInfo.cs
│ ├── Xemio.Testing.Script.csproj
│ └── app.config
└── Xemio.Testing.Sound
│ ├── Program.cs
│ ├── Properties
│ ├── AssemblyInfo.cs
│ ├── Resources.Designer.cs
│ └── Resources.resx
│ ├── Resources
│ └── bell.wav
│ ├── Xemio.Testing.Sound.csproj
│ └── app.config
├── Xemio.GameLibrary.sln
├── Xemio.GameLibrary.sln~
├── Xemio.GameLibrary.userprefs
└── packages
├── Xemio-GameLibrary.0.5.94
├── Xemio-GameLibrary.0.5.94.nupkg
├── Xemio-GameLibrary.0.5.94.nuspec
└── lib
│ └── net40
│ └── XGL.dll
├── log4net.2.0.3
├── lib
│ ├── net10-full
│ │ ├── log4net.dll
│ │ └── log4net.xml
│ ├── net11-full
│ │ ├── log4net.dll
│ │ └── log4net.xml
│ ├── net20-full
│ │ ├── log4net.dll
│ │ └── log4net.xml
│ ├── net35-client
│ │ ├── log4net.dll
│ │ └── log4net.xml
│ ├── net35-full
│ │ ├── log4net.dll
│ │ └── log4net.xml
│ ├── net40-client
│ │ ├── log4net.dll
│ │ └── log4net.xml
│ └── net40-full
│ │ ├── log4net.dll
│ │ └── log4net.xml
├── log4net.2.0.3.nupkg
└── log4net.2.0.3.nuspec
└── repositories.config
/Contrib/Adapters/Xemio.GameLibrary.Unity/Libraries/UnityEngine.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XemioNetwork/GameLibrary/3a644abd58abc12e9db37f9e6af332852e80b2e8/Contrib/Adapters/Xemio.GameLibrary.Unity/Libraries/UnityEngine.dll
--------------------------------------------------------------------------------
/Contrib/Adapters/Xemio.GameLibrary.Unity/UnityAdapter.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 |
6 | namespace Xemio.GameLibrary.Unity
7 | {
8 | public class UnityAdapter
9 | {
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/Contrib/Engines/Xemio.Tentacle/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/Contrib/Network/Xemio.GameLibrary.Network.Pipes/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/Contrib/Network/Xemio.GameLibrary.Network.Syncput/Logic/Client/MessageClientLogic.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.IO;
6 | using Xemio.GameLibrary.Network.Logic;
7 | using Xemio.GameLibrary.Network.Syncput.Packages;
8 |
9 | namespace Xemio.GameLibrary.Network.Syncput.Logic.Client
10 | {
11 | using Client = Xemio.GameLibrary.Network.Client;
12 |
13 | public class MessageClientLogic : ClientLogic
14 | {
15 | #region Methods
16 | ///
17 | /// Called when the client receives a console message.
18 | ///
19 | /// The client.
20 | /// The package.
21 | public override void OnReceive(IClient client, MessagePackage package)
22 | {
23 | var sync = XGL.Components.Get();
24 | var prefix = string.Format("<{0}> ", package.PlayerName);
25 |
26 | sync.Console.WriteLine(prefix + package.Message);
27 | }
28 | #endregion
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/Contrib/Network/Xemio.GameLibrary.Network.Syncput/Logic/Client/PlayerJoinedClientLogic.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.IO;
6 | using Xemio.GameLibrary.Network.Logic;
7 | using Xemio.GameLibrary.Network.Syncput.Packages;
8 |
9 | namespace Xemio.GameLibrary.Network.Syncput.Logic.Client
10 | {
11 | using Client = Xemio.GameLibrary.Network.Client;
12 |
13 | public class PlayerJoinedClientLogic : ClientLogic
14 | {
15 | #region Methods
16 | ///
17 | /// Called when the client receives a player joined package.
18 | ///
19 | /// The client.
20 | /// The package.
21 | public override void OnReceive(IClient client, PlayerJoinedPackage package)
22 | {
23 | var sync = XGL.Components.Get();
24 | sync.Lobby.Add(package.Player);
25 | }
26 | #endregion
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/Contrib/Network/Xemio.GameLibrary.Network.Syncput/Logic/Client/PlayerLeftClientLogic.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.IO;
6 | using Xemio.GameLibrary.Network.Logic;
7 | using Xemio.GameLibrary.Network.Syncput.Packages;
8 |
9 | namespace Xemio.GameLibrary.Network.Syncput.Logic.Client
10 | {
11 | using Client = Xemio.GameLibrary.Network.Client;
12 |
13 | public class PlayerLeftClientLogic : ClientLogic
14 | {
15 | #region Methods
16 | ///
17 | /// Called when the client receives a player left package.
18 | ///
19 | /// The client.
20 | /// The package.
21 | public override void OnReceive(IClient client, PlayerLeftPackage package)
22 | {
23 | var sync = XGL.Components.Get();
24 | sync.Lobby.Remove(package.Player.Id);
25 | }
26 | #endregion
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/Contrib/Network/Xemio.GameLibrary.Network.Syncput/Logic/Client/StartGameClientLogic.cs:
--------------------------------------------------------------------------------
1 | using Xemio.GameLibrary.Game.Timing;
2 | using Xemio.GameLibrary.Network.Logic;
3 | using Xemio.GameLibrary.Network.Syncput.Packages;
4 | using Xemio.GameLibrary.Network.Syncput.Turns;
5 |
6 | namespace Xemio.GameLibrary.Network.Syncput.Logic.Client
7 | {
8 | using Client = Xemio.GameLibrary.Network.Client;
9 |
10 | public class StartGameClientLogic : ClientLogic
11 | {
12 | #region Methods
13 | ///
14 | /// Called when the game will be started.
15 | ///
16 | /// The client.
17 | /// The package.
18 | public override void OnReceive(IClient client, StartGamePackage package)
19 | {
20 | Syncput syncput = XGL.Components.Get();
21 | syncput.GameStartIndex = package.StartIndex;
22 | }
23 | #endregion
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/Contrib/Network/Xemio.GameLibrary.Network.Syncput/Packages/Requests/MessageRequest.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.IO;
6 | using Xemio.GameLibrary.Network.Packages;
7 |
8 | namespace Xemio.GameLibrary.Network.Syncput.Packages.Requests
9 | {
10 | public class MessageRequest : Package
11 | {
12 | #region Constructors
13 | ///
14 | /// Initializes a new instance of the class.
15 | ///
16 | public MessageRequest()
17 | {
18 | }
19 | ///
20 | /// Initializes a new instance of the class.
21 | ///
22 | /// The message.
23 | public MessageRequest(string message)
24 | {
25 | this.Message = message;
26 | }
27 | #endregion
28 |
29 | #region Properties
30 | ///
31 | /// Gets the message.
32 | ///
33 | public string Message { get; private set; }
34 | #endregion
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/Contrib/Network/Xemio.GameLibrary.Network.Syncput/SyncputConnection.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.IO;
6 | using Xemio.GameLibrary.Network.Protocols.Tcp;
7 | using Xemio.GameLibrary.Network.Syncput.Core;
8 |
9 | namespace Xemio.GameLibrary.Network.Syncput
10 | {
11 | public class SyncputConnection : NestedConnection
12 | {
13 | #region Constructors
14 | ///
15 | /// Initializes a new instance of the class.
16 | ///
17 | /// The connection.
18 | public SyncputConnection(IConnection connection) : base(connection)
19 | {
20 | }
21 | #endregion
22 |
23 | #region Properties
24 | ///
25 | /// Gets the player.
26 | ///
27 | public Player Player { get; internal set; }
28 | #endregion
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/Contrib/Network/Xemio.GameLibrary.Network.Syncput/SyncputInitializer.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.IO;
6 | using Xemio.GameLibrary.Plugins;
7 |
8 | namespace Xemio.GameLibrary.Network.Syncput
9 | {
10 | public class SyncputInitializer : ILibraryInitializer
11 | {
12 | #region Implementation of ILibraryInitializer
13 | ///
14 | /// Initializes syncput.
15 | ///
16 | public void Initialize()
17 | {
18 | XGL.Components.Add(new Syncput());
19 | }
20 | #endregion
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/Contrib/Network/Xemio.GameLibrary.Network.Syncput/Turns/TurnSender.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.IO;
6 | using Xemio.GameLibrary.Components;
7 | using Xemio.GameLibrary.Game;
8 | using Xemio.GameLibrary.Game.Timing;
9 | using Xemio.GameLibrary.Input;
10 | using Xemio.GameLibrary.Network.Syncput.Packages;
11 | using Xemio.GameLibrary.Network.Syncput.Packages.Requests;
12 |
13 | namespace Xemio.GameLibrary.Network.Syncput.Turns
14 | {
15 | public class TurnSender
16 | {
17 | #region Methods
18 | ///
19 | /// Requests a simulation.
20 | ///
21 | /// The turn sequence.
22 | public void SendTurn(int turnSequence)
23 | {
24 | InputManager inputManager = XGL.Components.Get();
25 |
26 | IClient client = XGL.Components.Get();
27 | PlayerInput localInput = inputManager.PlayerInputs.First();
28 |
29 | client.Send(new TurnRequest(localInput, turnSequence));
30 | }
31 | #endregion
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/Contrib/Network/Xemio.GameLibrary.Network.Syncput/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/Contrib/Network/Xemio.GameLibrary.Network.SyncputServer/MainForm.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.ComponentModel;
4 | using System.Data;
5 | using System.Drawing;
6 | using System.Linq;
7 | using System.Text;
8 | using System.Windows.Forms;
9 |
10 | namespace Xemio.GameLibrary.Network.SyncputServer
11 | {
12 | public partial class MainForm : Form
13 | {
14 | public MainForm()
15 | {
16 | InitializeComponent();
17 | }
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/Contrib/Network/Xemio.GameLibrary.Network.SyncputServer/Scenes/TransitionDirection.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.IO;
6 |
7 | namespace Xemio.GameLibrary.Network.SyncputServer.Scenes
8 | {
9 | public enum TransitionDirection
10 | {
11 | Left,
12 | Right
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/Contrib/Network/Xemio.GameLibrary.Network.SyncputServer/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/Contrib/Rendering/Xemio.GameLibrary.Rendering.GdiPlus/GdiRasterOperations.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.IO;
6 |
7 | namespace Xemio.GameLibrary.Rendering.GdiPlus
8 | {
9 | public enum GdiRasterOperations
10 | {
11 | SRCCOPY = 0x00CC0020,
12 | SRCPAINT = 0x00EE0086,
13 | SRCAND = 0x008800C6,
14 | SRCINVERT = 0x00660046,
15 | SRCERASE = 0x00440328,
16 | NOTSRCCOPY = 0x00330008,
17 | NOTSRCERASE = 0x001100A6,
18 | MERGECOPY = 0x00C000CA,
19 | MERGEPAINT = 0x00BB0226,
20 | PATCOPY = 0x00F00021,
21 | PATPAINT = 0x00FB0A09,
22 | PATINVERT = 0x005A0049,
23 | DSTINVERT = 0x00550009,
24 | BLACKNESS = 0x00000042,
25 | WHITENESS = 0x00FF0062
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/Contrib/Rendering/Xemio.GameLibrary.Rendering.GdiPlus/NuGet/Xemio-GameLibrary-GDI-Renderer.1.0.0.nupkg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XemioNetwork/GameLibrary/3a644abd58abc12e9db37f9e6af332852e80b2e8/Contrib/Rendering/Xemio.GameLibrary.Rendering.GdiPlus/NuGet/Xemio-GameLibrary-GDI-Renderer.1.0.0.nupkg
--------------------------------------------------------------------------------
/Contrib/Rendering/Xemio.GameLibrary.Rendering.GdiPlus/NuGet/Xemio-GameLibrary-GDI-Renderer.1.0.1.nupkg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XemioNetwork/GameLibrary/3a644abd58abc12e9db37f9e6af332852e80b2e8/Contrib/Rendering/Xemio.GameLibrary.Rendering.GdiPlus/NuGet/Xemio-GameLibrary-GDI-Renderer.1.0.1.nupkg
--------------------------------------------------------------------------------
/Contrib/Rendering/Xemio.GameLibrary.Rendering.GdiPlus/NuGet/Xemio-GameLibrary-GDI-Renderer.1.0.2.nupkg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XemioNetwork/GameLibrary/3a644abd58abc12e9db37f9e6af332852e80b2e8/Contrib/Rendering/Xemio.GameLibrary.Rendering.GdiPlus/NuGet/Xemio-GameLibrary-GDI-Renderer.1.0.2.nupkg
--------------------------------------------------------------------------------
/Contrib/Rendering/Xemio.GameLibrary.Rendering.GdiPlus/NuGet/Xemio-GameLibrary-GDI-Renderer.1.1.0.nupkg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XemioNetwork/GameLibrary/3a644abd58abc12e9db37f9e6af332852e80b2e8/Contrib/Rendering/Xemio.GameLibrary.Rendering.GdiPlus/NuGet/Xemio-GameLibrary-GDI-Renderer.1.1.0.nupkg
--------------------------------------------------------------------------------
/Contrib/Rendering/Xemio.GameLibrary.Rendering.GdiPlus/NuGet/Xemio-GameLibrary-GDI-Renderer.1.2.0.nupkg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XemioNetwork/GameLibrary/3a644abd58abc12e9db37f9e6af332852e80b2e8/Contrib/Rendering/Xemio.GameLibrary.Rendering.GdiPlus/NuGet/Xemio-GameLibrary-GDI-Renderer.1.2.0.nupkg
--------------------------------------------------------------------------------
/Contrib/Rendering/Xemio.GameLibrary.Rendering.GdiPlus/NuGet/Xemio-GameLibrary-GDI-Renderer.1.3.0.nupkg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XemioNetwork/GameLibrary/3a644abd58abc12e9db37f9e6af332852e80b2e8/Contrib/Rendering/Xemio.GameLibrary.Rendering.GdiPlus/NuGet/Xemio-GameLibrary-GDI-Renderer.1.3.0.nupkg
--------------------------------------------------------------------------------
/Contrib/Rendering/Xemio.GameLibrary.Rendering.GdiPlus/Serialization/GdiTextureWriter.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Drawing.Imaging;
4 | using System.Linq;
5 | using System.Text;
6 | using System.IO;
7 | using Xemio.GameLibrary.Content.Formats;
8 | using Xemio.GameLibrary.Rendering.Serialization;
9 |
10 | namespace Xemio.GameLibrary.Rendering.GdiPlus.Serialization
11 | {
12 | public class GdiTextureWriter : TextureWriter
13 | {
14 | #region Overrides of TextureWriter
15 | ///
16 | /// Writes the specified texture.
17 | ///
18 | /// The writer.
19 | /// The value.
20 | public override void Write(IFormatWriter writer, ITexture value)
21 | {
22 | var texture = (GdiTexture)value;
23 | texture.Bitmap.Save(writer.Stream, ImageFormat.Png);
24 | }
25 | #endregion
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/Contrib/Rendering/Xemio.GameLibrary.Rendering.GdiPlus/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/Contrib/Rendering/Xemio.GameLibrary.Rendering.GdiPlus/packages.config.orig:
--------------------------------------------------------------------------------
1 |
2 |
3 | <<<<<<< HEAD
4 |
5 | =======
6 |
7 | >>>>>>> 45ee52c071c7dff4fdcc26dd0692330c4ee9d5e6
8 |
--------------------------------------------------------------------------------
/Contrib/Rendering/Xemio.GameLibrary.Rendering.Html5/Geometry/HTMLBrush.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.IO;
6 | using Xemio.GameLibrary.Rendering.Geometry;
7 |
8 | namespace Xemio.GameLibrary.Rendering.HTML5.Geometry
9 | {
10 | public class HTMLBrush : IBrush
11 | {
12 | #region Constructors
13 | ///
14 | /// Initializes a new instance of the class.
15 | ///
16 | public HTMLBrush()
17 | {
18 | }
19 | #endregion
20 |
21 | #region Implementation of IBrush
22 | ///
23 | /// Gets the width.
24 | ///
25 | public int Width { get; private set; }
26 | ///
27 | /// Gets the height.
28 | ///
29 | public int Height { get; private set; }
30 | #endregion
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/Contrib/Rendering/Xemio.GameLibrary.Rendering.Html5/HTMLHelper.cs:
--------------------------------------------------------------------------------
1 | namespace Xemio.GameLibrary.Rendering.HTML5
2 | {
3 | public static class HTMLHelper
4 | {
5 | #region Methods
6 | ///
7 | /// Converts the specified color.
8 | ///
9 | /// The color.
10 | public static string Convert(Color color)
11 | {
12 | return "#" +
13 | color.R.ToString("X") +
14 | color.G.ToString("X") +
15 | color.B.ToString("X") +
16 | color.A.ToString("X");
17 | }
18 | #endregion
19 | }
20 | }
--------------------------------------------------------------------------------
/Contrib/Rendering/Xemio.GameLibrary.Rendering.Html5/HTMLRenderFactory.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.IO;
6 |
7 | namespace Xemio.GameLibrary.Rendering.HTML5
8 | {
9 | public class HTMLRenderFactory : IRenderFactory
10 | {
11 | #region Implementation of IRenderFactory
12 | ///
13 | /// Creates a new render target.
14 | ///
15 | /// The width.
16 | /// The height.
17 | public IRenderTarget CreateTarget(int width, int height)
18 | {
19 | return new HTMLRenderTarget(width, height);
20 | }
21 | #endregion
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/Contrib/Rendering/Xemio.GameLibrary.Rendering.Html5/Serialization/HTMLTextureReader.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.IO;
6 | using Xemio.GameLibrary.Content.Formats;
7 | using Xemio.GameLibrary.Rendering.Serialization;
8 |
9 | namespace Xemio.GameLibrary.Rendering.HTML5.Serialization
10 | {
11 | public class HTMLTextureReader : TextureReader
12 | {
13 | #region Overrides of TextureReader
14 | ///
15 | /// Reads a texture.
16 | ///
17 | /// The reader.
18 | public override ITexture Read(IFormatReader reader)
19 | {
20 | return new HTMLTexture();
21 | }
22 | #endregion
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/Contrib/Rendering/Xemio.GameLibrary.Rendering.Html5/Serialization/HTMLTextureWriter.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.IO;
6 | using Xemio.GameLibrary.Content.Formats;
7 | using Xemio.GameLibrary.Rendering.Serialization;
8 |
9 | namespace Xemio.GameLibrary.Rendering.HTML5.Serialization
10 | {
11 | public class HTMLTextureWriter : TextureWriter
12 | {
13 | #region Overrides of TextureWriter
14 | ///
15 | /// Writes the specified texture.
16 | ///
17 | /// The writer.
18 | /// The value.
19 | public override void Write(IFormatWriter writer, ITexture value)
20 | {
21 | }
22 | #endregion
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/Contrib/Rendering/Xemio.GameLibrary.Rendering.Html5/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/Contrib/Rendering/Xemio.GameLibrary.Rendering.Xna/NuGet/Xemio-GameLibrary-Xna-Renderer.0.2.0.nupkg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XemioNetwork/GameLibrary/3a644abd58abc12e9db37f9e6af332852e80b2e8/Contrib/Rendering/Xemio.GameLibrary.Rendering.Xna/NuGet/Xemio-GameLibrary-Xna-Renderer.0.2.0.nupkg
--------------------------------------------------------------------------------
/Contrib/Rendering/Xemio.GameLibrary.Rendering.Xna/NuGet/Xemio-GameLibrary-Xna-Renderer.0.3.0.nupkg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XemioNetwork/GameLibrary/3a644abd58abc12e9db37f9e6af332852e80b2e8/Contrib/Rendering/Xemio.GameLibrary.Rendering.Xna/NuGet/Xemio-GameLibrary-Xna-Renderer.0.3.0.nupkg
--------------------------------------------------------------------------------
/Contrib/Rendering/Xemio.GameLibrary.Rendering.Xna/NuGet/Xemio-GameLibrary-Xna-Renderer.0.4.0.nupkg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XemioNetwork/GameLibrary/3a644abd58abc12e9db37f9e6af332852e80b2e8/Contrib/Rendering/Xemio.GameLibrary.Rendering.Xna/NuGet/Xemio-GameLibrary-Xna-Renderer.0.4.0.nupkg
--------------------------------------------------------------------------------
/Contrib/Rendering/Xemio.GameLibrary.Rendering.Xna/Serialization/XnaTextureReader.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.IO;
6 | using Microsoft.Xna.Framework.Graphics;
7 | using Xemio.GameLibrary.Content.Formats;
8 | using Xemio.GameLibrary.Rendering.Serialization;
9 |
10 | namespace Xemio.GameLibrary.Rendering.Xna.Serialization
11 | {
12 | public class XnaTextureReader : TextureReader
13 | {
14 | #region Overrides of TextureReader
15 | ///
16 | /// Reads a texture out of the specified stream.
17 | ///
18 | /// The reader.
19 | public override ITexture Read(IFormatReader reader)
20 | {
21 | return new XnaTexture(Texture2D.FromStream(XnaHelper.GraphicsDevice, reader.Stream));
22 | }
23 | #endregion
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/Contrib/Rendering/Xemio.GameLibrary.Rendering.Xna/Serialization/XnaTextureWriter.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.IO;
6 | using Xemio.GameLibrary.Content.Formats;
7 | using Xemio.GameLibrary.Rendering.Serialization;
8 |
9 | namespace Xemio.GameLibrary.Rendering.Xna.Serialization
10 | {
11 | public class XnaTextureWriter : TextureWriter
12 | {
13 | #region Overrides of TextureWriter
14 | ///
15 | /// Writes the specified texture.
16 | ///
17 | /// The writer.
18 | /// The value.
19 | public override void Write(IFormatWriter writer, ITexture value)
20 | {
21 | XnaTexture texture = (XnaTexture)value;
22 | texture.Texture.SaveAsPng(writer.Stream, texture.Width, texture.Height);
23 | }
24 | #endregion
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/Contrib/Rendering/Xemio.GameLibrary.Rendering.Xna/XnaRenderFactory.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.IO;
6 |
7 | namespace Xemio.GameLibrary.Rendering.Xna
8 | {
9 | public class XnaRenderFactory : IRenderFactory
10 | {
11 | #region Implementation of IRenderFactory
12 | ///
13 | /// Creates a new render target.
14 | ///
15 | /// The width.
16 | /// The height.
17 | public IRenderTarget CreateTarget(int width, int height)
18 | {
19 | return new XnaRenderTarget(width, height);
20 | }
21 | #endregion
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/Contrib/Rendering/Xemio.GameLibrary.Rendering.Xna/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/Contrib/Rendering/Xemio.GameLibrary.Rendering.Xna/packages.config.orig:
--------------------------------------------------------------------------------
1 |
2 |
3 | <<<<<<< HEAD
4 |
5 | =======
6 |
7 | >>>>>>> 45ee52c071c7dff4fdcc26dd0692330c4ee9d5e6
8 |
--------------------------------------------------------------------------------
/Contrib/Sound/Xemio.GameLibrary.Sound.WPF/SoundDisposer.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.IO;
6 |
7 | namespace Xemio.GameLibrary.Sound.WPF
8 | {
9 | internal class SoundDisposer : IDisposable
10 | {
11 | #region Constructors
12 | ///
13 | /// Initializes a new instance of the class.
14 | ///
15 | /// The sound.
16 | public SoundDisposer(WPFSound sound)
17 | {
18 | this.Sound = sound;
19 | }
20 | #endregion
21 |
22 | #region Properties
23 | ///
24 | /// Gets the sound.
25 | ///
26 | public WPFSound Sound { get; private set; }
27 | #endregion
28 |
29 | #region IDisposable Member
30 | ///
31 | /// Disposes this instance.
32 | ///
33 | public void Dispose()
34 | {
35 | this.Sound.MediaPlayer.Stop();
36 | }
37 | #endregion
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/Contrib/Sound/Xemio.GameLibrary.Sound.WPF/WPFSoundFactory.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.IO;
6 |
7 | namespace Xemio.GameLibrary.Sound.WPF
8 | {
9 | internal class WPFSoundFactory : ISoundFactory
10 | {
11 | #region ISoundFactory Member
12 | ///
13 | /// Creates a sound.
14 | ///
15 | /// Name of the file.
16 | ///
17 | public ISound CreateSound(string fileName)
18 | {
19 | ISound sound = new WPFSound(fileName);
20 | sound.Radius = float.MaxValue;
21 |
22 | return sound;
23 | }
24 | #endregion
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/Contrib/Sound/Xemio.GameLibrary.Sound.WPF/WPFSoundInitializer.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.IO;
6 |
7 | namespace Xemio.GameLibrary.Sound.WPF
8 | {
9 | public class WPFSoundInitializer : ISoundInitializer
10 | {
11 | #region ISoundInitializer Member
12 | ///
13 | /// Creates the provider.
14 | ///
15 | public ISoundProvider CreateProvider()
16 | {
17 | return new WPFSoundProvider();
18 | }
19 | #endregion
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/Contrib/Sound/Xemio.GameLibrary.Sound.WPF/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/Contrib/Testing/Xemio.Contrib.Testing.HTML5/Properties/Settings.settings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/Contrib/Testing/Xemio.Contrib.Testing.HTML5/TestScene.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.IO;
6 | using Xemio.GameLibrary.Game.Scenes;
7 | using Xemio.GameLibrary.Math;
8 |
9 | namespace Xemio.Contrib.Testing.HTML5
10 | {
11 | public class TestScene : Scene
12 | {
13 | #region Fields
14 | private Vector2 _position;
15 | #endregion
16 |
17 | #region Methods
18 | public override void Tick(float elapsed)
19 | {
20 | this._position += new Vector2(1, 1);
21 | base.Tick(elapsed);
22 | }
23 | public override void Render()
24 | {
25 | this.GeometryManager.FillRectangle(null, new Rectangle(0, 0, 20, 20) + this._position);
26 | base.Render();
27 | }
28 | #endregion
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/Contrib/Testing/Xemio.Contrib.Testing.HTML5/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/Contrib/Testing/Xemio.Contrib.Testing.Syncput/MainForm.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.ComponentModel;
4 | using System.Data;
5 | using System.Drawing;
6 | using System.Linq;
7 | using System.Text;
8 | using System.Windows.Forms;
9 |
10 | namespace Xemio.Contrib.Testing.Syncput
11 | {
12 | public partial class MainForm : Form
13 | {
14 | public MainForm()
15 | {
16 | InitializeComponent();
17 | }
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/Contrib/Testing/Xemio.Contrib.Testing.Syncput/Properties/Settings.settings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/Contrib/Testing/Xemio.Contrib.Testing.Syncput/Resources/boy.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XemioNetwork/GameLibrary/3a644abd58abc12e9db37f9e6af332852e80b2e8/Contrib/Testing/Xemio.Contrib.Testing.Syncput/Resources/boy.png
--------------------------------------------------------------------------------
/Contrib/Testing/Xemio.Contrib.Testing.Syncput/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/Contrib/Testing/Xemio.Contrib.Testing.Syncput/packages.config.orig:
--------------------------------------------------------------------------------
1 |
2 |
3 | <<<<<<< HEAD
4 |
5 | =======
6 |
7 | >>>>>>> 45ee52c071c7dff4fdcc26dd0692330c4ee9d5e6
8 |
--------------------------------------------------------------------------------
/Contrib/Testing/Xemio.Contrib.Testing.Xna/GameForm.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.ComponentModel;
4 | using System.Data;
5 | using System.Drawing;
6 | using System.Linq;
7 | using System.Text;
8 | using System.Windows.Forms;
9 |
10 | namespace Xemio.Contrib.Testing.Xna
11 | {
12 | public partial class GameForm : Form
13 | {
14 | public GameForm()
15 | {
16 | InitializeComponent();
17 | }
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/Contrib/Testing/Xemio.Contrib.Testing.Xna/Properties/Settings.settings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/Contrib/Testing/Xemio.Contrib.Testing.Xna/TestScene2.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.IO;
6 | using Xemio.GameLibrary.Game.Scenes;
7 | using Xemio.GameLibrary.Rendering;
8 |
9 | namespace Xemio.Contrib.Testing.Xna
10 | {
11 | public class TestScene2 : Scene
12 | {
13 | #region Constructors
14 | public TestScene2()
15 | {
16 |
17 | }
18 | #endregion
19 |
20 | #region Fields
21 |
22 | #endregion
23 |
24 | #region Properties
25 |
26 | #endregion
27 |
28 | #region Methods
29 | public override void Render()
30 | {
31 | this.GraphicsDevice.Clear(Color.Red);
32 | }
33 | #endregion
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/Contrib/Testing/Xemio.Contrib.Testing.Xna/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/Contrib/Testing/Xemio.Contrib.Testing.Xna/packages.config.orig:
--------------------------------------------------------------------------------
1 |
2 |
3 | <<<<<<< HEAD
4 |
5 | =======
6 |
7 | >>>>>>> 45ee52c071c7dff4fdcc26dd0692330c4ee9d5e6
8 |
--------------------------------------------------------------------------------
/Contrib/Testing/Xemio.Contrib.Testing.Xna/res/tilesheet.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XemioNetwork/GameLibrary/3a644abd58abc12e9db37f9e6af332852e80b2e8/Contrib/Testing/Xemio.Contrib.Testing.Xna/res/tilesheet.png
--------------------------------------------------------------------------------
/GameLibrary/BasicConfigurator.cs:
--------------------------------------------------------------------------------
1 | using Xemio.GameLibrary.Common;
2 | using Xemio.GameLibrary.Config;
3 | using Xemio.GameLibrary.Content;
4 | using Xemio.GameLibrary.Content.FileSystem;
5 | using Xemio.GameLibrary.Content.FileSystem.Disk;
6 | using Xemio.GameLibrary.Content.Formats;
7 | using Xemio.GameLibrary.Events;
8 | using Xemio.GameLibrary.Plugins.Implementations;
9 |
10 | namespace Xemio.GameLibrary
11 | {
12 | public class BasicConfigurator
13 | {
14 | #region Static Methods
15 | ///
16 | /// Configures the XGL core components to provide access to core functionality.
17 | ///
18 | public static void Configure()
19 | {
20 | var config = Fluently.Configure()
21 | .ContentFormat(Format.Xml)
22 | .CreatePlayerInput()
23 | .DisableSplashScreen()
24 | .FileSystem(new DiskFileSystem());
25 |
26 | XGL.Run(config);
27 | }
28 | #endregion
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/GameLibrary/Common/Collections/AutoProtectedDictionary.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 |
4 | namespace Xemio.GameLibrary.Common.Collections
5 | {
6 | public class AutoProtectedDictionary : ProtectedDictionary, IEnumerable>
7 | {
8 | #region Overrides of ProtectedDictionary
9 | ///
10 | /// Gets the enumerator.
11 | ///
12 | public new IEnumerator> GetEnumerator()
13 | {
14 | using (this.Protect())
15 | {
16 | IEnumerator> enumerator = base.GetEnumerator();
17 | while (enumerator.MoveNext())
18 | {
19 | yield return enumerator.Current;
20 | }
21 | }
22 | }
23 | #endregion
24 | }
25 | }
26 |
27 |
--------------------------------------------------------------------------------
/GameLibrary/Common/Collections/AutoProtectedList.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 |
7 | namespace Xemio.GameLibrary.Common.Collections
8 | {
9 | public class AutoProtectedList : ProtectedList
10 | {
11 | #region Overrides of ProtectedList
12 | ///
13 | /// Gets the enumerator.
14 | ///
15 | public override IEnumerator GetEnumerator()
16 | {
17 | using (this.Protect())
18 | {
19 | IEnumerator enumerator = base.GetEnumerator();
20 | while (enumerator.MoveNext())
21 | {
22 | yield return enumerator.Current;
23 | }
24 | }
25 | }
26 | #endregion
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/GameLibrary/Common/Collections/DictionaryActions/ClearAction.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.IO;
6 |
7 | namespace Xemio.GameLibrary.Common.Collections.DictionaryActions
8 | {
9 | internal class ClearAction : IDictionaryAction
10 | {
11 | #region Implementation of IDictionaryAction
12 | ///
13 | /// Clears the dictionary.
14 | ///
15 | /// The dictionary.
16 | public void Apply(Dictionary dictionary)
17 | {
18 | dictionary.Clear();
19 | }
20 | #endregion
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/GameLibrary/Common/Collections/DictionaryActions/IDictionaryAction.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.IO;
6 |
7 | namespace Xemio.GameLibrary.Common.Collections.DictionaryActions
8 | {
9 | internal interface IDictionaryAction
10 | {
11 | ///
12 | /// Applies the action to the specified dictionary.
13 | ///
14 | /// The dictionary.
15 | void Apply(Dictionary dictionary);
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/GameLibrary/Common/Collections/IComputationProvider.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 |
7 | namespace Xemio.GameLibrary.Common.Collections
8 | {
9 | public interface IComputationProvider
10 | {
11 | ///
12 | /// Computes the specified key.
13 | ///
14 | /// The key.
15 | TValue Compute(TKey key);
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/GameLibrary/Common/Collections/IStorage.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 |
6 | namespace Xemio.GameLibrary.Common.Collections
7 | {
8 | public interface IStorage
9 | {
10 | ///
11 | /// Stores the specified value.
12 | ///
13 | /// The value type.
14 | /// The value.
15 | void Store(T value);
16 | ///
17 | /// Retrieves a value of the specified type.
18 | ///
19 | /// The value type.
20 | T Retrieve();
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/GameLibrary/Common/Collections/ListActions/AddAction.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 |
3 | namespace Xemio.GameLibrary.Common.Collections.ListActions
4 | {
5 | internal class AddAction : IListAction
6 | {
7 | #region Constructors
8 | ///
9 | /// Initializes a new instance of the class.
10 | ///
11 | /// The value.
12 | public AddAction(T value)
13 | {
14 | this.Value = value;
15 | }
16 | #endregion
17 |
18 | #region Properties
19 | ///
20 | /// Gets the value.
21 | ///
22 | public T Value { get; private set; }
23 | #endregion
24 |
25 | #region Implementation of IListAction
26 | ///
27 | /// Adds the item to the list.
28 | ///
29 | /// The list.
30 | public void Apply(List list)
31 | {
32 | list.Add(this.Value);
33 | }
34 | #endregion
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/GameLibrary/Common/Collections/ListActions/ClearAction.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 |
3 | namespace Xemio.GameLibrary.Common.Collections.ListActions
4 | {
5 | internal class ClearAction : IListAction
6 | {
7 | #region Implementation of IListAction
8 | ///
9 | /// Clears the list.
10 | ///
11 | /// The list.
12 | public void Apply(List list)
13 | {
14 | list.Clear();
15 | }
16 | #endregion
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/GameLibrary/Common/Collections/ListActions/IListAction.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 |
3 | namespace Xemio.GameLibrary.Common.Collections.ListActions
4 | {
5 | internal interface IListAction
6 | {
7 | ///
8 | /// Applies action to the specified list.
9 | ///
10 | /// The list.
11 | void Apply(List list);
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/GameLibrary/Common/Collections/ListActions/RemoveAction.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 |
3 | namespace Xemio.GameLibrary.Common.Collections.ListActions
4 | {
5 | internal class RemoveAction : IListAction
6 | {
7 | #region Constructors
8 | ///
9 | /// Initializes a new instance of the class.
10 | ///
11 | /// The value.
12 | public RemoveAction(T value)
13 | {
14 | this.Value = value;
15 | }
16 | #endregion
17 |
18 | #region Properties
19 | ///
20 | /// Gets the value.
21 | ///
22 | public T Value { get; private set; }
23 | #endregion
24 |
25 | #region Implementation of IListAction
26 | ///
27 | /// Removes the specified item from the list.
28 | ///
29 | /// The list.
30 | public void Apply(List list)
31 | {
32 | list.Remove(this.Value);
33 | }
34 | #endregion
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/GameLibrary/Common/Collections/ListActions/RemoveAtAction.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 |
3 | namespace Xemio.GameLibrary.Common.Collections.ListActions
4 | {
5 | internal class RemoveAtAction : IListAction
6 | {
7 | #region Constructors
8 | ///
9 | /// Initializes a new instance of the class.
10 | ///
11 | /// The index.
12 | public RemoveAtAction(int index)
13 | {
14 | this.Index = index;
15 | }
16 | #endregion
17 |
18 | #region Properties
19 | ///
20 | /// Gets the index.
21 | ///
22 | public int Index { get; private set; }
23 | #endregion
24 |
25 | #region Implementation of IListAction
26 | ///
27 | /// Applies action to the specified list.
28 | ///
29 | /// The list.
30 | public void Apply(List list)
31 | {
32 | list.RemoveAt(this.Index);
33 | }
34 | #endregion
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/GameLibrary/Common/Disposable.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 |
6 | namespace Xemio.GameLibrary.Common
7 | {
8 | public static class Disposable
9 | {
10 | #region Static Methods
11 | ///
12 | /// Combines the specified disposables.
13 | ///
14 | /// The disposables.
15 | public static IDisposable Combine(params IDisposable[] disposables)
16 | {
17 | return new ActionDisposable(() =>
18 | {
19 | foreach (IDisposable disposable in disposables)
20 | {
21 | disposable.Dispose();
22 | }
23 | });
24 | }
25 | #endregion
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/GameLibrary/Common/ImageExtensions.cs:
--------------------------------------------------------------------------------
1 | using System.Drawing;
2 | using System.Drawing.Imaging;
3 | using System.IO;
4 |
5 | namespace Xemio.GameLibrary.Common
6 | {
7 | public static class ImageExtensions
8 | {
9 | ///
10 | /// Creates a stream with the content of the image.
11 | ///
12 | /// The image.
13 | public static MemoryStream ToStream(this Image image)
14 | {
15 | var stream = new MemoryStream();
16 |
17 | image.Save(stream, ImageFormat.Png);
18 | stream.Seek(0, SeekOrigin.Begin);
19 |
20 | return stream;
21 | }
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/GameLibrary/Common/Lambdas.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Linq.Expressions;
5 | using System.Text;
6 |
7 | namespace Xemio.GameLibrary.Common
8 | {
9 | public static class Lambdas
10 | {
11 | #region Methods
12 | ///
13 | /// Returns a that represents the specified expression.
14 | ///
15 | /// The expression.
16 | public static string ToString(Expression expression)
17 | {
18 | return Lambdas.ToString((LambdaExpression)expression);
19 | }
20 | ///
21 | /// Returns a that represents the specified expression.
22 | ///
23 | /// The expression.
24 | public static string ToString(LambdaExpression expression)
25 | {
26 | string body = expression.Body.ToString();
27 | body = body.Replace("AndAlso", "&&");
28 |
29 | return body;
30 | }
31 | #endregion
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/GameLibrary/Common/Link/CreationType.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.IO;
6 |
7 | namespace Xemio.GameLibrary.Common.Link
8 | {
9 | public enum CreationType
10 | {
11 | Singleton = 0,
12 | New = 1
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/GameLibrary/Common/Link/DuplicateBehavior.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 |
7 | namespace Xemio.GameLibrary.Common.Link
8 | {
9 | public enum DuplicateBehavior
10 | {
11 | Ignore,
12 | Override
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/GameLibrary/Common/Link/ILinkable.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.IO;
6 |
7 | namespace Xemio.GameLibrary.Common.Link
8 | {
9 | public interface ILinkable
10 | {
11 | ///
12 | /// Gets the identifier for the current instance.
13 | ///
14 | T Id { get; }
15 | }
16 | public interface ILinkable : ILinkable
17 | {
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/GameLibrary/Common/Link/ManuallyLinkedAttribute.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.IO;
6 |
7 | namespace Xemio.GameLibrary.Common.Link
8 | {
9 | public class ManuallyLinkedAttribute : Attribute
10 | {
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/GameLibrary/Common/Parser/ITypedParser.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using Xemio.GameLibrary.Common.Link;
3 |
4 | namespace Xemio.GameLibrary.Common.Parser
5 | {
6 | public interface ITypedParser : ILinkable
7 | {
8 | ///
9 | /// Parses the specified input.
10 | ///
11 | /// The input.
12 | ParserResult Parse(string input);
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/GameLibrary/Common/Parser/Primitives/BooleanParser.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace Xemio.GameLibrary.Common.Parser.Primitives
4 | {
5 | public class BooleanParser : ITypedParser
6 | {
7 | #region Implementation of ITypeConverter
8 | ///
9 | /// Parses the specified input.
10 | ///
11 | /// The input.
12 | public ParserResult Parse(string input)
13 | {
14 | bool value;
15 | bool succeed = bool.TryParse(input, out value);
16 |
17 | return new ParserResult(succeed, value);
18 | }
19 | ///
20 | /// Gets the identifier for the current instance.
21 | ///
22 | public Type Id
23 | {
24 | get { return typeof(bool); }
25 | }
26 | #endregion
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/GameLibrary/Common/Parser/Primitives/CharParser.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace Xemio.GameLibrary.Common.Parser.Primitives
4 | {
5 | public class CharParser : ITypedParser
6 | {
7 | #region Implementation of ITypeConverter
8 | ///
9 | /// Parses the specified input.
10 | ///
11 | /// The input.
12 | public ParserResult Parse(string input)
13 | {
14 | char value;
15 | bool succeed = char.TryParse(input, out value);
16 |
17 | return new ParserResult(succeed, value);
18 | }
19 | ///
20 | /// Gets the identifier for the current instance.
21 | ///
22 | public Type Id
23 | {
24 | get { return typeof(char); }
25 | }
26 | #endregion
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/GameLibrary/Common/Parser/Primitives/NumericParser.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace Xemio.GameLibrary.Common.Parser.Primitives
4 | {
5 | public class NumericParser : ITypedParser
6 | {
7 | #region Implementation of ITypeConverter
8 | ///
9 | /// Parses the specified input.
10 | ///
11 | /// The input.
12 | public ParserResult Parse(string input)
13 | {
14 | double value;
15 | bool succeed = double.TryParse(input, out value);
16 |
17 | return new ParserResult(succeed, value);
18 | }
19 | ///
20 | /// Gets the identifier for the current instance.
21 | ///
22 | public Type Id
23 | {
24 | get { return typeof(double); }
25 | }
26 | #endregion
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/GameLibrary/Common/Randomization/SeedableRandom.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.IO;
6 |
7 | namespace Xemio.GameLibrary.Common.Randomization
8 | {
9 | public class SeedableRandom : SimpleRandom
10 | {
11 | #region Fields
12 | private int _seed;
13 | #endregion
14 |
15 | #region ISeedable Member
16 | ///
17 | /// Gets or sets the seed.
18 | ///
19 | public int Seed
20 | {
21 | get { return this._seed; }
22 | set
23 | {
24 | this._seed = value;
25 | this._random = new System.Random(this._seed);
26 | }
27 | }
28 | #endregion
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/GameLibrary/Common/References/IReference.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 |
6 | namespace Xemio.GameLibrary.Common.References
7 | {
8 | public interface IReference
9 | {
10 | ///
11 | /// Gets the value.
12 | ///
13 | T Value { get; }
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/GameLibrary/Common/References/StaticReference.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 |
6 | namespace Xemio.GameLibrary.Common.References
7 | {
8 | public class StaticReference : IReference
9 | {
10 | #region Constructors
11 | ///
12 | /// Initializes a new instance of the class.
13 | ///
14 | /// The value.
15 | public StaticReference(T value)
16 | {
17 | this.Value = value;
18 | }
19 | #endregion
20 |
21 | #region Implementation of IReference
22 | ///
23 | /// Gets the value.
24 | ///
25 | public T Value { get; private set; }
26 | #endregion
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/GameLibrary/Common/Singleton.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.IO;
6 |
7 | namespace Xemio.GameLibrary.Common
8 | {
9 | public static class Singleton where T : class, new()
10 | {
11 | #region Fields
12 | private static readonly T _instance = new T();
13 | #endregion
14 |
15 | #region Properties
16 | ///
17 | /// Gets the static singleton instance.
18 | ///
19 | public static T Value
20 | {
21 | get { return _instance; }
22 | }
23 | #endregion
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/GameLibrary/Common/Threads/IThreadInvoker.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using Xemio.GameLibrary.Components;
3 | using Xemio.GameLibrary.Components.Attributes;
4 |
5 | namespace Xemio.GameLibrary.Common.Threads
6 | {
7 | [Abstraction]
8 | public interface IThreadInvoker : IComponent
9 | {
10 | ///
11 | /// Invokes the specified action.
12 | ///
13 | /// The action.
14 | void Invoke(Action action);
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/GameLibrary/Common/Threads/ThreadStartBehavior.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 |
6 | namespace Xemio.GameLibrary.Common.Threads
7 | {
8 | public enum ThreadStartBehavior
9 | {
10 | Manual,
11 | AutoStart
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/GameLibrary/Components/Attributes/AbstractionAttribute.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace Xemio.GameLibrary.Components.Attributes
4 | {
5 | ///
6 | /// Used above interfaces that should be used as abstractions in the component manager.
7 | /// So every class implementing the interface will be resolvable with it.
8 | ///
9 | public class AbstractionAttribute : Attribute
10 | {
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/GameLibrary/Components/Attributes/RequireAttribute.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace Xemio.GameLibrary.Components.Attributes
4 | {
5 | [AttributeUsage(AttributeTargets.Class, AllowMultiple = true)]
6 |
7 | public class RequireAttribute : Attribute
8 | {
9 | #region Constructors
10 | ///
11 | /// Initializes a new instance of the class.
12 | ///
13 | /// The component type.
14 | public RequireAttribute(Type componentType)
15 | {
16 | if (!typeof(IComponent).IsAssignableFrom(componentType))
17 | {
18 | throw new InvalidOperationException("You can only require components that are directly inherited from IComponent.");
19 | }
20 |
21 | this.ComponentType = componentType;
22 | }
23 | #endregion
24 |
25 | #region Properties
26 | ///
27 | /// Gets the type.
28 | ///
29 | public Type ComponentType { get; private set; }
30 | #endregion
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/GameLibrary/Components/IComponent.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.IO;
6 |
7 | namespace Xemio.GameLibrary.Components
8 | {
9 | public interface IComponent
10 | {
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/GameLibrary/Components/IComponentCatalog.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 | using Xemio.GameLibrary.Common.Collections;
7 |
8 | namespace Xemio.GameLibrary.Components
9 | {
10 | public interface IComponentCatalog : ICatalog, IEnumerable
11 | {
12 | ///
13 | /// Constructs all loaded components.
14 | ///
15 | void Construct();
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/GameLibrary/Components/IConstructable.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.IO;
6 |
7 | namespace Xemio.GameLibrary.Components
8 | {
9 | public interface IConstructable : IComponent
10 | {
11 | ///
12 | /// Constructs this instance.
13 | ///
14 | void Construct();
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/GameLibrary/Config/Dependencies/Dependency.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using Xemio.GameLibrary.Config.Installation;
3 |
4 | namespace Xemio.GameLibrary.Config.Dependencies
5 | {
6 | internal class Dependency
7 | {
8 | #region Constructors
9 | ///
10 | /// Initializes a new instance of the class.
11 | ///
12 | /// The exists function.
13 | /// The create installer.
14 | public Dependency(Func exists, Func createInstaller)
15 | {
16 | this.Exists = exists;
17 | this.CreateInstaller = createInstaller;
18 | }
19 | #endregion
20 |
21 | #region Properties
22 | ///
23 | /// Gets the exists function.
24 | ///
25 | public Func Exists { get; private set; }
26 | ///
27 | /// Gets the installer factory method.
28 | ///
29 | public Func CreateInstaller { get; private set; }
30 | #endregion
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/GameLibrary/Config/Dependencies/DependencyException.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace Xemio.GameLibrary.Config.Dependencies
4 | {
5 | public class DependencyException : Exception
6 | {
7 | #region Constructors
8 | ///
9 | /// Initializes a new instance of the class.
10 | ///
11 | /// Type of the installer.
12 | public DependencyException(Type installerType) : base(string.Format("Installer [{0}] was required by another installer." +
13 | "Make sure to provide the specified installer inside the configuration.", installerType))
14 | {
15 | this.InstallerType = installerType;
16 | }
17 | #endregion
18 |
19 | #region Properties
20 | ///
21 | /// Gets the type of the installer.
22 | ///
23 | public Type InstallerType { get; private set; }
24 | #endregion
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/GameLibrary/Config/Fluently.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 |
6 | namespace Xemio.GameLibrary.Config
7 | {
8 | public static class Fluently
9 | {
10 | #region Methods
11 | ///
12 | /// Returns a fluent configuration providing access to extension methods to fluently configure the XGL.
13 | ///
14 | public static FluentConfiguration Configure()
15 | {
16 | return new FluentConfiguration();
17 | }
18 | #endregion
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/GameLibrary/Config/IConfigurationAccess.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 |
6 | namespace Xemio.GameLibrary.Config
7 | {
8 | public interface IConfigurationAccess
9 | {
10 | ///
11 | /// Gets the configuration.
12 | ///
13 | Configuration Configuration { get; }
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/GameLibrary/Config/Installation/EventInstaller.cs:
--------------------------------------------------------------------------------
1 | using Xemio.GameLibrary.Components;
2 | using Xemio.GameLibrary.Events;
3 |
4 | namespace Xemio.GameLibrary.Config.Installation
5 | {
6 | public class EventInstaller : AbstractInstaller
7 | {
8 | #region Implementation of IInstaller
9 | ///
10 | /// Installs this instance.
11 | ///
12 | /// The configuration.
13 | /// The catalog.
14 | public override void Install(Configuration configuration, IComponentCatalog catalog)
15 | {
16 | var eventManager = new EventManager();
17 | eventManager.LoadEventsFromAssemblyOf();
18 |
19 | catalog.Install(eventManager);
20 | }
21 | #endregion
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/GameLibrary/Config/Installation/INestedInstaller.cs:
--------------------------------------------------------------------------------
1 | namespace Xemio.GameLibrary.Config.Installation
2 | {
3 | public interface INestedInstaller : IInstaller
4 | {
5 | ///
6 | /// Gets the child.
7 | ///
8 | IInstaller Child { get; }
9 | }
10 |
11 | public static class NestedInstallerExtensions
12 | {
13 | public static IInstaller Unwrap(this IInstaller installer)
14 | {
15 | IInstaller current = installer;
16 | while (current is INestedInstaller)
17 | {
18 | var currentNested = (INestedInstaller)current;
19 | current = currentNested.Child;
20 | }
21 |
22 | return current;
23 | }
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/GameLibrary/Config/Installation/PluginInstaller.cs:
--------------------------------------------------------------------------------
1 | using Xemio.GameLibrary.Components;
2 | using Xemio.GameLibrary.Plugins;
3 | using Xemio.GameLibrary.Plugins.Implementations;
4 |
5 | namespace Xemio.GameLibrary.Config.Installation
6 | {
7 | public class PluginInstaller : AbstractInstaller
8 | {
9 | #region Overrides of AbstractInstaller
10 | ///
11 | /// Installs this instance.
12 | ///
13 | /// The configuration.
14 | /// The catalog.
15 | public override void Install(Configuration configuration, IComponentCatalog catalog)
16 | {
17 | catalog.Install(new LibraryLoader());
18 | catalog.Install(new ImplementationManager());
19 | }
20 | #endregion
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/GameLibrary/Config/Installation/SerializationInstaller.cs:
--------------------------------------------------------------------------------
1 | using Xemio.GameLibrary.Components;
2 | using Xemio.GameLibrary.Content;
3 |
4 | namespace Xemio.GameLibrary.Config.Installation
5 | {
6 | public class SerializationInstaller : AbstractInstaller
7 | {
8 | #region Implementation of IInstaller
9 | ///
10 | /// Installs this instance.
11 | ///
12 | /// The configuration.
13 | /// The catalog.
14 | public override void Install(Configuration configuration, IComponentCatalog catalog)
15 | {
16 | catalog.Install(new SerializationManager());
17 | }
18 | #endregion
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/GameLibrary/Config/Installation/ThreadInstaller.cs:
--------------------------------------------------------------------------------
1 | using Xemio.GameLibrary.Common.Threads;
2 | using Xemio.GameLibrary.Components;
3 |
4 | namespace Xemio.GameLibrary.Config.Installation
5 | {
6 | public class ThreadInstaller : AbstractInstaller
7 | {
8 | #region Overrides of AbstractInstaller
9 | ///
10 | /// Installs this instance.
11 | ///
12 | /// The configuration.
13 | /// The catalog.
14 | public override void Install(Configuration configuration, IComponentCatalog catalog)
15 | {
16 | catalog.Install(new ThreadInvoker());
17 | }
18 | #endregion
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/GameLibrary/Config/Validation/ComponentNotExists.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using Xemio.GameLibrary.Components;
6 |
7 | namespace Xemio.GameLibrary.Config.Validation
8 | {
9 | public class ComponentNotExists : IValidator where T : IComponent
10 | {
11 | #region Implementation of IValidator
12 | ///
13 | /// Gets the default message.
14 | ///
15 | public string DefaultMessage
16 | {
17 | get { return "Component " + typeof (T) + " is required to not be existent inside the component registry."; }
18 | }
19 | ///
20 | /// Gets a value indicating whether the condition is fulfilled.
21 | ///
22 | /// The configuration.
23 | /// The catalog.
24 | public bool Validate(Configuration configuration, IComponentCatalog catalog)
25 | {
26 | return catalog.Get() == null;
27 | }
28 | #endregion
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/GameLibrary/Config/Validation/IValidator.cs:
--------------------------------------------------------------------------------
1 | using Xemio.GameLibrary.Components;
2 |
3 | namespace Xemio.GameLibrary.Config.Validation
4 | {
5 | public interface IValidator
6 | {
7 | ///
8 | /// Gets the default message.
9 | ///
10 | string DefaultMessage { get; }
11 | ///
12 | /// Gets a value indicating whether the condition is fulfilled.
13 | ///
14 | /// The configuration.
15 | /// The catalog.
16 | bool Validate(Configuration configuration, IComponentCatalog catalog);
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/GameLibrary/Config/Validation/InstallerNotExists.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using Xemio.GameLibrary.Components;
6 | using Xemio.GameLibrary.Config.Installation;
7 |
8 | namespace Xemio.GameLibrary.Config.Validation
9 | {
10 | public class InstallerNotExists : IValidator where T : IInstaller
11 | {
12 | #region Implementation of IValidator
13 | ///
14 | /// Gets the default message.
15 | ///
16 | public string DefaultMessage
17 | {
18 | get { return "Installer " + typeof(T) + " is required to be not existent inside the component registry."; }
19 | }
20 | ///
21 | /// Gets a value indicating whether the condition is fulfilled.
22 | ///
23 | /// The configuration.
24 | /// The catalog.
25 | public bool Validate(Configuration configuration, IComponentCatalog catalog)
26 | {
27 | return !configuration.Contains();
28 | }
29 | #endregion
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/GameLibrary/Config/Validation/RequireComponent.cs:
--------------------------------------------------------------------------------
1 | using Xemio.GameLibrary.Components;
2 |
3 | namespace Xemio.GameLibrary.Config.Validation
4 | {
5 | public class RequireComponent : IValidator where T : class, IComponent
6 | {
7 | #region Implementation of ICondition
8 | ///
9 | /// Gets the default message.
10 | ///
11 | public string DefaultMessage
12 | {
13 | get { return "Component " + typeof (T) + " is required by an installer. Make sure you installed the missing component."; }
14 | }
15 | ///
16 | /// Gets a value indicating whether the condition is fulfilled.
17 | ///
18 | /// The configuration.
19 | /// The catalog.
20 | public bool Validate(Configuration configuration, IComponentCatalog catalog)
21 | {
22 | return catalog.Get() != null;
23 | }
24 | #endregion
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/GameLibrary/Config/Validation/RequireInstaller.cs:
--------------------------------------------------------------------------------
1 | using Xemio.GameLibrary.Components;
2 | using Xemio.GameLibrary.Config.Installation;
3 |
4 | namespace Xemio.GameLibrary.Config.Validation
5 | {
6 | public class RequireInstaller : IValidator where T : class, IInstaller
7 | {
8 | #region Implementation of ICondition
9 | ///
10 | /// Gets the default message.
11 | ///
12 | public string DefaultMessage
13 | {
14 | get { return "Installer " + typeof (T) + " is required by an installer. Make sure you installed the missing installer."; }
15 | }
16 | ///
17 | /// Gets a value indicating whether the condition is fulfilled.
18 | ///
19 | /// The configuration.
20 | /// The catalog.
21 | public bool Validate(Configuration configuration, IComponentCatalog catalog)
22 | {
23 | return configuration.Contains();
24 | }
25 | #endregion
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/GameLibrary/Config/Validation/ValidationException.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 |
6 | namespace Xemio.GameLibrary.Config.Validation
7 | {
8 | public class ValidationException : Exception
9 | {
10 | #region Constructors
11 | ///
12 | /// Initializes a new instance of the class.
13 | ///
14 | /// The entry.
15 | internal ValidationException(ValidationEntry entry) : base("Validation failed: " + entry.ErrorMessage + ".")
16 | {
17 | this.Validator = entry.Validator;
18 | }
19 | #endregion
20 |
21 | #region Properties
22 | ///
23 | /// Gets the validator.
24 | ///
25 | public IValidator Validator { get; private set; }
26 | #endregion
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/GameLibrary/Config/Validation/ValidationScope.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 |
6 | namespace Xemio.GameLibrary.Config.Validation
7 | {
8 | public enum ValidationScope
9 | {
10 | Pre,
11 | Install,
12 | Post
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/GameLibrary/Content/Caching/InstanceNotCachedException.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 |
6 | namespace Xemio.GameLibrary.Content.Caching
7 | {
8 | public class InstanceNotCachedException : Exception
9 | {
10 | #region Constructors
11 | ///
12 | /// Initializes a new instance of the class.
13 | ///
14 | /// The instance.
15 | public InstanceNotCachedException(object instance)
16 | : base("The file name for instance '" + instance + "' does not exist inside the file cache. " +
17 | "Please load or save it first using the content manager.")
18 | {
19 | this.Instance = instance;
20 | }
21 | #endregion
22 |
23 | #region Properties
24 | ///
25 | /// Gets the instance.
26 | ///
27 | public object Instance { get; private set; }
28 | #endregion
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/GameLibrary/Content/Exceptions/DuplicateGuidException.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 |
6 | namespace Xemio.GameLibrary.Content.Exceptions
7 | {
8 | public class DuplicateGuidException : Exception
9 | {
10 | #region Constructors
11 | ///
12 | /// Initializes a new instance of the class.
13 | ///
14 | /// The unique identifier.
15 | public DuplicateGuidException(Guid guid) : base("Invalid meta data files: Multiple files contain the same guid " + guid.ToString("D") + ".")
16 | {
17 | this.Guid = guid;
18 | }
19 | #endregion
20 |
21 | #region Properties
22 | ///
23 | /// Gets the unique identifier.
24 | ///
25 | public Guid Guid { get; private set; }
26 | #endregion
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/GameLibrary/Content/Exceptions/GuidNotFoundException.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 |
6 | namespace Xemio.GameLibrary.Content.Exceptions
7 | {
8 | public class GuidNotFoundException : Exception
9 | {
10 | #region Constructors
11 | ///
12 | /// Initializes a new instance of the class.
13 | ///
14 | /// The unique identifier.
15 | public GuidNotFoundException(Guid guid) : base("Guid " + guid.ToString("D") + " not found.")
16 | {
17 | this.Guid = guid;
18 | }
19 | #endregion
20 |
21 | #region Properties
22 | ///
23 | /// Gets the unique identifier.
24 | ///
25 | public Guid Guid { get; private set; }
26 | #endregion
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/GameLibrary/Content/FileSystem/Extendable/IFileSystemExtension.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 | using Xemio.GameLibrary.Common.Link;
7 |
8 | namespace Xemio.GameLibrary.Content.FileSystem.Extendable
9 | {
10 | public interface IFileSystemExtension : ILinkable
11 | {
12 | ///
13 | /// Gets the file system.
14 | ///
15 | IFileSystem FileSystem { get; }
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/GameLibrary/Content/FileSystem/IFileSystemListener.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 |
7 | namespace Xemio.GameLibrary.Content.FileSystem
8 | {
9 | public interface IFileSystemListener
10 | {
11 | ///
12 | /// Called when a file system entry changed.
13 | ///
14 | /// The full path.
15 | /// The name.
16 | void OnChanged(string fullPath, string name);
17 | ///
18 | /// Called when a file system entry was created.
19 | ///
20 | /// The full path.
21 | /// The name.
22 | void OnCreated(string fullPath, string name);
23 | ///
24 | /// Called when a file system entry was deleted.
25 | ///
26 | /// The full path.
27 | /// The name.
28 | void OnDeleted(string fullPath, string name);
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/GameLibrary/Content/FileSystem/IVirtualFileSystem.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.IO;
6 | using Xemio.GameLibrary.Components;
7 | using Xemio.GameLibrary.Components.Attributes;
8 |
9 | namespace Xemio.GameLibrary.Content.FileSystem
10 | {
11 | [Abstraction]
12 | public interface IVirtualFileSystem : IFileSystem
13 | {
14 | ///
15 | /// Loads the specified file name.
16 | ///
17 | /// Name of the file.
18 | void Load(string fileName);
19 | ///
20 | /// Saves the changes made to the file system.
21 | ///
22 | /// Name of the file.
23 | void Persist(string fileName);
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/GameLibrary/Content/Formats/Binary/BinaryFormat.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.IO;
6 |
7 | namespace Xemio.GameLibrary.Content.Formats.Binary
8 | {
9 | public class BinaryFormat : IFormat
10 | {
11 | #region Implementation of IFormat
12 | ///
13 | /// Gets a value indicating whether the format supports tags.
14 | ///
15 | public bool SupportsTags
16 | {
17 | get { return false; }
18 | }
19 | ///
20 | /// Creates a writer.
21 | ///
22 | /// The stream.
23 | public IFormatWriter CreateWriter(Stream stream)
24 | {
25 | return new BinaryWriter(stream);
26 | }
27 | ///
28 | /// Creates a reader.
29 | ///
30 | /// The stream.
31 | public IFormatReader CreateReader(Stream stream)
32 | {
33 | return new BinaryReader(stream);
34 | }
35 | #endregion
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/GameLibrary/Content/Formats/Format.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using Xemio.GameLibrary.Content.Formats.Binary;
6 | using Xemio.GameLibrary.Content.Formats.None;
7 | using Xemio.GameLibrary.Content.Formats.Xml;
8 |
9 | namespace Xemio.GameLibrary.Content.Formats
10 | {
11 | public class Format
12 | {
13 | #region Formats
14 | ///
15 | /// Gets an empty format only providing access to the stream itself.
16 | ///
17 | public static IFormat None
18 | {
19 | get{ return new FormatlessFormat(); }
20 | }
21 | ///
22 | /// Gets the binary format.
23 | ///
24 | public static IFormat Binary
25 | {
26 | get { return new BinaryFormat(); }
27 | }
28 | ///
29 | /// Gets the XML format.
30 | ///
31 | public static IFormat Xml
32 | {
33 | get{ return new XmlFormat(); }
34 | }
35 | #endregion
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/GameLibrary/Content/Formats/IFormat.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.IO;
6 | using Xemio.GameLibrary.Common.Link;
7 |
8 | namespace Xemio.GameLibrary.Content.Formats
9 | {
10 | public interface IFormat
11 | {
12 | ///
13 | /// Gets a value indicating whether the format supports tags.
14 | ///
15 | bool SupportsTags { get; }
16 | ///
17 | /// Creates a writer.
18 | ///
19 | /// The stream.
20 | IFormatWriter CreateWriter(Stream stream);
21 | ///
22 | /// Creates a reader.
23 | ///
24 | /// The stream.
25 | IFormatReader CreateReader(Stream stream);
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/GameLibrary/Content/Formats/None/FormatlessFormat.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.IO;
4 | using System.Linq;
5 | using System.Text;
6 |
7 | namespace Xemio.GameLibrary.Content.Formats.None
8 | {
9 | public class FormatlessFormat : IFormat
10 | {
11 | #region Implementation of IFormat
12 | ///
13 | /// Gets a value indicating whether the format supports tags.
14 | ///
15 | public bool SupportsTags
16 | {
17 | get { return false; }
18 | }
19 | ///
20 | /// Creates a writer.
21 | ///
22 | /// The stream.
23 | public IFormatWriter CreateWriter(Stream stream)
24 | {
25 | return new FormatlessWriter(stream);
26 | }
27 | ///
28 | /// Creates a reader.
29 | ///
30 | /// The stream.
31 | public IFormatReader CreateReader(Stream stream)
32 | {
33 | return new FormatlessReader(stream);
34 | }
35 | #endregion
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/GameLibrary/Content/Formats/None/InvalidFormatException.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace Xemio.GameLibrary.Content.Formats.None
4 | {
5 | public class InvalidFormatException : Exception
6 | {
7 | #region Constructors
8 | ///
9 | /// Initializes a new instance of the class.
10 | ///
11 | public InvalidFormatException()
12 | : base("Calls to Read or Write can not be made inside formatless serializers. Override the BypassFormat method to prevent this behavior.")
13 | {
14 | }
15 | #endregion
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/GameLibrary/Content/Formats/Xml/XmlFormat.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.IO;
4 | using System.Linq;
5 | using System.Text;
6 |
7 | namespace Xemio.GameLibrary.Content.Formats.Xml
8 | {
9 | public class XmlFormat : IFormat
10 | {
11 | #region Implementation of IFormat
12 | ///
13 | /// Gets a value indicating whether the format supports tags.
14 | ///
15 | public bool SupportsTags
16 | {
17 | get { return true; }
18 | }
19 | ///
20 | /// Creates a writer.
21 | ///
22 | /// The stream.
23 | public IFormatWriter CreateWriter(Stream stream)
24 | {
25 | return new XmlWriter(stream);
26 | }
27 | ///
28 | /// Creates a reader.
29 | ///
30 | /// The stream.
31 | public IFormatReader CreateReader(Stream stream)
32 | {
33 | return new XmlReader(stream);
34 | }
35 | #endregion
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/GameLibrary/Content/IContentReader.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.IO;
6 | using Xemio.GameLibrary.Common.Link;
7 | using Xemio.GameLibrary.Content.Formats;
8 |
9 | namespace Xemio.GameLibrary.Content
10 | {
11 | public interface IContentReader : ILinkable
12 | {
13 | ///
14 | /// Gets a value indicating whether to bypass the current content format.
15 | ///
16 | bool BypassFormat { get; }
17 | ///
18 | /// Reads an instance.
19 | ///
20 | /// The reader.
21 | object Read(IFormatReader reader);
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/GameLibrary/Content/IContentWriter.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.IO;
6 | using Xemio.GameLibrary.Common.Link;
7 | using Xemio.GameLibrary.Content.Formats;
8 |
9 | namespace Xemio.GameLibrary.Content
10 | {
11 | public interface IContentWriter : ILinkable
12 | {
13 | ///
14 | /// Gets a value indicating whether to bypass the current content format.
15 | ///
16 | bool BypassFormat { get; }
17 | ///
18 | /// Writes the specified value.
19 | ///
20 | /// The writer.
21 | /// The value.
22 | void Write(IFormatWriter writer, object value);
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/GameLibrary/Content/Layouts/Collections/DerivableScope.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 |
7 | namespace Xemio.GameLibrary.Content.Layouts.Collections
8 | {
9 | [Flags]
10 | public enum DerivableScope
11 | {
12 | None = 0,
13 | Collection = 1,
14 | Element = 2,
15 | All = Collection | Element
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/GameLibrary/Content/Layouts/Generation/DerivableAttribute.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 |
7 | namespace Xemio.GameLibrary.Content.Layouts.Generation
8 | {
9 | public class DerivableAttribute : Attribute
10 | {
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/GameLibrary/Content/Layouts/Generation/DerivableElementsAttribute.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 |
7 | namespace Xemio.GameLibrary.Content.Layouts.Generation
8 | {
9 | public class DerivableElementsAttribute : Attribute
10 | {
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/GameLibrary/Content/Layouts/Generation/ElementTagAttribute.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 |
7 | namespace Xemio.GameLibrary.Content.Layouts.Generation
8 | {
9 | public class ElementTagAttribute : Attribute
10 | {
11 | #region Constructors
12 | ///
13 | /// Initializes a new instance of the class.
14 | ///
15 | /// The tag.
16 | public ElementTagAttribute(string tag)
17 | {
18 | this.Tag = tag;
19 | }
20 | #endregion
21 |
22 | #region Properties
23 | ///
24 | /// Gets the tag.
25 | ///
26 | public string Tag { get; private set; }
27 | #endregion
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/GameLibrary/Content/Layouts/Generation/ExcludeAttribute.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 |
7 | namespace Xemio.GameLibrary.Content.Layouts.Generation
8 | {
9 | public class ExcludeAttribute : Attribute
10 | {
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/GameLibrary/Content/Layouts/Generation/TagAttribute.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 |
7 | namespace Xemio.GameLibrary.Content.Layouts.Generation
8 | {
9 | public class TagAttribute : Attribute
10 | {
11 | #region Constructors
12 | ///
13 | /// Initializes a new instance of the class.
14 | ///
15 | /// The tag.
16 | public TagAttribute(string tag)
17 | {
18 | this.Tag = tag;
19 | }
20 | #endregion
21 |
22 | #region Properties
23 | ///
24 | /// Gets the tag.
25 | ///
26 | public string Tag { get; private set; }
27 | #endregion
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/GameLibrary/Content/Layouts/IElementContainer.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 |
7 | namespace Xemio.GameLibrary.Content.Layouts
8 | {
9 | public interface IElementContainer
10 | {
11 | ///
12 | /// Adds the specified element.
13 | ///
14 | /// The element.
15 | void Add(ILayoutElement element);
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/GameLibrary/Content/Layouts/ILayoutElement.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 | using Xemio.GameLibrary.Content.Formats;
7 |
8 | namespace Xemio.GameLibrary.Content.Layouts
9 | {
10 | public interface ILayoutElement
11 | {
12 | ///
13 | /// Writes partial data for the container into the specified format.
14 | ///
15 | /// The writer.
16 | /// The container.
17 | void Write(IFormatWriter writer, object container);
18 | ///
19 | /// Reads partial data for the container from the specified format.
20 | ///
21 | /// The reader.
22 | /// The container.
23 | void Read(IFormatReader reader, object container);
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/GameLibrary/Content/Layouts/Migration/ILayoutMigration.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 |
7 | namespace Xemio.GameLibrary.Content.Layouts.Migration
8 | {
9 | public interface ILayoutMigration
10 | {
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/GameLibrary/Content/Layouts/Migration/MigrationManager.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 |
7 | namespace Xemio.GameLibrary.Content.Layouts.Migration
8 | {
9 | public class MigrationManager
10 | {
11 | #region
12 | #endregion
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/GameLibrary/Content/Loading/ILoadingHandler.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace Xemio.GameLibrary.Content.Loading
4 | {
5 | public interface ILoadingHandler
6 | {
7 | ///
8 | /// Gets or sets the elements.
9 | ///
10 | int ElementCount { get; set; }
11 | ///
12 | /// Gets or sets the percentage.
13 | ///
14 | float Percentage { get; set; }
15 | ///
16 | /// Called when an asset is loaded. Call Dispose to finalize the loading process for the specified asset.
17 | ///
18 | /// The assetName.
19 | IDisposable OnLoading(string assetName);
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/GameLibrary/Content/Metadata/IMetadata.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 |
6 | namespace Xemio.GameLibrary.Content.Metadata
7 | {
8 | public interface IMetadata
9 | {
10 | ///
11 | /// Gets the unique identifier.
12 | ///
13 | Guid Guid { get; }
14 | ///
15 | /// Gets the type.
16 | ///
17 | Type Type { get; }
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/GameLibrary/Content/Serialization/BooleanSerializer.cs:
--------------------------------------------------------------------------------
1 | using System.IO;
2 | using Xemio.GameLibrary.Content.Formats;
3 |
4 | namespace Xemio.GameLibrary.Content.Serialization
5 | {
6 | public class BooleanSerializer : Serializer
7 | {
8 | #region Overrides of SerializationManager
9 | ///
10 | /// Reads a value out of the specified reader.
11 | ///
12 | /// The reader.
13 | public override bool Read(IFormatReader reader)
14 | {
15 | return reader.ReadBoolean("Value");
16 | }
17 | ///
18 | /// Writes the specified value.
19 | ///
20 | /// The writer.
21 | /// The value.
22 | public override void Write(IFormatWriter writer, bool value)
23 | {
24 | writer.WriteBoolean("Value", value);
25 | }
26 | #endregion
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/GameLibrary/Content/Serialization/ByteSerializer.cs:
--------------------------------------------------------------------------------
1 | using System.IO;
2 | using Xemio.GameLibrary.Content.Formats;
3 |
4 | namespace Xemio.GameLibrary.Content.Serialization
5 | {
6 | public class ByteSerializer : Serializer
7 | {
8 | #region Overrides of ContentSerializer
9 | ///
10 | /// Reads a value out of the specified reader.
11 | ///
12 | /// The reader.
13 | public override byte Read(IFormatReader reader)
14 | {
15 | return reader.ReadByte("Value");
16 | }
17 | ///
18 | /// Writes the specified value.
19 | ///
20 | /// The writer.
21 | /// The value.
22 | public override void Write(IFormatWriter writer, byte value)
23 | {
24 | writer.WriteByte("Value", value);
25 | }
26 | #endregion
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/GameLibrary/Content/Serialization/CharSerializer.cs:
--------------------------------------------------------------------------------
1 | using System.IO;
2 | using Xemio.GameLibrary.Content.Formats;
3 |
4 | namespace Xemio.GameLibrary.Content.Serialization
5 | {
6 | public class CharSerializer : Serializer
7 | {
8 | #region Overrides of ContentSerializer
9 | ///
10 | /// Reads a value out of the specified reader.
11 | ///
12 | /// The reader.
13 | public override char Read(IFormatReader reader)
14 | {
15 | return reader.ReadCharacter("Value");
16 | }
17 | ///
18 | /// Writes the specified value.
19 | ///
20 | /// The writer.
21 | /// The value.
22 | public override void Write(IFormatWriter writer, char value)
23 | {
24 | writer.WriteCharacter("Value", value);
25 | }
26 | #endregion
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/GameLibrary/Content/Serialization/DoubleSerializer.cs:
--------------------------------------------------------------------------------
1 | using System.IO;
2 | using Xemio.GameLibrary.Content.Formats;
3 |
4 | namespace Xemio.GameLibrary.Content.Serialization
5 | {
6 | public class DoubleSerializer : Serializer
7 | {
8 | #region Overrides of ContentSerializer
9 | ///
10 | /// Reads a value out of the specified reader.
11 | ///
12 | /// The reader.
13 | public override double Read(IFormatReader reader)
14 | {
15 | return reader.ReadDouble("Value");
16 | }
17 | ///
18 | /// Writes the specified value.
19 | ///
20 | /// The writer.
21 | /// The value.
22 | public override void Write(IFormatWriter writer, double value)
23 | {
24 | writer.WriteDouble("Value", value);
25 | }
26 | #endregion
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/GameLibrary/Content/Serialization/FloatSerializer.cs:
--------------------------------------------------------------------------------
1 | using System.IO;
2 | using Xemio.GameLibrary.Content.Formats;
3 |
4 | namespace Xemio.GameLibrary.Content.Serialization
5 | {
6 | public class FloatSerializer : Serializer
7 | {
8 | #region Overrides of ContentSerializer
9 | ///
10 | /// Reads a value out of the specified reader.
11 | ///
12 | /// The reader.
13 | ///
14 | public override float Read(IFormatReader reader)
15 | {
16 | return reader.ReadFloat("Value");
17 | }
18 | ///
19 | /// Writes the specified value.
20 | ///
21 | /// The writer.
22 | /// The value.
23 | public override void Write(IFormatWriter writer, float value)
24 | {
25 | writer.WriteFloat("Value", value);
26 | }
27 | #endregion
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/GameLibrary/Content/Serialization/GuidSerializer.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using Xemio.GameLibrary.Content.Formats;
6 |
7 | namespace Xemio.GameLibrary.Content.Serialization
8 | {
9 | public class GuidSerializer : Serializer
10 | {
11 | #region Overrides of Serializer
12 | ///
13 | /// Reads the specified guid.
14 | ///
15 | /// The reader.
16 | public override Guid Read(IFormatReader reader)
17 | {
18 | return Guid.Parse(reader.ReadString("Value"));
19 | }
20 | ///
21 | /// Writes the specified guid.
22 | ///
23 | /// The writer.
24 | /// The value.
25 | public override void Write(IFormatWriter writer, Guid value)
26 | {
27 | writer.WriteString("Value", value.ToString());
28 | }
29 | #endregion
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/GameLibrary/Content/Serialization/IntegerSerializer.cs:
--------------------------------------------------------------------------------
1 | using System.IO;
2 | using Xemio.GameLibrary.Content.Formats;
3 |
4 | namespace Xemio.GameLibrary.Content.Serialization
5 | {
6 | public class IntegerSerializer : Serializer
7 | {
8 | #region Overrides of ContentSerializer
9 | ///
10 | /// Reads a value out of the specified reader.
11 | ///
12 | /// The reader.
13 | ///
14 | public override int Read(IFormatReader reader)
15 | {
16 | return reader.ReadInteger("Value");
17 | }
18 | ///
19 | /// Writes the specified value.
20 | ///
21 | /// The writer.
22 | /// The value.
23 | public override void Write(IFormatWriter writer, int value)
24 | {
25 | writer.WriteInteger("Value", value);
26 | }
27 | #endregion
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/GameLibrary/Content/Serialization/LongSerializer.cs:
--------------------------------------------------------------------------------
1 | using System.IO;
2 | using Xemio.GameLibrary.Content.Formats;
3 |
4 | namespace Xemio.GameLibrary.Content.Serialization
5 | {
6 | public class LongSerializer : Serializer
7 | {
8 | #region Overrides of SerializationManager
9 | ///
10 | /// Reads a value out of the specified reader.
11 | ///
12 | /// The reader.
13 | ///
14 | public override long Read(IFormatReader reader)
15 | {
16 | return reader.ReadLong("Value");
17 | }
18 | ///
19 | /// Writes the specified value.
20 | ///
21 | /// The writer.
22 | /// The value.
23 | public override void Write(IFormatWriter writer, long value)
24 | {
25 | writer.WriteLong("Value", value);
26 | }
27 | #endregion
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/GameLibrary/Content/Serialization/ShortSerializer.cs:
--------------------------------------------------------------------------------
1 | using System.IO;
2 | using Xemio.GameLibrary.Content.Formats;
3 |
4 | namespace Xemio.GameLibrary.Content.Serialization
5 | {
6 | public class ShortSerializer : Serializer
7 | {
8 | #region Overrides of SerializationManager
9 | ///
10 | /// Reads a value out of the specified reader.
11 | ///
12 | /// The reader.
13 | ///
14 | public override short Read(IFormatReader reader)
15 | {
16 | return reader.ReadShort("Value");
17 | }
18 | ///
19 | /// Writes the specified value.
20 | ///
21 | /// The writer.
22 | /// The value.
23 | public override void Write(IFormatWriter writer, short value)
24 | {
25 | writer.WriteShort("Value", value);
26 | }
27 | #endregion
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/GameLibrary/Content/Serialization/StringSerializer.cs:
--------------------------------------------------------------------------------
1 | using System.IO;
2 | using Xemio.GameLibrary.Content.Formats;
3 |
4 | namespace Xemio.GameLibrary.Content.Serialization
5 | {
6 | public class StringSerializer : Serializer
7 | {
8 | #region Overrides of SerializationManager
9 | ///
10 | /// Reads a value out of the specified reader.
11 | ///
12 | /// The reader.
13 | public override string Read(IFormatReader reader)
14 | {
15 | return reader.ReadString("Value");
16 | }
17 | ///
18 | /// Writes the specified value.
19 | ///
20 | /// The writer.
21 | /// The value.
22 | public override void Write(IFormatWriter writer, string value)
23 | {
24 | writer.WriteString("Value", value);
25 | }
26 | #endregion
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/GameLibrary/Content/Serialization/VectorSerializer.cs:
--------------------------------------------------------------------------------
1 | using System.IO;
2 | using Xemio.GameLibrary.Content.Formats;
3 | using Xemio.GameLibrary.Math;
4 |
5 | namespace Xemio.GameLibrary.Content.Serialization
6 | {
7 | public class VectorSerializer : Serializer
8 | {
9 | #region Overrides of SerializationManager
10 | ///
11 | /// Reads a value out of the specified reader.
12 | ///
13 | /// The reader.
14 | public override Vector2 Read(IFormatReader reader)
15 | {
16 | return reader.ReadVector2("Value");
17 | }
18 | ///
19 | /// Writes the specified value.
20 | ///
21 | /// The writer.
22 | /// The value.
23 | public override void Write(IFormatWriter writer, Vector2 value)
24 | {
25 | writer.WriteVector2("Value", value);
26 | }
27 | #endregion
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/GameLibrary/Content/Streams/StreamedReader.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.IO;
6 | using Xemio.GameLibrary.Content.Formats;
7 |
8 | namespace Xemio.GameLibrary.Content.Streams
9 | {
10 | public abstract class StreamedContentReader : ContentReader
11 | {
12 | #region Methods
13 | ///
14 | /// Reads a value out of the specified stream.
15 | ///
16 | /// The stream.
17 | protected abstract T Read(Stream stream);
18 | #endregion
19 |
20 | #region Overrides of ContentReader
21 | ///
22 | /// Reads an instance.
23 | ///
24 | /// The reader.
25 | public override T Read(IFormatReader reader)
26 | {
27 | return this.Read(reader.Stream);
28 | }
29 | #endregion
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/GameLibrary/Content/Streams/StreamedWriter.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.IO;
6 | using Xemio.GameLibrary.Content.Formats;
7 |
8 | namespace Xemio.GameLibrary.Content.Streams
9 | {
10 | public abstract class StreamedContentWriter : ContentWriter
11 | {
12 | #region Methods
13 | ///
14 | /// Writes the specified value into the stream.
15 | ///
16 | /// The stream.
17 | /// The value.
18 | protected abstract void Write(Stream stream, T value);
19 | #endregion
20 |
21 | #region Overrides of ContentWriter
22 | ///
23 | /// Writes the specified value.
24 | ///
25 | /// The format writer.
26 | /// The value.
27 | public override void Write(IFormatWriter writer, T value)
28 | {
29 | this.Write(writer.Stream, value);
30 | }
31 | #endregion
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/GameLibrary/EngineState.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 |
6 | namespace Xemio.GameLibrary
7 | {
8 | public enum EngineState
9 | {
10 | None,
11 | Initializing,
12 | Initialized
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/GameLibrary/Entities/Components/IPositionModifier.cs:
--------------------------------------------------------------------------------
1 | using Xemio.GameLibrary.Math;
2 |
3 | namespace Xemio.GameLibrary.Entities.Components
4 | {
5 | public interface IPositionModifier
6 | {
7 | ///
8 | /// Gets the position.
9 | ///
10 | Vector2 Offset { get; }
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/GameLibrary/Entities/Components/TransformComponentSerializer.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 | using Xemio.GameLibrary.Content;
7 | using Xemio.GameLibrary.Content.Formats;
8 | using Xemio.GameLibrary.Content.Layouts;
9 |
10 | namespace Xemio.GameLibrary.Entities.Components
11 | {
12 | public class TransformComponentSerializer : LayoutSerializer
13 | {
14 | #region Overrides of Serializer
15 | ///
16 | /// Creates the layout.
17 | ///
18 | public override PersistenceLayout CreateLayout()
19 | {
20 | return new PersistenceLayout()
21 | .Element("Rotation", component => component.Rotation)
22 | .Element("Scale", component => component.Scale)
23 | .Element("Position", component => component.Position);
24 | }
25 | #endregion
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/GameLibrary/Events/Handles/IAsyncHandle.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 | using Xemio.GameLibrary.Script;
7 |
8 | namespace Xemio.GameLibrary.Events.Handles
9 | {
10 | public interface IAsyncHandle : IHandle where TEvent : IEvent
11 | {
12 | ///
13 | /// Handles the specified event asynchronously.
14 | ///
15 | /// The event.
16 | Task Handle(TEvent evt);
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/GameLibrary/Events/Handles/IHandle.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 |
6 | namespace Xemio.GameLibrary.Events.Handles
7 | {
8 | public interface IHandle
9 | {
10 | }
11 |
12 | public interface IHandle : IHandle where TEvent : IEvent
13 | {
14 | ///
15 | /// Handles the specified event.
16 | ///
17 | /// The event.
18 | void Handle(TEvent evt);
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/GameLibrary/Events/Handles/IHandleContainer.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections;
3 | using System.Collections.Generic;
4 | using System.Linq;
5 | using System.Text;
6 |
7 | namespace Xemio.GameLibrary.Events.Handles
8 | {
9 | public interface IHandleContainer
10 | {
11 | ///
12 | /// Gets an instance list containing handle implementations.
13 | ///
14 | IEnumerable Children { get; }
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/GameLibrary/Events/ICancelableEvent.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 |
7 | namespace Xemio.GameLibrary.Events
8 | {
9 | public interface ICancelableEvent : IEvent
10 | {
11 | ///
12 | /// Gets a value indicating whether the event propagation was canceled.
13 | ///
14 | bool IsCanceled { get; }
15 | ///
16 | /// Cancels the event propagation.
17 | ///
18 | void Cancel();
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/GameLibrary/Events/IEvent.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.IO;
6 |
7 | namespace Xemio.GameLibrary.Events
8 | {
9 | public interface IEvent
10 | {
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/GameLibrary/Events/IInstigatedEvent.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 |
6 | namespace Xemio.GameLibrary.Events
7 | {
8 | public interface IInstigatedEvent : IEvent
9 | {
10 | ///
11 | /// Gets the instigator.
12 | ///
13 | object Instigator { get; }
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/GameLibrary/Events/InstigatedEvent.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 |
6 | namespace Xemio.GameLibrary.Events
7 | {
8 | public abstract class InstigatedEvent : IInstigatedEvent
9 | {
10 | #region Constructors
11 | ///
12 | /// Initializes a new instance of the class.
13 | ///
14 | /// The instigator.
15 | protected InstigatedEvent(object instigator)
16 | {
17 | this.Instigator = instigator;
18 | }
19 | #endregion
20 |
21 | #region Implementation of IInstigatedEvent
22 | ///
23 | /// Gets the instigator.
24 | ///
25 | public object Instigator { get; private set; }
26 | #endregion
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/GameLibrary/Game/LagCompensation.cs:
--------------------------------------------------------------------------------
1 | namespace Xemio.GameLibrary.Game
2 | {
3 | public enum LagCompensation
4 | {
5 | None,
6 | ExecuteMissedTicks
7 | }
8 | }
9 |
--------------------------------------------------------------------------------
/GameLibrary/Game/Scenes/SceneLoadingReport.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using Xemio.GameLibrary.Common;
6 | using Xemio.GameLibrary.Content;
7 | using Xemio.GameLibrary.Content.Loading;
8 |
9 | namespace Xemio.GameLibrary.Game.Scenes
10 | {
11 | internal class SceneLoadingReport : ILoadingHandler
12 | {
13 | #region Implementation of ILoadingReport
14 | ///
15 | /// Gets or sets the elements.
16 | ///
17 | public int ElementCount { get; set; }
18 | ///
19 | /// Gets or sets the percentage.
20 | ///
21 | public float Percentage { get; set; }
22 | ///
23 | /// Called when an element is loading.
24 | ///
25 | /// The name.
26 | public IDisposable OnLoading(string name)
27 | {
28 | return ActionDisposable.Empty;
29 | }
30 | #endregion
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/GameLibrary/Game/Subscribers/IRenderSubscriber.cs:
--------------------------------------------------------------------------------
1 | namespace Xemio.GameLibrary.Game.Subscribers
2 | {
3 | public interface IRenderSubscriber : ISubscriber
4 | {
5 | ///
6 | /// Handles render calls.
7 | ///
8 | void Render();
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/GameLibrary/Game/Subscribers/ISortableRenderSubscriber.cs:
--------------------------------------------------------------------------------
1 | namespace Xemio.GameLibrary.Game.Subscribers
2 | {
3 | public interface ISortableRenderSubscriber : IRenderSubscriber
4 | {
5 | ///
6 | /// Gets the index of the render. Default: 0.
7 | ///
8 | int RenderIndex { get; }
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/GameLibrary/Game/Subscribers/ISortableTickSubscriber.cs:
--------------------------------------------------------------------------------
1 | namespace Xemio.GameLibrary.Game.Subscribers
2 | {
3 | public interface ISortableTickSubscriber : ITickSubscriber
4 | {
5 | ///
6 | /// Gets the index of the tick. Default: 0.
7 | ///
8 | int TickIndex { get; }
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/GameLibrary/Game/Subscribers/ISubscriber.cs:
--------------------------------------------------------------------------------
1 | namespace Xemio.GameLibrary.Game.Subscribers
2 | {
3 | public interface ISubscriber
4 | {
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/GameLibrary/Game/Subscribers/ITickSubscriber.cs:
--------------------------------------------------------------------------------
1 | namespace Xemio.GameLibrary.Game.Subscribers
2 | {
3 | public interface ITickSubscriber : ISubscriber
4 | {
5 | ///
6 | /// Handles a game tick.
7 | ///
8 | /// The elapsed time since last tick.
9 | void Tick(float elapsed);
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/GameLibrary/Game/Timing/FrameDelayAction.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 |
7 | namespace Xemio.GameLibrary.Game.Timing
8 | {
9 | public class FrameDelayAction
10 | {
11 | #region Constructors
12 | ///
13 | /// Initializes a new instance of the class.
14 | ///
15 | /// The frame count.
16 | /// The action.
17 | public FrameDelayAction(int frameCount, Action action)
18 | {
19 | this.Frames = frameCount;
20 | this.Action = action;
21 | }
22 | #endregion
23 |
24 | #region Properties
25 | ///
26 | /// Gets or sets the frames.
27 | ///
28 | public int Frames { get; set; }
29 | ///
30 | /// Gets the action.
31 | ///
32 | public Action Action { get; private set; }
33 | #endregion
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/GameLibrary/Game/Timing/GameTimeMode.cs:
--------------------------------------------------------------------------------
1 | namespace Xemio.GameLibrary.Game.Timing
2 | {
3 | public enum GameTimeMode
4 | {
5 | Static,
6 | RealTimeClock,
7 | Simulated
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/GameLibrary/Input/Adapters/IInputAdapter.cs:
--------------------------------------------------------------------------------
1 | namespace Xemio.GameLibrary.Input.Adapters
2 | {
3 | public interface IInputAdapter
4 | {
5 | ///
6 | /// Gets the index of the player.
7 | ///
8 | int PlayerIndex { get; }
9 | ///
10 | /// Called when the input listener was attached to the player.
11 | ///
12 | /// Index of the player.
13 | void Attach(int playerIndex);
14 | ///
15 | /// Called when the input listener was detached from the player.
16 | ///
17 | void Detach();
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/GameLibrary/Logging/LogLevel.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 |
6 | namespace Xemio.GameLibrary.Logging
7 | {
8 | public enum LogLevel
9 | {
10 | Trace = 0,
11 | Debug = 1,
12 | Info = 2,
13 | Warn = 3,
14 | Error = 4,
15 | Fatal = 5
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/GameLibrary/Logging/Providers/ILoggingProvider.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace Xemio.GameLibrary.Logging.Providers
4 | {
5 | public interface ILoggingProvider
6 | {
7 | ///
8 | /// Logs the specified message.
9 | ///
10 | /// The type.
11 | /// The level.
12 | /// The message.
13 | void Log(Type type, LogLevel level, string message);
14 | ///
15 | /// Logs the exception.
16 | ///
17 | /// The type.
18 | /// The level.
19 | /// The message.
20 | /// The ex.
21 | void LogException(Type type, LogLevel level, string message, Exception ex);
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/GameLibrary/Math/Vector3.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 |
7 | namespace Xemio.GameLibrary.Math
8 | {
9 | public struct Vector3
10 | {
11 | //TODO: implement
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/GameLibrary/Network/Events/Clients/ClientReceivedPackageEvent.cs:
--------------------------------------------------------------------------------
1 | using Xemio.GameLibrary.Network.Packages;
2 |
3 | namespace Xemio.GameLibrary.Network.Events.Clients
4 | {
5 | public class ClientReceivedPackageEvent : ClientPackageEvent
6 | {
7 | #region Constructors
8 | ///
9 | /// Initializes a new instance of the class.
10 | ///
11 | /// The client.
12 | /// The package.
13 | public ClientReceivedPackageEvent(Client client, Package package) : base(client, package)
14 | {
15 | }
16 | #endregion
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/GameLibrary/Network/Events/Clients/ClientSendingPackageEvent.cs:
--------------------------------------------------------------------------------
1 | using Xemio.GameLibrary.Network.Packages;
2 |
3 | namespace Xemio.GameLibrary.Network.Events.Clients
4 | {
5 | public class ClientSendingPackageEvent : ClientPackageEvent
6 | {
7 | #region Constructors
8 | ///
9 | /// Initializes a new instance of the class.
10 | ///
11 | /// The client.
12 | /// The package.
13 | public ClientSendingPackageEvent(Client client, Package package) : base(client, package)
14 | {
15 | }
16 | #endregion
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/GameLibrary/Network/Events/Clients/ClientSentPackageEvent.cs:
--------------------------------------------------------------------------------
1 | using Xemio.GameLibrary.Network.Packages;
2 |
3 | namespace Xemio.GameLibrary.Network.Events.Clients
4 | {
5 | public class ClientSentPackageEvent : ClientPackageEvent
6 | {
7 | #region Constructors
8 | ///
9 | /// Initializes a new instance of the class.
10 | ///
11 | /// The client.
12 | /// The package.
13 | public ClientSentPackageEvent(Client client, Package package) : base(client, package)
14 | {
15 | }
16 | #endregion
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/GameLibrary/Network/Events/Servers/ServerReceivedPackageEvent.cs:
--------------------------------------------------------------------------------
1 | using Xemio.GameLibrary.Network.Packages;
2 |
3 | namespace Xemio.GameLibrary.Network.Events.Servers
4 | {
5 | public class ServerReceivedPackageEvent : ServerPackageEvent
6 | {
7 | #region Constructors
8 | ///
9 | /// Initializes a new instance of the class.
10 | ///
11 | /// The package.
12 | /// The Channel.
13 | public ServerReceivedPackageEvent(Package package, ServerChannel channel) : base(package, channel)
14 | {
15 | }
16 | #endregion
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/GameLibrary/Network/Events/Servers/ServerSendingPackageEvent.cs:
--------------------------------------------------------------------------------
1 | using Xemio.GameLibrary.Network.Packages;
2 |
3 | namespace Xemio.GameLibrary.Network.Events.Servers
4 | {
5 | public class ServerSendingPackageEvent : ServerPackageEvent
6 | {
7 | #region Constructors
8 | ///
9 | /// Initializes a new instance of the class.
10 | ///
11 | /// The package.
12 | /// The Channel.
13 | public ServerSendingPackageEvent(Package package, ServerChannel channel) : base(package, channel)
14 | {
15 | }
16 | #endregion
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/GameLibrary/Network/Events/Servers/ServerSentPackageEvent.cs:
--------------------------------------------------------------------------------
1 | using Xemio.GameLibrary.Network.Packages;
2 |
3 | namespace Xemio.GameLibrary.Network.Events.Servers
4 | {
5 | public class ServerSentPackageEvent : ServerPackageEvent
6 | {
7 | #region Constructors
8 | ///
9 | /// Initializes a new instance of the class.
10 | ///
11 | /// The package.
12 | /// The Channel.
13 | public ServerSentPackageEvent(Package package, ServerChannel channel) : base(package, channel)
14 | {
15 | }
16 | #endregion
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/GameLibrary/Network/Exceptions/ChannelLostConnectionException.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using Xemio.GameLibrary.Network.Protocols;
6 |
7 | namespace Xemio.GameLibrary.Network.Exceptions
8 | {
9 | public class ChannelLostConnectionException : Exception
10 | {
11 | #region Constructors
12 | ///
13 | /// Initializes a new instance of the class.
14 | ///
15 | /// The channel.
16 | public ChannelLostConnectionException(IServerChannelProtocol channel) : base(string.Format("{0} disconnected.", channel.Address))
17 | {
18 | this.Channel = channel;
19 | }
20 | #endregion
21 |
22 | #region Properties
23 | ///
24 | /// Gets the channel.
25 | ///
26 | public IServerChannelProtocol Channel { get; private set; }
27 | #endregion
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/GameLibrary/Network/Exceptions/ClientLostConnectionException.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 |
6 | namespace Xemio.GameLibrary.Network.Exceptions
7 | {
8 | public class ClientLostConnectionException : Exception
9 | {
10 | #region Constructors
11 | ///
12 | /// Initializes a new instance of the class.
13 | ///
14 | public ClientLostConnectionException() : base("Disconnected from server.")
15 | {
16 | }
17 | #endregion
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/GameLibrary/Network/Handlers/Attributes/IClientHandlerAttribute.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 |
6 | namespace Xemio.GameLibrary.Network.Handlers.Attributes
7 | {
8 | public interface IClientHandlerAttribute
9 | {
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/GameLibrary/Network/Handlers/Attributes/IServerHandlerAttribute.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 |
7 | namespace Xemio.GameLibrary.Network.Handlers.Attributes
8 | {
9 | public interface IServerHandlerAttribute
10 | {
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/GameLibrary/Network/Handlers/Attributes/OnClientJoinedAttribute.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 |
7 | namespace Xemio.GameLibrary.Network.Handlers.Attributes
8 | {
9 | public class OnClientJoinedAttribute : Attribute, IServerHandlerAttribute
10 | {
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/GameLibrary/Network/Handlers/Attributes/OnClientLeftAttribute.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 |
7 | namespace Xemio.GameLibrary.Network.Handlers.Attributes
8 | {
9 | public class OnClientLeftAttribute : Attribute, IServerHandlerAttribute
10 | {
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/GameLibrary/Network/Handlers/Attributes/OnDisconnectedAttribute.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 |
7 | namespace Xemio.GameLibrary.Network.Handlers.Attributes
8 | {
9 | public class OnDisconnectedAttribute : Attribute, IClientHandlerAttribute
10 | {
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/GameLibrary/Network/Handlers/Attributes/OnReceiveAttribute.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 |
7 | namespace Xemio.GameLibrary.Network.Handlers.Attributes
8 | {
9 | public class OnReceiveAttribute : Attribute, IServerHandlerAttribute, IClientHandlerAttribute
10 | {
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/GameLibrary/Network/Handlers/Attributes/OnSendingAttribute.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 |
7 | namespace Xemio.GameLibrary.Network.Handlers.Attributes
8 | {
9 | public class OnSendingAttribute : Attribute, IServerHandlerAttribute, IClientHandlerAttribute
10 | {
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/GameLibrary/Network/Handlers/Attributes/OnSentAttribute.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 |
7 | namespace Xemio.GameLibrary.Network.Handlers.Attributes
8 | {
9 | public class OnSentAttribute : Attribute, IServerHandlerAttribute, IClientHandlerAttribute
10 | {
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/GameLibrary/Network/Handlers/Forwarding/ForwardingOptions.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.IO;
6 |
7 | namespace Xemio.GameLibrary.Network.Handlers.Forwarding
8 | {
9 | public enum ForwardingOptions
10 | {
11 | ///
12 | /// Sends the received package to all clients.
13 | ///
14 | All,
15 | ///
16 | /// Sends the received package to all clients except for the sender.
17 | ///
18 | AllOther,
19 | ///
20 | /// Sends the received package to its sender.
21 | ///
22 | Traceback
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/GameLibrary/Network/Handlers/Forwarding/IForwarded.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.IO;
6 |
7 | namespace Xemio.GameLibrary.Network.Handlers.Forwarding
8 | {
9 | public interface IForwarded
10 | {
11 | ///
12 | /// Gets the options.
13 | ///
14 | ForwardingOptions Options { get; }
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/GameLibrary/Network/ISender.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using Xemio.GameLibrary.Network.Packages;
6 |
7 | namespace Xemio.GameLibrary.Network
8 | {
9 | public interface ISender
10 | {
11 | ///
12 | /// Gets a value indicating whether the sender is connected.
13 | ///
14 | bool Connected { get; }
15 | ///
16 | /// Sends the specified package.
17 | ///
18 | /// The package.
19 | void Send(Package package);
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/GameLibrary/Network/Packages/Package.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.IO;
6 | using Xemio.GameLibrary.Common;
7 | using Xemio.GameLibrary.Common.Link;
8 | using Xemio.GameLibrary.Content;
9 | using Xemio.GameLibrary.Content.Layouts.Generation;
10 |
11 | namespace Xemio.GameLibrary.Network.Packages
12 | {
13 | public abstract class Package : ILinkable
14 | {
15 | #region ILinkable Member
16 | ///
17 | /// Gets the identifier.
18 | ///
19 | [Exclude]
20 | public int Id
21 | {
22 | get { return this.GetType().Name.GetHashCode(); }
23 | }
24 | #endregion
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/GameLibrary/Network/Protocols/IClientProtocol.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.IO;
6 | using Xemio.GameLibrary.Common.Link;
7 | using Xemio.GameLibrary.Network;
8 | using Xemio.GameLibrary.Network.Packages;
9 |
10 | namespace Xemio.GameLibrary.Network.Protocols
11 | {
12 | public interface IClientProtocol : IProtocol, ISender
13 | {
14 | ///
15 | /// Receives a package.
16 | ///
17 | Package Receive();
18 | ///
19 | /// Sets the client.
20 | ///
21 | Client Client { set; }
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/GameLibrary/Network/Protocols/IProtocol.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using Xemio.GameLibrary.Common.Link;
6 |
7 | namespace Xemio.GameLibrary.Network.Protocols
8 | {
9 | public interface IProtocol : ILinkable
10 | {
11 | ///
12 | /// Starts the protocol and connects corresponding to the site it is being created.
13 | ///
14 | /// The url.
15 | void Open(string url);
16 | ///
17 | /// Stops the protocol.
18 | ///
19 | void Close();
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/GameLibrary/Network/Protocols/IServerChannelProtocol.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Net;
5 | using System.Text;
6 | using Xemio.GameLibrary.Network.Packages;
7 |
8 | namespace Xemio.GameLibrary.Network.Protocols
9 | {
10 | public interface IServerChannelProtocol : ISender
11 | {
12 | ///
13 | /// Gets the address.
14 | ///
15 | IPAddress Address { get; }
16 | ///
17 | /// Receives a package.
18 | ///
19 | Package Receive();
20 | ///
21 | /// Closes this instance.
22 | ///
23 | void Close();
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/GameLibrary/Network/Protocols/IServerProtocol.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.IO;
6 | using Xemio.GameLibrary.Common.Link;
7 | using Xemio.GameLibrary.Network.Packages;
8 |
9 | namespace Xemio.GameLibrary.Network.Protocols
10 | {
11 | public interface IServerProtocol : IProtocol
12 | {
13 | ///
14 | /// Accepts a new channel.
15 | ///
16 | IServerChannelProtocol AcceptChannel();
17 | ///
18 | /// Sets the server.
19 | ///
20 | Server Server { set; }
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/GameLibrary/Network/Protocols/Local/Local.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using Xemio.GameLibrary.Common;
6 | using Xemio.GameLibrary.Network.Packages;
7 |
8 | namespace Xemio.GameLibrary.Network.Protocols.Local
9 | {
10 | internal class Local
11 | {
12 | #region Fields
13 | private static readonly Dictionary _channels = new Dictionary();
14 | #endregion
15 |
16 | #region Methods
17 | ///
18 | /// Gets a local channel for the specified name.
19 | ///
20 | /// The name.
21 | public static LocalChannel GetChannel(string name)
22 | {
23 | lock (_channels)
24 | {
25 | if (!_channels.ContainsKey(name))
26 | {
27 | _channels[name] = new LocalChannel();
28 | }
29 |
30 | return _channels[name];
31 | }
32 | }
33 | #endregion
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/GameLibrary/Network/Protocols/Local/LocalTarget.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 |
6 | namespace Xemio.GameLibrary.Network.Protocols.Local
7 | {
8 | public enum LocalTarget
9 | {
10 | Client,
11 | Server
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/GameLibrary/Network/Protocols/Tcp/TcpDelay.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.IO;
6 |
7 | namespace Xemio.GameLibrary.Network.Protocols.Tcp
8 | {
9 | public enum TcpDelay
10 | {
11 | None,
12 | CachePackages
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/GameLibrary/Network/Timing/LatencyClientHandler.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.IO;
6 | using Xemio.GameLibrary.Logging;
7 | using Xemio.GameLibrary.Network.Handlers;
8 |
9 | namespace Xemio.GameLibrary.Network.Timing
10 | {
11 | public class LatencyClientHandler : ClientHandler
12 | {
13 | #region Logger
14 | private static readonly Logger logger = LogManager.GetCurrentClassLogger();
15 | #endregion
16 |
17 | #region Methods
18 | ///
19 | /// Called when the client receives a latency package.
20 | ///
21 | /// The client.
22 | /// The package.
23 | public override void OnReceive(Client client, LatencyPackage package)
24 | {
25 | logger.Debug("Received latency information: {0}ms", package.Latency);
26 | client.Store(new LatencyInformation(package.Latency));
27 | }
28 | #endregion
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/GameLibrary/Network/Timing/LatencyInformation.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 |
6 | namespace Xemio.GameLibrary.Network.Timing
7 | {
8 | public class LatencyInformation
9 | {
10 | #region Constructors
11 | ///
12 | /// Initializes a new instance of the class.
13 | ///
14 | /// The latency.
15 | public LatencyInformation(float latency)
16 | {
17 | this.Latency = latency;
18 | }
19 | #endregion
20 |
21 | #region Properties
22 | ///
23 | /// Gets the latency.
24 | ///
25 | public float Latency { get; private set; }
26 | #endregion
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/GameLibrary/Network/Timing/LatencyPackage.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.IO;
6 | using Xemio.GameLibrary.Network.Packages;
7 |
8 | namespace Xemio.GameLibrary.Network.Timing
9 | {
10 | public class LatencyPackage : Package
11 | {
12 | #region Properties
13 | ///
14 | /// Gets or sets the latency.
15 | ///
16 | public float Latency { get; set; }
17 | #endregion
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/GameLibrary/Network/Timing/TimeSyncClientHandler.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.IO;
6 | using Xemio.GameLibrary.Network.Handlers;
7 |
8 | namespace Xemio.GameLibrary.Network.Timing
9 | {
10 | public class TimeSyncClientHandler : ClientHandler
11 | {
12 | #region Methods
13 | ///
14 | /// Called when the client receives a package.
15 | ///
16 | /// The client.
17 | /// The package.
18 | public override void OnReceive(Client client, TimeSyncPackage package)
19 | {
20 | client.Send(package);
21 | }
22 | #endregion
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/GameLibrary/Network/Timing/TimeSyncInformation.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Diagnostics;
4 | using System.Linq;
5 | using System.Text;
6 |
7 | namespace Xemio.GameLibrary.Network.Timing
8 | {
9 | public class TimeSyncInformation
10 | {
11 | #region Constructors
12 | ///
13 | /// Initializes a new instance of the class.
14 | ///
15 | public TimeSyncInformation()
16 | {
17 | this.Watch = Stopwatch.StartNew();
18 | }
19 | #endregion
20 |
21 | #region Properties
22 | ///
23 | /// Gets the watch.
24 | ///
25 | public Stopwatch Watch { get; private set; }
26 | ///
27 | /// Gets the roundstrip time.
28 | ///
29 | public float RoundstripTime
30 | {
31 | get { return this.Watch.ElapsedMilliseconds * 0.5f; }
32 | }
33 | #endregion
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/GameLibrary/Network/Timing/TimeSyncPackage.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.IO;
6 | using Xemio.GameLibrary.Network.Handlers.Forwarding;
7 | using Xemio.GameLibrary.Network.Packages;
8 |
9 | namespace Xemio.GameLibrary.Network.Timing
10 | {
11 | public class TimeSyncPackage : Package
12 | {
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/GameLibrary/Plugins/Contexts/SingleAssemblyContext.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 | using System.Reflection;
3 |
4 | namespace Xemio.GameLibrary.Plugins.Contexts
5 | {
6 | internal class SingleAssemblyContext : IAssemblyContext
7 | {
8 | #region Constructors
9 | ///
10 | /// Initializes a new instance of the class.
11 | ///
12 | /// The assembly.
13 | public SingleAssemblyContext(Assembly assembly)
14 | {
15 | this.Assemblies = new[] { assembly };
16 | }
17 | #endregion
18 |
19 | #region Implementation of IAssemblyContext
20 | ///
21 | /// Gets the assemblies.
22 | ///
23 | public IEnumerable Assemblies { get; private set; }
24 | #endregion
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/GameLibrary/Plugins/IAssemblyContext.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Reflection;
5 | using System.Text;
6 | using System.IO;
7 |
8 | namespace Xemio.GameLibrary.Plugins
9 | {
10 | public interface IAssemblyContext
11 | {
12 | ///
13 | /// Gets the assemblies.
14 | ///
15 | IEnumerable Assemblies { get; }
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/GameLibrary/Plugins/ILibraryInitializer.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.IO;
6 |
7 | namespace Xemio.GameLibrary.Plugins
8 | {
9 | public interface ILibraryInitializer
10 | {
11 | ///
12 | /// Initializes this library.
13 | ///
14 | void Initialize();
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/GameLibrary/Properties/Resources.resources:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XemioNetwork/GameLibrary/3a644abd58abc12e9db37f9e6af332852e80b2e8/GameLibrary/Properties/Resources.resources
--------------------------------------------------------------------------------
/GameLibrary/Rendering/Effects/BlendMode.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 |
7 | namespace Xemio.GameLibrary.Rendering.Effects
8 | {
9 | public enum BlendMode
10 | {
11 | Override,
12 |
13 | Add,
14 | Multiply,
15 | Divide,
16 | Subtract,
17 |
18 | LightenOnly,
19 | DarkenOnly
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/GameLibrary/Rendering/Effects/EffectBundle.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 |
6 | namespace Xemio.GameLibrary.Rendering.Effects
7 | {
8 | public abstract class EffectBundle : IEffect
9 | {
10 | #region Properties
11 | ///
12 | /// Gets the effects.
13 | ///
14 | public abstract IEnumerable Effects { get; }
15 | #endregion
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/GameLibrary/Rendering/Effects/FlipEffect.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 |
7 | namespace Xemio.GameLibrary.Rendering.Effects
8 | {
9 | public class FlipEffect : IEffect
10 | {
11 | #region Constructors
12 | ///
13 | /// Initializes a new instance of the class.
14 | ///
15 | /// The options.
16 | public FlipEffect(FlipEffectOptions options)
17 | {
18 | this.Options = options;
19 | }
20 | #endregion
21 |
22 | #region Properties
23 | ///
24 | /// Gets the options.
25 | ///
26 | public FlipEffectOptions Options { get; private set; }
27 | #endregion
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/GameLibrary/Rendering/Effects/FlipEffectOptions.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 |
7 | namespace Xemio.GameLibrary.Rendering.Effects
8 | {
9 | [Flags]
10 | public enum FlipEffectOptions
11 | {
12 | None = 0,
13 | X = 1,
14 | Y = 2,
15 | Both = X | Y
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/GameLibrary/Rendering/Effects/IEffect.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 | using Xemio.GameLibrary.Math;
7 | using Xemio.GameLibrary.Rendering.Events;
8 | using Xemio.GameLibrary.Rendering.Fonts;
9 |
10 | namespace Xemio.GameLibrary.Rendering.Effects
11 | {
12 | public interface IEffect
13 | {
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/GameLibrary/Rendering/Effects/RotateEffect.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 |
7 | namespace Xemio.GameLibrary.Rendering.Effects
8 | {
9 | public class RotateEffect : IEffect
10 | {
11 | #region Constructors
12 | ///
13 | /// Initializes a new instance of the class.
14 | ///
15 | /// The angle.
16 | public RotateEffect(float angle)
17 | {
18 | this.Angle = angle;
19 | }
20 | #endregion
21 |
22 | #region Properties
23 | ///
24 | /// Gets the angle measured in radians.
25 | ///
26 | public float Angle { get; private set; }
27 | #endregion
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/GameLibrary/Rendering/Effects/TranslateEffect.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 | using Xemio.GameLibrary.Math;
7 |
8 | namespace Xemio.GameLibrary.Rendering.Effects
9 | {
10 | public class TranslateEffect : IEffect
11 | {
12 | #region Constructors
13 | ///
14 | /// Initializes a new instance of the class.
15 | ///
16 | /// The offset.
17 | public TranslateEffect(Vector2 offset)
18 | {
19 | this.Offset = offset;
20 | }
21 | #endregion
22 |
23 | #region Properties
24 | ///
25 | /// Gets the offset.
26 | ///
27 | public Vector2 Offset { get; private set; }
28 | #endregion
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/GameLibrary/Rendering/Effects/TranslateToEffect.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 | using Xemio.GameLibrary.Math;
7 |
8 | namespace Xemio.GameLibrary.Rendering.Effects
9 | {
10 | public class TranslateToEffect : IEffect
11 | {
12 | #region Constructors
13 | ///
14 | /// Initializes a new instance of the class.
15 | ///
16 | /// The position.
17 | public TranslateToEffect(Vector2 position)
18 | {
19 | this.Position = position;
20 | }
21 | #endregion
22 |
23 | #region Properties
24 | ///
25 | /// Gets the position.
26 | ///
27 | public Vector2 Position { get; private set; }
28 | #endregion
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/GameLibrary/Rendering/Events/RegionEvent.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using Xemio.GameLibrary.Events;
6 | using Xemio.GameLibrary.Math;
7 |
8 | namespace Xemio.GameLibrary.Rendering.Events
9 | {
10 | public class RegionEvent : IEvent
11 | {
12 | #region Properties
13 | ///
14 | /// Gets or sets the region.
15 | ///
16 | public Rectangle Region { get; set; }
17 | #endregion
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/GameLibrary/Rendering/Events/ResolutionChangedEvent.cs:
--------------------------------------------------------------------------------
1 | using Xemio.GameLibrary.Events;
2 |
3 | namespace Xemio.GameLibrary.Rendering.Events
4 | {
5 | public class ResolutionChangedEvent : IEvent
6 | {
7 | #region Properties
8 | ///
9 | /// Gets the new display mode.
10 | ///
11 | public DisplayMode DisplayMode { get; private set; }
12 | #endregion Properties
13 |
14 | #region Constructors
15 | ///
16 | /// Initializes a new instance of the class.
17 | ///
18 | /// The display mode.
19 | public ResolutionChangedEvent(DisplayMode displayMode)
20 | {
21 | this.DisplayMode = displayMode;
22 | }
23 | #endregion
24 |
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/GameLibrary/Rendering/Events/VertexEvent.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using Xemio.GameLibrary.Events;
6 | using Xemio.GameLibrary.Math;
7 |
8 | namespace Xemio.GameLibrary.Rendering.Events
9 | {
10 | public class VertexEvent : IEvent
11 | {
12 | #region Properties
13 | ///
14 | /// Gets or sets the vertices.
15 | ///
16 | public Vector2[] Vertices { get; set; }
17 | #endregion
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/GameLibrary/Rendering/Fonts/FontStyle.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 |
7 | namespace Xemio.GameLibrary.Rendering.Fonts
8 | {
9 | [Flags]
10 | public enum FontStyle
11 | {
12 | Normal,
13 | Bold,
14 | Italic,
15 | Underlined
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/GameLibrary/Rendering/Fonts/IFont.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 | using Xemio.GameLibrary.Math;
7 |
8 | namespace Xemio.GameLibrary.Rendering.Fonts
9 | {
10 | public interface IFont
11 | {
12 | ///
13 | /// Gets the font family.
14 | ///
15 | string FontFamily { get; }
16 | ///
17 | /// Gets the size.
18 | ///
19 | float Size { get; }
20 | ///
21 | /// Measures the string.
22 | ///
23 | /// The value.
24 | Vector2 MeasureString(string value);
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/GameLibrary/Rendering/Fonts/ITextRasterizer.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 | using Xemio.GameLibrary.Math;
7 |
8 | namespace Xemio.GameLibrary.Rendering.Fonts
9 | {
10 | public interface ITextRasterizer
11 | {
12 | ///
13 | /// Renders the specified text.
14 | ///
15 | /// The font.
16 | /// The text.
17 | /// The position.
18 | void Render(IFont font, string text, Vector2 position);
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/GameLibrary/Rendering/GraphicsDeviceFeatures.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 |
6 | namespace Xemio.GameLibrary.Rendering
7 | {
8 | [Flags]
9 | public enum GraphicsDeviceFeatures
10 | {
11 | None,
12 | EffectInterception,
13 | EventPublishing
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/GameLibrary/Rendering/IBrush.cs:
--------------------------------------------------------------------------------
1 | namespace Xemio.GameLibrary.Rendering
2 | {
3 | public interface IBrush
4 | {
5 | ///
6 | /// Gets the width.
7 | ///
8 | int Width { get; }
9 | ///
10 | /// Gets the height.
11 | ///
12 | int Height { get; }
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/GameLibrary/Rendering/IPen.cs:
--------------------------------------------------------------------------------
1 | namespace Xemio.GameLibrary.Rendering
2 | {
3 | public interface IPen
4 | {
5 | ///
6 | /// Gets the color.
7 | ///
8 | Color Color { get; }
9 | ///
10 | /// Gets the thickness.
11 | ///
12 | float Thickness { get; }
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/GameLibrary/Rendering/IRenderTarget.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Drawing;
4 | using System.Linq;
5 | using System.Text;
6 | using System.IO;
7 |
8 | namespace Xemio.GameLibrary.Rendering
9 | {
10 | public interface IRenderTarget : ITexture
11 | {
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/GameLibrary/Rendering/ITexture.cs:
--------------------------------------------------------------------------------
1 | namespace Xemio.GameLibrary.Rendering
2 | {
3 | public interface ITexture
4 | {
5 | ///
6 | /// Gets the width.
7 | ///
8 | int Width { get; }
9 | ///
10 | /// Gets the height.
11 | ///
12 | int Height { get; }
13 | ///
14 | /// Accesses this texture instance. Changed data will be applied after disposing the accessor.
15 | ///
16 | ITextureAccessor Access();
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/GameLibrary/Rendering/ITextureAccessor.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 |
6 | namespace Xemio.GameLibrary.Rendering
7 | {
8 | public interface ITextureAccessor : IDisposable
9 | {
10 | ///
11 | /// Sets the pixel at the specified position.
12 | ///
13 | /// The x.
14 | /// The y.
15 | /// The color.
16 | void SetPixel(int x, int y, Color color);
17 | ///
18 | /// Gets the pixel at the specified position.
19 | ///
20 | /// The x.
21 | /// The y.
22 | Color GetPixel(int x, int y);
23 | ///
24 | /// Sets the texture data to the specified color values.
25 | ///
26 | /// The colors.
27 | void SetData(Color[] colors);
28 | ///
29 | /// Gets the data as a color array.
30 | ///
31 | Color[] GetData();
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/GameLibrary/Rendering/Initialization/Default/NullBrush.cs:
--------------------------------------------------------------------------------
1 | namespace Xemio.GameLibrary.Rendering.Initialization.Default
2 | {
3 | public class NullBrush : IBrush
4 | {
5 | #region Constructors
6 | ///
7 | /// Initializes a new instance of the class.
8 | ///
9 | /// The width.
10 | /// The height.
11 | public NullBrush(int width, int height)
12 | {
13 | this.Width = width;
14 | this.Height = height;
15 | }
16 | #endregion
17 |
18 | #region Implementation of IBrush
19 | ///
20 | /// Gets the width.
21 | ///
22 | public int Width { get; private set; }
23 | ///
24 | /// Gets the height.
25 | ///
26 | public int Height { get; private set; }
27 | #endregion
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/GameLibrary/Rendering/Initialization/Default/NullPen.cs:
--------------------------------------------------------------------------------
1 | namespace Xemio.GameLibrary.Rendering.Initialization.Default
2 | {
3 | public class NullPen : IPen
4 | {
5 | #region Constructors
6 | ///
7 | /// Initializes a new instance of the class.
8 | ///
9 | /// The color.
10 | /// The thickness.
11 | public NullPen(Color color, float thickness)
12 | {
13 | this.Color = color;
14 | this.Thickness = thickness;
15 | }
16 | #endregion
17 |
18 | #region Implementation of IPen
19 | ///
20 | /// Gets the color.
21 | ///
22 | public Color Color { get; private set; }
23 | ///
24 | /// Gets the thickness.
25 | ///
26 | public float Thickness { get; private set; }
27 | #endregion
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/GameLibrary/Rendering/Initialization/Default/NullTextRasterizer.cs:
--------------------------------------------------------------------------------
1 | using Xemio.GameLibrary.Math;
2 | using Xemio.GameLibrary.Rendering.Fonts;
3 |
4 | namespace Xemio.GameLibrary.Rendering.Initialization.Default
5 | {
6 | public class NullTextRasterizer : ITextRasterizer
7 | {
8 | #region Implementation of ITextRasterizer
9 | ///
10 | /// Renders the specified text.
11 | ///
12 | /// The font.
13 | /// The text.
14 | /// The position.
15 | public void Render(IFont font, string text, Vector2 position)
16 | {
17 | }
18 | #endregion
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/GameLibrary/Rendering/Initialization/Default/NullTextureReader.cs:
--------------------------------------------------------------------------------
1 | using Xemio.GameLibrary.Content.Formats;
2 | using Xemio.GameLibrary.Rendering.Serialization;
3 |
4 | namespace Xemio.GameLibrary.Rendering.Initialization.Default
5 | {
6 | public class NullTextureReader : TextureReader
7 | {
8 | #region Overrides of TextureReader
9 | ///
10 | /// Reads an instance.
11 | ///
12 | /// The reader.
13 | public override ITexture Read(IFormatReader reader)
14 | {
15 | return new NullTexture();
16 | }
17 | #endregion
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/GameLibrary/Rendering/Initialization/Default/NullTextureWriter.cs:
--------------------------------------------------------------------------------
1 | using Xemio.GameLibrary.Content.Formats;
2 | using Xemio.GameLibrary.Rendering.Serialization;
3 |
4 | namespace Xemio.GameLibrary.Rendering.Initialization.Default
5 | {
6 | public class NullTextureWriter : TextureWriter
7 | {
8 | #region Overrides of TextureWriter
9 | ///
10 | /// Writes the specified texture.
11 | ///
12 | /// The writer.
13 | /// The value.
14 | public override void Write(IFormatWriter writer, ITexture value)
15 | {
16 | }
17 | #endregion
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/GameLibrary/Rendering/InterpolationMode.cs:
--------------------------------------------------------------------------------
1 | namespace Xemio.GameLibrary.Rendering
2 | {
3 | public enum InterpolationMode
4 | {
5 | NearestNeighbor,
6 | Linear,
7 | Bicubic
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/GameLibrary/Rendering/Serialization/TextureReader.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.IO;
6 | using Xemio.GameLibrary.Common.Link;
7 | using Xemio.GameLibrary.Content;
8 | using Xemio.GameLibrary.Content.Formats;
9 |
10 | namespace Xemio.GameLibrary.Rendering.Serialization
11 | {
12 | [ManuallyLinked]
13 | public abstract class TextureReader : ContentReader
14 | {
15 | #region Overrides of ContentReader
16 | ///
17 | /// Gets a value indicating whether to bypass the current content format.
18 | ///
19 | public override bool BypassFormat
20 | {
21 | get { return true; }
22 | }
23 | ///
24 | /// Reads an instance.
25 | ///
26 | /// The reader.
27 | public abstract override ITexture Read(IFormatReader reader);
28 | #endregion
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/GameLibrary/Rendering/Serialization/TextureWriter.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.IO;
6 | using Xemio.GameLibrary.Common.Link;
7 | using Xemio.GameLibrary.Content;
8 | using Xemio.GameLibrary.Content.Formats;
9 |
10 | namespace Xemio.GameLibrary.Rendering.Serialization
11 | {
12 | [ManuallyLinked]
13 | public abstract class TextureWriter : ContentWriter
14 | {
15 | #region Overrides of ContentWriter
16 | ///
17 | /// Gets a value indicating whether to bypass the current content format.
18 | ///
19 | public override bool BypassFormat
20 | {
21 | get { return true; }
22 | }
23 | ///
24 | /// Writes the specified texture.
25 | ///
26 | /// The writer.
27 | /// The value.
28 | public abstract override void Write(IFormatWriter writer, ITexture value);
29 | #endregion
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/GameLibrary/Rendering/Shapes/IShape.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 | using Xemio.GameLibrary.Math;
7 |
8 | namespace Xemio.GameLibrary.Rendering.Shapes
9 | {
10 | public interface IShape
11 | {
12 | ///
13 | /// Gets the position.
14 | ///
15 | Vector2 Position { get; set; }
16 | ///
17 | /// Gets or sets the outline pen.
18 | ///
19 | IPen Outline { get; set; }
20 | ///
21 | /// Gets or sets the background brush.
22 | ///
23 | IBrush Background { get; set; }
24 | ///
25 | /// Renders the shape.
26 | ///
27 | /// The graphics device.
28 | void Render(GraphicsDevice graphicsDevice);
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/GameLibrary/Rendering/SmoothingMode.cs:
--------------------------------------------------------------------------------
1 | namespace Xemio.GameLibrary.Rendering
2 | {
3 | public enum SmoothingMode
4 | {
5 | None,
6 | AntiAliased
7 | }
8 | }
9 |
--------------------------------------------------------------------------------
/GameLibrary/Rendering/Surfaces/ISurface.cs:
--------------------------------------------------------------------------------
1 | using Xemio.GameLibrary.Components;
2 | using Xemio.GameLibrary.Components.Attributes;
3 |
4 | namespace Xemio.GameLibrary.Rendering.Surfaces
5 | {
6 | [Abstraction]
7 | public interface ISurface : IComponent
8 | {
9 | ///
10 | /// Gets the width.
11 | ///
12 | int Width { get; }
13 | ///
14 | /// Gets the height.
15 | ///
16 | int Height { get; }
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/GameLibrary/Rendering/Surfaces/NullSurface.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.IO;
6 |
7 | namespace Xemio.GameLibrary.Rendering.Surfaces
8 | {
9 | internal class NullSurface : ISurface
10 | {
11 | #region Implementation of ISurface
12 | ///
13 | /// Gets the width.
14 | ///
15 | public int Width { get; private set; }
16 | ///
17 | /// Gets the height.
18 | ///
19 | public int Height { get; private set; }
20 | #endregion
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/GameLibrary/Resources/intro.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XemioNetwork/GameLibrary/3a644abd58abc12e9db37f9e6af332852e80b2e8/GameLibrary/Resources/intro.png
--------------------------------------------------------------------------------
/GameLibrary/Script/CompilerError.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.IO;
6 |
7 | namespace Xemio.GameLibrary.Script
8 | {
9 | public class CompilerError
10 | {
11 | #region Constructors
12 | ///
13 | /// Initializes a new instance of the class.
14 | ///
15 | /// The line.
16 | /// The message.
17 | public CompilerError(int line, string message)
18 | {
19 | this.Line = line;
20 | this.Message = message;
21 | }
22 | #endregion
23 |
24 | #region Properties
25 | ///
26 | /// Gets the line.
27 | ///
28 | public int Line { get; private set; }
29 | ///
30 | /// Gets the message.
31 | ///
32 | public string Message { get; private set; }
33 | #endregion
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/GameLibrary/Script/IScript.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections;
3 | using System.Collections.Generic;
4 | using System.Linq;
5 | using System.Text;
6 | using System.IO;
7 | using Xemio.GameLibrary.Common.Link;
8 | using Xemio.GameLibrary.Events;
9 |
10 | namespace Xemio.GameLibrary.Script
11 | {
12 | public interface IScript : ILinkable
13 | {
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/LICENSE.txt:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) 2013 Xemio Network (xemio.net)
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy of
6 | this software and associated documentation files (the "Software"), to deal in
7 | the Software without restriction, including without limitation the rights to
8 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
9 | the Software, and to permit persons to whom the Software is furnished to do so,
10 | subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
17 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
18 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
19 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
20 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21 |
--------------------------------------------------------------------------------
/NLog.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XemioNetwork/GameLibrary/3a644abd58abc12e9db37f9e6af332852e80b2e8/NLog.dll
--------------------------------------------------------------------------------
/NuGet/Xemio-GameLibrary.0.5.0.nupkg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XemioNetwork/GameLibrary/3a644abd58abc12e9db37f9e6af332852e80b2e8/NuGet/Xemio-GameLibrary.0.5.0.nupkg
--------------------------------------------------------------------------------
/NuGet/Xemio-GameLibrary.0.5.1.nupkg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XemioNetwork/GameLibrary/3a644abd58abc12e9db37f9e6af332852e80b2e8/NuGet/Xemio-GameLibrary.0.5.1.nupkg
--------------------------------------------------------------------------------
/NuGet/Xemio-GameLibrary.0.5.10.1.nupkg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XemioNetwork/GameLibrary/3a644abd58abc12e9db37f9e6af332852e80b2e8/NuGet/Xemio-GameLibrary.0.5.10.1.nupkg
--------------------------------------------------------------------------------
/NuGet/Xemio-GameLibrary.0.5.10.nupkg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XemioNetwork/GameLibrary/3a644abd58abc12e9db37f9e6af332852e80b2e8/NuGet/Xemio-GameLibrary.0.5.10.nupkg
--------------------------------------------------------------------------------
/NuGet/Xemio-GameLibrary.0.5.11.nupkg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XemioNetwork/GameLibrary/3a644abd58abc12e9db37f9e6af332852e80b2e8/NuGet/Xemio-GameLibrary.0.5.11.nupkg
--------------------------------------------------------------------------------
/NuGet/Xemio-GameLibrary.0.5.12.nupkg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XemioNetwork/GameLibrary/3a644abd58abc12e9db37f9e6af332852e80b2e8/NuGet/Xemio-GameLibrary.0.5.12.nupkg
--------------------------------------------------------------------------------
/NuGet/Xemio-GameLibrary.0.5.13.nupkg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XemioNetwork/GameLibrary/3a644abd58abc12e9db37f9e6af332852e80b2e8/NuGet/Xemio-GameLibrary.0.5.13.nupkg
--------------------------------------------------------------------------------
/NuGet/Xemio-GameLibrary.0.5.14.nupkg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XemioNetwork/GameLibrary/3a644abd58abc12e9db37f9e6af332852e80b2e8/NuGet/Xemio-GameLibrary.0.5.14.nupkg
--------------------------------------------------------------------------------
/NuGet/Xemio-GameLibrary.0.5.15.nupkg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XemioNetwork/GameLibrary/3a644abd58abc12e9db37f9e6af332852e80b2e8/NuGet/Xemio-GameLibrary.0.5.15.nupkg
--------------------------------------------------------------------------------
/NuGet/Xemio-GameLibrary.0.5.16.nupkg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XemioNetwork/GameLibrary/3a644abd58abc12e9db37f9e6af332852e80b2e8/NuGet/Xemio-GameLibrary.0.5.16.nupkg
--------------------------------------------------------------------------------
/NuGet/Xemio-GameLibrary.0.5.17.nupkg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XemioNetwork/GameLibrary/3a644abd58abc12e9db37f9e6af332852e80b2e8/NuGet/Xemio-GameLibrary.0.5.17.nupkg
--------------------------------------------------------------------------------
/NuGet/Xemio-GameLibrary.0.5.18.nupkg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XemioNetwork/GameLibrary/3a644abd58abc12e9db37f9e6af332852e80b2e8/NuGet/Xemio-GameLibrary.0.5.18.nupkg
--------------------------------------------------------------------------------
/NuGet/Xemio-GameLibrary.0.5.19.nupkg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XemioNetwork/GameLibrary/3a644abd58abc12e9db37f9e6af332852e80b2e8/NuGet/Xemio-GameLibrary.0.5.19.nupkg
--------------------------------------------------------------------------------
/NuGet/Xemio-GameLibrary.0.5.2.nupkg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XemioNetwork/GameLibrary/3a644abd58abc12e9db37f9e6af332852e80b2e8/NuGet/Xemio-GameLibrary.0.5.2.nupkg
--------------------------------------------------------------------------------
/NuGet/Xemio-GameLibrary.0.5.20.nupkg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XemioNetwork/GameLibrary/3a644abd58abc12e9db37f9e6af332852e80b2e8/NuGet/Xemio-GameLibrary.0.5.20.nupkg
--------------------------------------------------------------------------------
/NuGet/Xemio-GameLibrary.0.5.21.nupkg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XemioNetwork/GameLibrary/3a644abd58abc12e9db37f9e6af332852e80b2e8/NuGet/Xemio-GameLibrary.0.5.21.nupkg
--------------------------------------------------------------------------------
/NuGet/Xemio-GameLibrary.0.5.22.nupkg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XemioNetwork/GameLibrary/3a644abd58abc12e9db37f9e6af332852e80b2e8/NuGet/Xemio-GameLibrary.0.5.22.nupkg
--------------------------------------------------------------------------------
/NuGet/Xemio-GameLibrary.0.5.23.nupkg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XemioNetwork/GameLibrary/3a644abd58abc12e9db37f9e6af332852e80b2e8/NuGet/Xemio-GameLibrary.0.5.23.nupkg
--------------------------------------------------------------------------------
/NuGet/Xemio-GameLibrary.0.5.24.1.nupkg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XemioNetwork/GameLibrary/3a644abd58abc12e9db37f9e6af332852e80b2e8/NuGet/Xemio-GameLibrary.0.5.24.1.nupkg
--------------------------------------------------------------------------------
/NuGet/Xemio-GameLibrary.0.5.24.10.nupkg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XemioNetwork/GameLibrary/3a644abd58abc12e9db37f9e6af332852e80b2e8/NuGet/Xemio-GameLibrary.0.5.24.10.nupkg
--------------------------------------------------------------------------------
/NuGet/Xemio-GameLibrary.0.5.24.11.nupkg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XemioNetwork/GameLibrary/3a644abd58abc12e9db37f9e6af332852e80b2e8/NuGet/Xemio-GameLibrary.0.5.24.11.nupkg
--------------------------------------------------------------------------------
/NuGet/Xemio-GameLibrary.0.5.24.12.nupkg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XemioNetwork/GameLibrary/3a644abd58abc12e9db37f9e6af332852e80b2e8/NuGet/Xemio-GameLibrary.0.5.24.12.nupkg
--------------------------------------------------------------------------------
/NuGet/Xemio-GameLibrary.0.5.24.13.nupkg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XemioNetwork/GameLibrary/3a644abd58abc12e9db37f9e6af332852e80b2e8/NuGet/Xemio-GameLibrary.0.5.24.13.nupkg
--------------------------------------------------------------------------------
/NuGet/Xemio-GameLibrary.0.5.24.14.nupkg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XemioNetwork/GameLibrary/3a644abd58abc12e9db37f9e6af332852e80b2e8/NuGet/Xemio-GameLibrary.0.5.24.14.nupkg
--------------------------------------------------------------------------------
/NuGet/Xemio-GameLibrary.0.5.24.15.nupkg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XemioNetwork/GameLibrary/3a644abd58abc12e9db37f9e6af332852e80b2e8/NuGet/Xemio-GameLibrary.0.5.24.15.nupkg
--------------------------------------------------------------------------------
/NuGet/Xemio-GameLibrary.0.5.24.16.nupkg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XemioNetwork/GameLibrary/3a644abd58abc12e9db37f9e6af332852e80b2e8/NuGet/Xemio-GameLibrary.0.5.24.16.nupkg
--------------------------------------------------------------------------------
/NuGet/Xemio-GameLibrary.0.5.24.17.nupkg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XemioNetwork/GameLibrary/3a644abd58abc12e9db37f9e6af332852e80b2e8/NuGet/Xemio-GameLibrary.0.5.24.17.nupkg
--------------------------------------------------------------------------------
/NuGet/Xemio-GameLibrary.0.5.24.18.nupkg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XemioNetwork/GameLibrary/3a644abd58abc12e9db37f9e6af332852e80b2e8/NuGet/Xemio-GameLibrary.0.5.24.18.nupkg
--------------------------------------------------------------------------------
/NuGet/Xemio-GameLibrary.0.5.24.19.nupkg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XemioNetwork/GameLibrary/3a644abd58abc12e9db37f9e6af332852e80b2e8/NuGet/Xemio-GameLibrary.0.5.24.19.nupkg
--------------------------------------------------------------------------------
/NuGet/Xemio-GameLibrary.0.5.24.2.nupkg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XemioNetwork/GameLibrary/3a644abd58abc12e9db37f9e6af332852e80b2e8/NuGet/Xemio-GameLibrary.0.5.24.2.nupkg
--------------------------------------------------------------------------------
/NuGet/Xemio-GameLibrary.0.5.24.20.nupkg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XemioNetwork/GameLibrary/3a644abd58abc12e9db37f9e6af332852e80b2e8/NuGet/Xemio-GameLibrary.0.5.24.20.nupkg
--------------------------------------------------------------------------------
/NuGet/Xemio-GameLibrary.0.5.24.21.nupkg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XemioNetwork/GameLibrary/3a644abd58abc12e9db37f9e6af332852e80b2e8/NuGet/Xemio-GameLibrary.0.5.24.21.nupkg
--------------------------------------------------------------------------------
/NuGet/Xemio-GameLibrary.0.5.24.22.nupkg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XemioNetwork/GameLibrary/3a644abd58abc12e9db37f9e6af332852e80b2e8/NuGet/Xemio-GameLibrary.0.5.24.22.nupkg
--------------------------------------------------------------------------------
/NuGet/Xemio-GameLibrary.0.5.24.23.nupkg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XemioNetwork/GameLibrary/3a644abd58abc12e9db37f9e6af332852e80b2e8/NuGet/Xemio-GameLibrary.0.5.24.23.nupkg
--------------------------------------------------------------------------------
/NuGet/Xemio-GameLibrary.0.5.24.24.nupkg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XemioNetwork/GameLibrary/3a644abd58abc12e9db37f9e6af332852e80b2e8/NuGet/Xemio-GameLibrary.0.5.24.24.nupkg
--------------------------------------------------------------------------------
/NuGet/Xemio-GameLibrary.0.5.24.25.nupkg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XemioNetwork/GameLibrary/3a644abd58abc12e9db37f9e6af332852e80b2e8/NuGet/Xemio-GameLibrary.0.5.24.25.nupkg
--------------------------------------------------------------------------------
/NuGet/Xemio-GameLibrary.0.5.24.3.nupkg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XemioNetwork/GameLibrary/3a644abd58abc12e9db37f9e6af332852e80b2e8/NuGet/Xemio-GameLibrary.0.5.24.3.nupkg
--------------------------------------------------------------------------------
/NuGet/Xemio-GameLibrary.0.5.24.4.nupkg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XemioNetwork/GameLibrary/3a644abd58abc12e9db37f9e6af332852e80b2e8/NuGet/Xemio-GameLibrary.0.5.24.4.nupkg
--------------------------------------------------------------------------------
/NuGet/Xemio-GameLibrary.0.5.24.5.nupkg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XemioNetwork/GameLibrary/3a644abd58abc12e9db37f9e6af332852e80b2e8/NuGet/Xemio-GameLibrary.0.5.24.5.nupkg
--------------------------------------------------------------------------------
/NuGet/Xemio-GameLibrary.0.5.24.6.nupkg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XemioNetwork/GameLibrary/3a644abd58abc12e9db37f9e6af332852e80b2e8/NuGet/Xemio-GameLibrary.0.5.24.6.nupkg
--------------------------------------------------------------------------------
/NuGet/Xemio-GameLibrary.0.5.24.7.nupkg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XemioNetwork/GameLibrary/3a644abd58abc12e9db37f9e6af332852e80b2e8/NuGet/Xemio-GameLibrary.0.5.24.7.nupkg
--------------------------------------------------------------------------------
/NuGet/Xemio-GameLibrary.0.5.24.8.nupkg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XemioNetwork/GameLibrary/3a644abd58abc12e9db37f9e6af332852e80b2e8/NuGet/Xemio-GameLibrary.0.5.24.8.nupkg
--------------------------------------------------------------------------------
/NuGet/Xemio-GameLibrary.0.5.24.9.nupkg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XemioNetwork/GameLibrary/3a644abd58abc12e9db37f9e6af332852e80b2e8/NuGet/Xemio-GameLibrary.0.5.24.9.nupkg
--------------------------------------------------------------------------------
/NuGet/Xemio-GameLibrary.0.5.24.nupkg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XemioNetwork/GameLibrary/3a644abd58abc12e9db37f9e6af332852e80b2e8/NuGet/Xemio-GameLibrary.0.5.24.nupkg
--------------------------------------------------------------------------------
/NuGet/Xemio-GameLibrary.0.5.25.nupkg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XemioNetwork/GameLibrary/3a644abd58abc12e9db37f9e6af332852e80b2e8/NuGet/Xemio-GameLibrary.0.5.25.nupkg
--------------------------------------------------------------------------------
/NuGet/Xemio-GameLibrary.0.5.26.nupkg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XemioNetwork/GameLibrary/3a644abd58abc12e9db37f9e6af332852e80b2e8/NuGet/Xemio-GameLibrary.0.5.26.nupkg
--------------------------------------------------------------------------------
/NuGet/Xemio-GameLibrary.0.5.27.1.nupkg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XemioNetwork/GameLibrary/3a644abd58abc12e9db37f9e6af332852e80b2e8/NuGet/Xemio-GameLibrary.0.5.27.1.nupkg
--------------------------------------------------------------------------------
/NuGet/Xemio-GameLibrary.0.5.27.2.nupkg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XemioNetwork/GameLibrary/3a644abd58abc12e9db37f9e6af332852e80b2e8/NuGet/Xemio-GameLibrary.0.5.27.2.nupkg
--------------------------------------------------------------------------------
/NuGet/Xemio-GameLibrary.0.5.27.nupkg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XemioNetwork/GameLibrary/3a644abd58abc12e9db37f9e6af332852e80b2e8/NuGet/Xemio-GameLibrary.0.5.27.nupkg
--------------------------------------------------------------------------------
/NuGet/Xemio-GameLibrary.0.5.28.nupkg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XemioNetwork/GameLibrary/3a644abd58abc12e9db37f9e6af332852e80b2e8/NuGet/Xemio-GameLibrary.0.5.28.nupkg
--------------------------------------------------------------------------------
/NuGet/Xemio-GameLibrary.0.5.29.nupkg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XemioNetwork/GameLibrary/3a644abd58abc12e9db37f9e6af332852e80b2e8/NuGet/Xemio-GameLibrary.0.5.29.nupkg
--------------------------------------------------------------------------------
/NuGet/Xemio-GameLibrary.0.5.3.nupkg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XemioNetwork/GameLibrary/3a644abd58abc12e9db37f9e6af332852e80b2e8/NuGet/Xemio-GameLibrary.0.5.3.nupkg
--------------------------------------------------------------------------------
/NuGet/Xemio-GameLibrary.0.5.30.nupkg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XemioNetwork/GameLibrary/3a644abd58abc12e9db37f9e6af332852e80b2e8/NuGet/Xemio-GameLibrary.0.5.30.nupkg
--------------------------------------------------------------------------------
/NuGet/Xemio-GameLibrary.0.5.31.nupkg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XemioNetwork/GameLibrary/3a644abd58abc12e9db37f9e6af332852e80b2e8/NuGet/Xemio-GameLibrary.0.5.31.nupkg
--------------------------------------------------------------------------------
/NuGet/Xemio-GameLibrary.0.5.32.nupkg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XemioNetwork/GameLibrary/3a644abd58abc12e9db37f9e6af332852e80b2e8/NuGet/Xemio-GameLibrary.0.5.32.nupkg
--------------------------------------------------------------------------------
/NuGet/Xemio-GameLibrary.0.5.33.nupkg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XemioNetwork/GameLibrary/3a644abd58abc12e9db37f9e6af332852e80b2e8/NuGet/Xemio-GameLibrary.0.5.33.nupkg
--------------------------------------------------------------------------------
/NuGet/Xemio-GameLibrary.0.5.34.nupkg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XemioNetwork/GameLibrary/3a644abd58abc12e9db37f9e6af332852e80b2e8/NuGet/Xemio-GameLibrary.0.5.34.nupkg
--------------------------------------------------------------------------------
/NuGet/Xemio-GameLibrary.0.5.35.nupkg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XemioNetwork/GameLibrary/3a644abd58abc12e9db37f9e6af332852e80b2e8/NuGet/Xemio-GameLibrary.0.5.35.nupkg
--------------------------------------------------------------------------------
/NuGet/Xemio-GameLibrary.0.5.36.nupkg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XemioNetwork/GameLibrary/3a644abd58abc12e9db37f9e6af332852e80b2e8/NuGet/Xemio-GameLibrary.0.5.36.nupkg
--------------------------------------------------------------------------------
/NuGet/Xemio-GameLibrary.0.5.37.nupkg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XemioNetwork/GameLibrary/3a644abd58abc12e9db37f9e6af332852e80b2e8/NuGet/Xemio-GameLibrary.0.5.37.nupkg
--------------------------------------------------------------------------------
/NuGet/Xemio-GameLibrary.0.5.38.nupkg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XemioNetwork/GameLibrary/3a644abd58abc12e9db37f9e6af332852e80b2e8/NuGet/Xemio-GameLibrary.0.5.38.nupkg
--------------------------------------------------------------------------------
/NuGet/Xemio-GameLibrary.0.5.39.nupkg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XemioNetwork/GameLibrary/3a644abd58abc12e9db37f9e6af332852e80b2e8/NuGet/Xemio-GameLibrary.0.5.39.nupkg
--------------------------------------------------------------------------------
/NuGet/Xemio-GameLibrary.0.5.4.nupkg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XemioNetwork/GameLibrary/3a644abd58abc12e9db37f9e6af332852e80b2e8/NuGet/Xemio-GameLibrary.0.5.4.nupkg
--------------------------------------------------------------------------------
/NuGet/Xemio-GameLibrary.0.5.5.nupkg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XemioNetwork/GameLibrary/3a644abd58abc12e9db37f9e6af332852e80b2e8/NuGet/Xemio-GameLibrary.0.5.5.nupkg
--------------------------------------------------------------------------------
/NuGet/Xemio-GameLibrary.0.5.6.nupkg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XemioNetwork/GameLibrary/3a644abd58abc12e9db37f9e6af332852e80b2e8/NuGet/Xemio-GameLibrary.0.5.6.nupkg
--------------------------------------------------------------------------------
/NuGet/Xemio-GameLibrary.0.5.7.nupkg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XemioNetwork/GameLibrary/3a644abd58abc12e9db37f9e6af332852e80b2e8/NuGet/Xemio-GameLibrary.0.5.7.nupkg
--------------------------------------------------------------------------------
/NuGet/Xemio-GameLibrary.0.5.8.nupkg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XemioNetwork/GameLibrary/3a644abd58abc12e9db37f9e6af332852e80b2e8/NuGet/Xemio-GameLibrary.0.5.8.nupkg
--------------------------------------------------------------------------------
/NuGet/Xemio-GameLibrary.0.5.9.nupkg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XemioNetwork/GameLibrary/3a644abd58abc12e9db37f9e6af332852e80b2e8/NuGet/Xemio-GameLibrary.0.5.9.nupkg
--------------------------------------------------------------------------------
/NuGet/Xemio-GameLibrary.0.6.21.nupkg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XemioNetwork/GameLibrary/3a644abd58abc12e9db37f9e6af332852e80b2e8/NuGet/Xemio-GameLibrary.0.6.21.nupkg
--------------------------------------------------------------------------------
/NuGet/Xemio-GameLibrary.0.6.22.nupkg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XemioNetwork/GameLibrary/3a644abd58abc12e9db37f9e6af332852e80b2e8/NuGet/Xemio-GameLibrary.0.6.22.nupkg
--------------------------------------------------------------------------------
/NuGet/Xemio-GameLibrary.0.6.23.nupkg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XemioNetwork/GameLibrary/3a644abd58abc12e9db37f9e6af332852e80b2e8/NuGet/Xemio-GameLibrary.0.6.23.nupkg
--------------------------------------------------------------------------------
/NuGet/Xemio-GameLibrary.0.6.24.1.nupkg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XemioNetwork/GameLibrary/3a644abd58abc12e9db37f9e6af332852e80b2e8/NuGet/Xemio-GameLibrary.0.6.24.1.nupkg
--------------------------------------------------------------------------------
/NuGet/Xemio-GameLibrary.0.6.24.2.nupkg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XemioNetwork/GameLibrary/3a644abd58abc12e9db37f9e6af332852e80b2e8/NuGet/Xemio-GameLibrary.0.6.24.2.nupkg
--------------------------------------------------------------------------------
/NuGet/Xemio-GameLibrary.0.6.24.3.nupkg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XemioNetwork/GameLibrary/3a644abd58abc12e9db37f9e6af332852e80b2e8/NuGet/Xemio-GameLibrary.0.6.24.3.nupkg
--------------------------------------------------------------------------------
/NuGet/Xemio-GameLibrary.0.6.24.4.nupkg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XemioNetwork/GameLibrary/3a644abd58abc12e9db37f9e6af332852e80b2e8/NuGet/Xemio-GameLibrary.0.6.24.4.nupkg
--------------------------------------------------------------------------------
/NuGet/Xemio-GameLibrary.0.6.24.nupkg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XemioNetwork/GameLibrary/3a644abd58abc12e9db37f9e6af332852e80b2e8/NuGet/Xemio-GameLibrary.0.6.24.nupkg
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | GameLibrary
2 | ===========
3 |
4 | Basic 2D game library for indie games.
--------------------------------------------------------------------------------
/Testing/Xemio.Testing.EventSystem/Program.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.IO;
4 | using System.Linq;
5 | using System.Text;
6 | using System.Windows.Forms;
7 | using Xemio.GameLibrary;
8 | using Xemio.GameLibrary.Common;
9 | using Xemio.GameLibrary.Components;
10 | using Xemio.GameLibrary.Events;
11 | using Xemio.GameLibrary.Network.Packages;
12 | using Xemio.GameLibrary.Network.Timing;
13 | using Xemio.GameLibrary.Plugins.Implementations;
14 |
15 | namespace Xemio.Testing.EventSystem
16 | {
17 | public class Program
18 | {
19 | private static IDisposable disposable;
20 |
21 | static void Main(string[] args)
22 | {
23 | throw new InvalidOperationException("Some exception text.");
24 | }
25 |
26 | public static void OnNext(TestEvent value)
27 | {
28 | Console.WriteLine(value.Message);
29 | }
30 |
31 | public static void OnRed(RedEvent value)
32 | {
33 | Console.ForegroundColor = ConsoleColor.Red;
34 | Console.WriteLine(value.Message);
35 | Console.ForegroundColor = ConsoleColor.White;
36 | }
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/Testing/Xemio.Testing.EventSystem/RedEvent.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.IO;
6 | using Xemio.GameLibrary.Events;
7 |
8 | namespace Xemio.Testing.EventSystem
9 | {
10 | public class RedEvent : TestEvent
11 | {
12 | #region Constructors
13 | ///
14 | /// Initializes a new instance of the class.
15 | ///
16 | public RedEvent(string message) : base(message)
17 | {
18 | }
19 | #endregion
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/Testing/Xemio.Testing.EventSystem/TestEvent.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.IO;
6 | using Xemio.GameLibrary.Events;
7 |
8 | namespace Xemio.Testing.EventSystem
9 | {
10 | public class TestEvent : IEvent
11 | {
12 | #region Constructors
13 | ///
14 | /// Initializes a new instance of the class.
15 | ///
16 | public TestEvent(string message)
17 | {
18 | this.Message = message;
19 | }
20 | #endregion
21 |
22 | #region Properties
23 | ///
24 | /// Gets or sets the message.
25 | ///
26 | public string Message { get; set; }
27 | #endregion
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/Testing/Xemio.Testing.EventSystem/app.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/Testing/Xemio.Testing.Input/InputForm.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.ComponentModel;
4 | using System.Data;
5 | using System.Drawing;
6 | using System.Linq;
7 | using System.Text;
8 | using System.Threading.Tasks;
9 | using System.Windows.Forms;
10 |
11 | namespace Xemio.Testing.Input
12 | {
13 | public partial class InputForm : Form
14 | {
15 | public InputForm()
16 | {
17 | InitializeComponent();
18 | }
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/Testing/Xemio.Testing.Input/app.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/Testing/Xemio.Testing.Localization/Program.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.IO;
4 | using System.Linq;
5 | using System.Text;
6 | using Xemio.GameLibrary.Localization;
7 |
8 | namespace Xemio.Testing.Localization
9 | {
10 | class Program
11 | {
12 | static void Main(string[] args)
13 | {
14 | Console.ReadLine();
15 | }
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/Testing/Xemio.Testing.Localization/app.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/Testing/Xemio.Testing.Network/app.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/Testing/Xemio.Testing.ReactiveExtensions/app.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/Testing/Xemio.Testing.Script/app.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/Testing/Xemio.Testing.Sound/Program.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using Xemio.GameLibrary.Math;
6 | using System.Threading;
7 |
8 | namespace Xemio.Testing.Sound
9 | {
10 | class Program
11 | {
12 | static void Main(string[] args)
13 | {
14 | }
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/Testing/Xemio.Testing.Sound/Resources/bell.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XemioNetwork/GameLibrary/3a644abd58abc12e9db37f9e6af332852e80b2e8/Testing/Xemio.Testing.Sound/Resources/bell.wav
--------------------------------------------------------------------------------
/Testing/Xemio.Testing.Sound/app.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/Xemio.GameLibrary.userprefs:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/packages/Xemio-GameLibrary.0.5.94/Xemio-GameLibrary.0.5.94.nupkg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XemioNetwork/GameLibrary/3a644abd58abc12e9db37f9e6af332852e80b2e8/packages/Xemio-GameLibrary.0.5.94/Xemio-GameLibrary.0.5.94.nupkg
--------------------------------------------------------------------------------
/packages/Xemio-GameLibrary.0.5.94/lib/net40/XGL.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XemioNetwork/GameLibrary/3a644abd58abc12e9db37f9e6af332852e80b2e8/packages/Xemio-GameLibrary.0.5.94/lib/net40/XGL.dll
--------------------------------------------------------------------------------
/packages/log4net.2.0.3/lib/net10-full/log4net.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XemioNetwork/GameLibrary/3a644abd58abc12e9db37f9e6af332852e80b2e8/packages/log4net.2.0.3/lib/net10-full/log4net.dll
--------------------------------------------------------------------------------
/packages/log4net.2.0.3/lib/net11-full/log4net.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XemioNetwork/GameLibrary/3a644abd58abc12e9db37f9e6af332852e80b2e8/packages/log4net.2.0.3/lib/net11-full/log4net.dll
--------------------------------------------------------------------------------
/packages/log4net.2.0.3/lib/net20-full/log4net.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XemioNetwork/GameLibrary/3a644abd58abc12e9db37f9e6af332852e80b2e8/packages/log4net.2.0.3/lib/net20-full/log4net.dll
--------------------------------------------------------------------------------
/packages/log4net.2.0.3/lib/net35-client/log4net.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XemioNetwork/GameLibrary/3a644abd58abc12e9db37f9e6af332852e80b2e8/packages/log4net.2.0.3/lib/net35-client/log4net.dll
--------------------------------------------------------------------------------
/packages/log4net.2.0.3/lib/net35-full/log4net.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XemioNetwork/GameLibrary/3a644abd58abc12e9db37f9e6af332852e80b2e8/packages/log4net.2.0.3/lib/net35-full/log4net.dll
--------------------------------------------------------------------------------
/packages/log4net.2.0.3/lib/net40-client/log4net.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XemioNetwork/GameLibrary/3a644abd58abc12e9db37f9e6af332852e80b2e8/packages/log4net.2.0.3/lib/net40-client/log4net.dll
--------------------------------------------------------------------------------
/packages/log4net.2.0.3/lib/net40-full/log4net.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XemioNetwork/GameLibrary/3a644abd58abc12e9db37f9e6af332852e80b2e8/packages/log4net.2.0.3/lib/net40-full/log4net.dll
--------------------------------------------------------------------------------
/packages/log4net.2.0.3/log4net.2.0.3.nupkg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XemioNetwork/GameLibrary/3a644abd58abc12e9db37f9e6af332852e80b2e8/packages/log4net.2.0.3/log4net.2.0.3.nupkg
--------------------------------------------------------------------------------
/packages/repositories.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------