From c1cedcd4ca55189b05fa22772106490468409f5e Mon Sep 17 00:00:00 2001 From: DWVoid Date: Thu, 21 Feb 2019 00:49:42 +0800 Subject: [PATCH] Add UI Lounge Page --- .gitattributes | 6 + Core/ApplicationControl.cs | 16 +- Core/AssemblyReflectiveScanner.cs | 99 ++++++-- Core/Core.csproj | 8 +- Core/EventBus.cs | 20 +- Core/Generic.cs | 1 + Core/LogPort.cs | 1 + Core/Math/Mat4.cs | 3 +- Core/Module.cs | 43 ++-- Core/Network/Client.cs | 1 + Core/Network/ConnectionHost.cs | 1 + Core/Network/Protocol.cs | 1 + Core/Network/Protocols.cs | 1 + Core/Network/Server.cs | 1 + Core/Umbrella.cs | 4 +- Core/Utilities/RateController.cs | 1 + Game/ChunkService.cs | 5 +- Game/Client/PlayerChunkView.cs | 5 +- Game/Control/Info.cs | 81 ++++++ Game/Control/Server.cs | 14 ++ Game/Events.cs | 8 +- Game/Network/Client.cs | 1 + Game/Network/Protocols.cs | 7 +- Game/Network/Server.cs | 19 +- Game/Terrain/Block.cs | 7 +- Game/Umbrella.cs | 4 +- Game/Utilities/Aabb.cs | 1 + Game/Utilities/OrderedList.cs | 1 + Game/World/Blocks.cs | 1 + Game/World/Chunk.cs | 1 + Game/World/ChunkAccess.cs | 1 + Game/World/ChunkConstants.cs | 1 + Game/World/ChunkDisposePattern.cs | 3 +- Game/World/ChunkGenerator.cs | 1 + Game/World/ChunkManager.cs | 1 + Game/World/ChunkReleaseTimer.cs | 1 + Game/World/ChunkStorage.cs | 29 +-- Game/World/ChunkUpdate.cs | 13 +- Game/World/Object.cs | 1 + Game/World/Player.cs | 7 +- Game/World/PlayerObject.cs | 1 + Game/World/StaticChunkPool.cs | 1 + Game/World/World.cs | 1 + Game/World/WorldTasks.cs | 50 ++-- Main/Assets/Textures/Blocks/Bedrock.png | 3 + Main/Assets/Textures/Blocks/Cement.png | 3 + Main/Assets/Textures/Blocks/Coal.png | 3 + Main/Assets/Textures/Blocks/Dirt.png | 3 + Main/Assets/Textures/Blocks/Glowstone.png | 3 + Main/Assets/Textures/Blocks/GrassRound.png | 3 + Main/Assets/Textures/Blocks/GrassTop.png | 3 + Main/Assets/Textures/Blocks/Iron.png | 3 + Main/Assets/Textures/Blocks/Null.png | 3 + Main/Assets/Textures/Blocks/Plank.png | 3 + Main/Assets/Textures/Blocks/Rock.png | 3 + Main/Assets/Textures/Blocks/Sand.png | 3 + Main/Assets/Textures/Blocks/Stone.png | 3 + Main/Assets/Textures/Blocks/TrunkRound.png | 3 + Main/Assets/Textures/Blocks/TrunkTop.png | 3 + Main/Assets/Textures/Blocks/Water.png | 3 + Main/Main.cs | 30 +-- Main/Umbrella.cs | 4 +- NEWorld.Linux/NEWorld.Linux.csproj | 9 +- NEWorld.Linux/NEWorldApp.cs | 8 +- NEWorld.Windows/NEWorldApp.cs | 12 +- NEWorld.macOS/NEWorld.macOS.csproj | 9 +- NEWorld.macOS/NEWorldApp.cs | 8 +- NEWorld.sln | 7 +- NEWorld.sln.DotSettings.user | 3 + NEWorld/Application.cs | 37 +++ NEWorld/Assets/GameSettings.xkgamesettings | 8 +- NEWorld/Assets/GraphicsCompositor.xkgfxcomp | 120 ++++----- NEWorld/Assets/UI/Lounge/B0.png | 3 + NEWorld/Assets/UI/Lounge/B0.xktex | 10 + NEWorld/Assets/UI/Lounge/B1.png | 3 + NEWorld/Assets/UI/Lounge/B1.xktex | 10 + NEWorld/Assets/UI/Lounge/B2.png | 3 + NEWorld/Assets/UI/Lounge/B2.xktex | 10 + NEWorld/Assets/UI/Lounge/B3.png | 3 + NEWorld/Assets/UI/Lounge/B3.xktex | 10 + NEWorld/Assets/UI/Lounge/B4.png | 3 + NEWorld/Assets/UI/Lounge/B4.xktex | 10 + NEWorld/Assets/UI/Lounge/B5.png | 3 + NEWorld/Assets/UI/Lounge/B5.xktex | 10 + .../UI/Lounge/LocalWorldSelector.xkuipage | 38 +++ NEWorld/Assets/UI/Lounge/Lounge.xkuipage | 238 ++++++++++++++++++ NEWorld/Assets/UI/Lounge/LoungeScene.xkscene | 222 ++++++++++++++++ NEWorld/Assets/UI/Lounge/Title.png | 3 + NEWorld/Assets/UI/Lounge/Title.xktex | 13 + .../UI/Shared/Font/SourceHanSansCN-Normal.otf | 3 + .../UI/Shared/Font/SourceHanSansCN.xkfnt | 7 + NEWorld/Assets/UI/SplashScreen.png | 3 + NEWorld/Assets/UI/SplashScreen.xktex | 10 + NEWorld/Assets/UISlim.xkgfxcomp | 109 ++++++++ NEWorld/BasicCameraController.cs | 1 + NEWorld/Effects/VertexTextureTerrain.cs | 9 +- NEWorld/MainScript.cs | 10 +- NEWorld/NEWorld.csproj | 8 +- NEWorld/Renderer/RdChunk.cs | 11 +- NEWorld/Renderer/RdTextures.cs | 23 +- NEWorld/Renderer/RdWorld.cs | 3 +- NEWorld/Renderer/VertexBuilder.cs | 1 + NEWorld/Resources/skybox_texture_ldr.dds | 3 + NEWorld/UI/Lounge/CubeRotate.cs | 54 ++++ NEWorld/UI/Lounge/LoungePageControl.cs | 41 +++ NEWorld/UI/Shared/AllowWindowResize.cs | 97 +++++++ NEWorld/UI/Shared/UIAutoSize.cs | 50 ++++ NEWorld/Umbrella.cs | 4 +- NEWorldServer/Program.cs | 5 +- NEWorldShell/Cli.cs | 1 + NEWorldShell/Command.cs | 1 + NEWorldShell/Program.cs | 6 +- NEWorldShell/Properties/AssemblyInfo.cs | 1 + 113 files changed, 1530 insertions(+), 299 deletions(-) create mode 100644 .gitattributes create mode 100644 Game/Control/Info.cs create mode 100644 Game/Control/Server.cs create mode 100644 Main/Assets/Textures/Blocks/Bedrock.png create mode 100644 Main/Assets/Textures/Blocks/Cement.png create mode 100644 Main/Assets/Textures/Blocks/Coal.png create mode 100644 Main/Assets/Textures/Blocks/Dirt.png create mode 100644 Main/Assets/Textures/Blocks/Glowstone.png create mode 100644 Main/Assets/Textures/Blocks/GrassRound.png create mode 100644 Main/Assets/Textures/Blocks/GrassTop.png create mode 100644 Main/Assets/Textures/Blocks/Iron.png create mode 100644 Main/Assets/Textures/Blocks/Null.png create mode 100644 Main/Assets/Textures/Blocks/Plank.png create mode 100644 Main/Assets/Textures/Blocks/Rock.png create mode 100644 Main/Assets/Textures/Blocks/Sand.png create mode 100644 Main/Assets/Textures/Blocks/Stone.png create mode 100644 Main/Assets/Textures/Blocks/TrunkRound.png create mode 100644 Main/Assets/Textures/Blocks/TrunkTop.png create mode 100644 Main/Assets/Textures/Blocks/Water.png create mode 100644 NEWorld/Application.cs create mode 100644 NEWorld/Assets/UI/Lounge/B0.png create mode 100644 NEWorld/Assets/UI/Lounge/B0.xktex create mode 100644 NEWorld/Assets/UI/Lounge/B1.png create mode 100644 NEWorld/Assets/UI/Lounge/B1.xktex create mode 100644 NEWorld/Assets/UI/Lounge/B2.png create mode 100644 NEWorld/Assets/UI/Lounge/B2.xktex create mode 100644 NEWorld/Assets/UI/Lounge/B3.png create mode 100644 NEWorld/Assets/UI/Lounge/B3.xktex create mode 100644 NEWorld/Assets/UI/Lounge/B4.png create mode 100644 NEWorld/Assets/UI/Lounge/B4.xktex create mode 100644 NEWorld/Assets/UI/Lounge/B5.png create mode 100644 NEWorld/Assets/UI/Lounge/B5.xktex create mode 100644 NEWorld/Assets/UI/Lounge/LocalWorldSelector.xkuipage create mode 100644 NEWorld/Assets/UI/Lounge/Lounge.xkuipage create mode 100644 NEWorld/Assets/UI/Lounge/LoungeScene.xkscene create mode 100644 NEWorld/Assets/UI/Lounge/Title.png create mode 100644 NEWorld/Assets/UI/Lounge/Title.xktex create mode 100644 NEWorld/Assets/UI/Shared/Font/SourceHanSansCN-Normal.otf create mode 100644 NEWorld/Assets/UI/Shared/Font/SourceHanSansCN.xkfnt create mode 100644 NEWorld/Assets/UI/SplashScreen.png create mode 100644 NEWorld/Assets/UI/SplashScreen.xktex create mode 100644 NEWorld/Assets/UISlim.xkgfxcomp create mode 100644 NEWorld/Resources/skybox_texture_ldr.dds create mode 100644 NEWorld/UI/Lounge/CubeRotate.cs create mode 100644 NEWorld/UI/Lounge/LoungePageControl.cs create mode 100644 NEWorld/UI/Shared/AllowWindowResize.cs create mode 100644 NEWorld/UI/Shared/UIAutoSize.cs diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..039b2be --- /dev/null +++ b/.gitattributes @@ -0,0 +1,6 @@ +*.otf filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.jpg filter=lfs diff=lfs merge=lfs -text +*.jpeg filter=lfs diff=lfs merge=lfs -text +*.dds filter=lfs diff=lfs merge=lfs -text diff --git a/Core/ApplicationControl.cs b/Core/ApplicationControl.cs index 4c16dff..51a49d5 100644 --- a/Core/ApplicationControl.cs +++ b/Core/ApplicationControl.cs @@ -21,23 +21,23 @@ namespace Core { public static class ApplicationControl { - public class Launch + public static void DoLaunch() { + AssemblyReflectiveScanner.UpdateDomainAssemblies(); + EventBus.Broadcast(null, new Launch()); } - public class Shutdown + public static void DoShutdown() { + EventBus.Broadcast(null, new Shutdown()); } - public static void DoLaunch() + public class Launch { - AssemblyReflectiveScanner.UpdateDomainAssemblies(); - EventBus.Broadcast(null, new Launch()); } - public static void DoShutdown() + public class Shutdown { - EventBus.Broadcast(null, new Shutdown()); } } -} +} \ No newline at end of file diff --git a/Core/AssemblyReflectiveScanner.cs b/Core/AssemblyReflectiveScanner.cs index 4b93882..ba019e8 100644 --- a/Core/AssemblyReflectiveScanner.cs +++ b/Core/AssemblyReflectiveScanner.cs @@ -17,6 +17,12 @@ // along with NEWorld. If not, see . // +// IMPORTANT NOTICE: The Design and Implementation of this Functionality Assumes that there is +// and will only be ONE AppDomain Throughout the Entire Instance of The Program. +// This decision is made for the lack of functionality of the .Net Core and .Net Standard on +// isolating and safety issues. All internal interfaces and implementations ARE SUBJECTED TO CHANGE +// in the future so DO NOT rely on them for any reason outside this assembly + using System; using System.Collections.Generic; using System.Reflection; @@ -25,6 +31,19 @@ namespace Core { public sealed class DeclareNeWorldAssemblyAttribute : Attribute { + internal readonly AssemblyScanPolicy Policy; + + public DeclareNeWorldAssemblyAttribute(AssemblyScanPolicy policy = AssemblyScanPolicy.Default) + { + Policy = policy; + } + } + + public enum AssemblyScanPolicy + { + PublicOnly, + All, + Default = PublicOnly } public sealed class DeclareAssemblyReflectiveScannerAttribute : Attribute @@ -49,15 +68,22 @@ internal static void UpdateDomainAssemblies() AppDomain.CurrentDomain.AssemblyLoad += OnAssemblyLoadServiceRegisterAgent; var snapshot = AppDomain.CurrentDomain.GetAssemblies(); foreach (var assembly in snapshot) + { if (!CheckIfAssemblyProcessed(assembly)) + { ScanAssembly(assembly); + } + } lock (ProcessLock) { _processed = null; lock (Scanned) { - foreach (var assembly in Scanned) ProcessAssembly(assembly); + foreach (var assembly in Scanned) + { + ProcessNewAssembly(assembly); + } } } } @@ -66,7 +92,7 @@ private static bool CheckIfAssemblyProcessed(Assembly assembly) { lock (ProcessLock) { - return _processed != null && (bool) (_processed?.Contains(assembly.GetName())); + return _processed != null && (bool) _processed?.Contains(assembly.GetName()); } } @@ -77,12 +103,17 @@ private static void OnAssemblyLoadServiceRegisterAgent(object sender, AssemblyLo private static void ScanForAssemblyScanners(Assembly assembly) { - foreach (var type in assembly.GetExportedTypes()) - if (CheckScannerType(type)) + var allowPrivate = GetAssemblyScanPolicy(assembly) == AssemblyScanPolicy.All; + foreach (var type in assembly.DefinedTypes) + { + if ((type.IsPublic || allowPrivate) && IsScannerType(type)) + { InitializeScanner(type); + } + } } - private static bool CheckScannerType(Type type) + private static bool IsScannerType(Type type) { return type.IsDefined(typeof(DeclareAssemblyReflectiveScannerAttribute), false) && typeof(IAssemblyReflectiveScanner).IsAssignableFrom(type); @@ -99,15 +130,38 @@ private static void InitializeScanner(Type type) lock (ProcessLock) { if (_processed != null) return; - lock (Scanned) + ProcessPastAssemblies(currentScanner); + } + } + + private static void ProcessPastAssemblies(IAssemblyReflectiveScanner currentScanner) + { + lock (Scanned) + { + foreach (var assembly in Scanned) { - foreach (var assembly in Scanned) - foreach (var target in assembly.GetExportedTypes()) - currentScanner.ProcessType(target); + ProcessPastAssembly(currentScanner, assembly); + } + } + } + + private static void ProcessPastAssembly(IAssemblyReflectiveScanner currentScanner, Assembly assembly) + { + var allowPrivate = GetAssemblyScanPolicy(assembly) == AssemblyScanPolicy.All; + foreach (var target in assembly.DefinedTypes) + { + if (target.IsPublic || allowPrivate) + { + currentScanner.ProcessType(target); } } } + private static AssemblyScanPolicy GetAssemblyScanPolicy(Assembly assembly) + { + return assembly.GetCustomAttribute().Policy; + } + private static void ScanAssembly(Assembly assembly) { lock (ProcessLock) @@ -126,17 +180,34 @@ private static void ScanAssembly(Assembly assembly) lock (ProcessLock) { - if (_processed == null) ProcessAssembly(assembly); + if (_processed == null) + { + ProcessNewAssembly(assembly); + } } } - private static void ProcessAssembly(Assembly assembly) + private static void ProcessNewAssembly(Assembly assembly) { - foreach (var target in assembly.GetExportedTypes()) - lock (Scanners) + var allowPrivate = GetAssemblyScanPolicy(assembly) == AssemblyScanPolicy.All; + foreach (var target in assembly.DefinedTypes) + { + if (target.IsPublic || allowPrivate) { - foreach (var currentScanner in Scanners) currentScanner.ProcessType(target); + ProcessNewAssemblyType(target); } + } + } + + private static void ProcessNewAssemblyType(Type target) + { + lock (Scanners) + { + foreach (var currentScanner in Scanners) + { + currentScanner.ProcessType(target); + } + } } } } \ No newline at end of file diff --git a/Core/Core.csproj b/Core/Core.csproj index 7396d2f..82c66cd 100644 --- a/Core/Core.csproj +++ b/Core/Core.csproj @@ -1,12 +1,10 @@ - netstandard2.0 - - - + + - + \ No newline at end of file diff --git a/Core/EventBus.cs b/Core/EventBus.cs index 89c53a1..e71d10a 100644 --- a/Core/EventBus.cs +++ b/Core/EventBus.cs @@ -144,6 +144,16 @@ public static void Broadcast(object sender, T payload) slot?.Invoke(sender, payload); } + [DeclareAssemblyReflectiveScanner] + private sealed class GlobalHandlerClassDetector : IAssemblyReflectiveScanner + { + public void ProcessType(Type type) + { + if (type.IsDefined(typeof(DeclareGlobalBusEventHandlerClassAttribute), false)) + AddCollection(Activator.CreateInstance(type)); + } + } + private interface ISlot { void Add(Delegate handler); @@ -179,15 +189,7 @@ public void Invoke(object sender, T payload) } } - public sealed class DeclareGlobalBusEventHandlerClassAttribute : Attribute {} - - [DeclareAssemblyReflectiveScanner] - public sealed class GlobalBusEventHandlerClassDetector : IAssemblyReflectiveScanner + public sealed class DeclareGlobalBusEventHandlerClassAttribute : Attribute { - public void ProcessType(Type type) - { - if (type.IsDefined(typeof(DeclareGlobalBusEventHandlerClassAttribute), false)) - EventBus.AddCollection(Activator.CreateInstance(type)); - } } } \ No newline at end of file diff --git a/Core/Generic.cs b/Core/Generic.cs index 54dfe9a..4947889 100644 --- a/Core/Generic.cs +++ b/Core/Generic.cs @@ -16,6 +16,7 @@ // You should have received a copy of the GNU Lesser General Public License // along with NEWorld. If not, see . // + namespace Core { public static class Generic diff --git a/Core/LogPort.cs b/Core/LogPort.cs index 508e928..a11a586 100644 --- a/Core/LogPort.cs +++ b/Core/LogPort.cs @@ -16,6 +16,7 @@ // You should have received a copy of the GNU Lesser General Public License // along with NEWorld. If not, see . // + using System; using Xenko.Core.Diagnostics; diff --git a/Core/Math/Mat4.cs b/Core/Math/Mat4.cs index 9943c66..49a9fca 100644 --- a/Core/Math/Mat4.cs +++ b/Core/Math/Mat4.cs @@ -16,6 +16,7 @@ // You should have received a copy of the GNU Lesser General Public License // along with NEWorld. If not, see . // + using System.Collections.Generic; using Xenko.Core.Mathematics; @@ -23,7 +24,7 @@ namespace Core.Math { public struct Mat4D { - private const double Pi = 3.1415926535897932f; + private const double Pi = System.Math.PI; public double[] Data; diff --git a/Core/Module.cs b/Core/Module.cs index 5620d60..b1a5497 100644 --- a/Core/Module.cs +++ b/Core/Module.cs @@ -41,27 +41,6 @@ public sealed class Modules : IAssemblyReflectiveScanner private static readonly Dictionary Loaded = new Dictionary(); private static string _basePath = AppContext.BaseDirectory; - - public static void SetBasePath(string path) - { - _basePath = path; - } - - public static void Load(string moduleFile) - { - Assembly.Load(moduleFile); - } - - [DeclareBusEventHandler] - public static void UnloadAll(object sender, ApplicationControl.Shutdown type) - { - lock (Loaded) - { - foreach (var module in Loaded) - module.Value.CoFinalize(); - Loaded.Clear(); - } - } public void ProcessType(Type type) { @@ -74,6 +53,7 @@ public void ProcessType(Type type) { Loaded.Add(type.FullName ?? "", module); } + LogPort.Debug($"Loaded Module : {type}"); } catch (Exception e) @@ -81,5 +61,26 @@ public void ProcessType(Type type) LogPort.Debug($"Module {type} Load Failure : {e}"); } } + + public static void SetBasePath(string path) + { + _basePath = path; + } + + public static void Load(string moduleFile) + { + Assembly.Load(moduleFile); + } + + [DeclareBusEventHandler] + public static void UnloadAll(object sender, ApplicationControl.Shutdown type) + { + lock (Loaded) + { + foreach (var module in Loaded) + module.Value.CoFinalize(); + Loaded.Clear(); + } + } } } \ No newline at end of file diff --git a/Core/Network/Client.cs b/Core/Network/Client.cs index 193fd65..138472b 100644 --- a/Core/Network/Client.cs +++ b/Core/Network/Client.cs @@ -16,6 +16,7 @@ // You should have received a copy of the GNU Lesser General Public License // along with NEWorld. If not, see . // + using System; using System.Collections.Generic; using System.Net.Sockets; diff --git a/Core/Network/ConnectionHost.cs b/Core/Network/ConnectionHost.cs index d761938..a9288c8 100644 --- a/Core/Network/ConnectionHost.cs +++ b/Core/Network/ConnectionHost.cs @@ -16,6 +16,7 @@ // You should have received a copy of the GNU Lesser General Public License // along with NEWorld. If not, see . // + using System; using System.Collections.Generic; using System.Diagnostics; diff --git a/Core/Network/Protocol.cs b/Core/Network/Protocol.cs index ebd9491..6180cac 100644 --- a/Core/Network/Protocol.cs +++ b/Core/Network/Protocol.cs @@ -16,6 +16,7 @@ // You should have received a copy of the GNU Lesser General Public License // along with NEWorld. If not, see . // + namespace Core.Network { public abstract class Protocol diff --git a/Core/Network/Protocols.cs b/Core/Network/Protocols.cs index d2b4855..bbf1809 100644 --- a/Core/Network/Protocols.cs +++ b/Core/Network/Protocols.cs @@ -16,6 +16,7 @@ // You should have received a copy of the GNU Lesser General Public License // along with NEWorld. If not, see . // + using System; using System.Collections.Concurrent; using System.Collections.Generic; diff --git a/Core/Network/Server.cs b/Core/Network/Server.cs index 51354d4..076b583 100644 --- a/Core/Network/Server.cs +++ b/Core/Network/Server.cs @@ -16,6 +16,7 @@ // You should have received a copy of the GNU Lesser General Public License // along with NEWorld. If not, see . // + using System.Collections.Generic; using System.Net; using System.Net.Sockets; diff --git a/Core/Umbrella.cs b/Core/Umbrella.cs index 1bac328..a01966e 100644 --- a/Core/Umbrella.cs +++ b/Core/Umbrella.cs @@ -17,4 +17,6 @@ // along with NEWorld. If not, see . // -[assembly:Core.DeclareNeWorldAssembly] +using Core; + +[assembly: DeclareNeWorldAssembly(AssemblyScanPolicy.All)] \ No newline at end of file diff --git a/Core/Utilities/RateController.cs b/Core/Utilities/RateController.cs index 70d07fb..9adadb1 100644 --- a/Core/Utilities/RateController.cs +++ b/Core/Utilities/RateController.cs @@ -16,6 +16,7 @@ // You should have received a copy of the GNU Lesser General Public License // along with NEWorld. If not, see . // + using System; using System.Threading; diff --git a/Game/ChunkService.cs b/Game/ChunkService.cs index b4aaae1..3df06b6 100644 --- a/Game/ChunkService.cs +++ b/Game/ChunkService.cs @@ -16,6 +16,7 @@ // You should have received a copy of the GNU Lesser General Public License // along with NEWorld. If not, see . // + using Core; using Game.World; @@ -44,9 +45,9 @@ static ChunkService() TaskDispatcher = Services.Get("Game.TaskDispatcher"); } - public static TaskDispatcher TaskDispatcher { get; private set; } + public static TaskDispatcher TaskDispatcher { get; } - public static WorldManager Worlds { get; private set; } + public static WorldManager Worlds { get; } public static bool IsAuthority { set; get; } diff --git a/Game/Client/PlayerChunkView.cs b/Game/Client/PlayerChunkView.cs index 36349d6..d258c56 100644 --- a/Game/Client/PlayerChunkView.cs +++ b/Game/Client/PlayerChunkView.cs @@ -16,6 +16,7 @@ // You should have received a copy of the GNU Lesser General Public License // along with NEWorld. If not, see . // + using Game.World; using Xenko.Core.Mathematics; @@ -27,10 +28,10 @@ public class PlayerChunkView private const int SectionBits = 4; - private Chunk[,,][,,] Section; - private Int3 BasePosition; + private Chunk[,,][,,] Section; + private Chunk[,,] GetSectionRelative(Int3 offset) { return Section[offset.X >> SectionBits, offset.Y >> SectionBits, offset.Y >> SectionBits]; diff --git a/Game/Control/Info.cs b/Game/Control/Info.cs new file mode 100644 index 0000000..bd8643a --- /dev/null +++ b/Game/Control/Info.cs @@ -0,0 +1,81 @@ +// +// NEWorld/Game: Info.cs +// NEWorld: A Free Game with Similar Rules to Minecraft. +// Copyright (C) 2015-2019 NEWorld Team +// +// NEWorld is free software: you can redistribute it and/or modify it +// under the terms of the GNU Lesser General Public License as published +// by the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// NEWorld is distributed in the hope that it will be useful, but WITHOUT +// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY +// or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General +// Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with NEWorld. If not, see . +// + +using System.Collections.Generic; +using MessagePack; + +namespace Game.Control +{ + // IMPORTANT NOTICE: This structure is NOT necessary the same for all players on the same servers + // only the information a user has been granted access to should be sent to a target user + [MessagePackObject] + public class UniverseInfo + { + #region Basic Voxel Information (By Order Of Loading) Needing For Entering the Game + + [Key(0)] public RequiredModulesInfo RequiredModules { get; set; } + + [Key(1)] public BlocksInfo RequireBlocks { get; set; } + + [Key(2)] public AvailableWorlds AvailableWorlds { get; set; } + + #endregion + } + + [MessagePackObject] + public class ModuleInfo + { + [Key(0)] public string Name { get; set; } + + [Key(1)] public string Uri { get; set; } + + [Key(2)] public uint[] Version { get; set; } + } + + [MessagePackObject] + public class RequiredModulesInfo + { + [Key(0)] public List Modules { get; set; } + } + + [MessagePackObject] + public struct BlockInfo + { + [Key(0)] public string Name { get; set; } + + [Key(1)] public uint Id { get; set; } + } + + [MessagePackObject] + public class BlocksInfo + { + [Key(0)] public List Blocks { get; set; } + } + + [MessagePackObject] + public class WorldInfo + { + } + + [MessagePackObject] + public class AvailableWorlds + { + [Key(0)] public List Worlds { get; set; } + } +} \ No newline at end of file diff --git a/Game/Control/Server.cs b/Game/Control/Server.cs new file mode 100644 index 0000000..6b7b563 --- /dev/null +++ b/Game/Control/Server.cs @@ -0,0 +1,14 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace Game.Control +{ + public class Server + { + public Server() + { + + } + } +} diff --git a/Game/Events.cs b/Game/Events.cs index 2e818ff..f467aba 100644 --- a/Game/Events.cs +++ b/Game/Events.cs @@ -17,8 +17,6 @@ // along with NEWorld. If not, see . // -using Core; - namespace Game { public class GameRenderPrepareEvent @@ -44,4 +42,8 @@ public class GameUnloadEvent public class GameRenderFinalizeEvent { } -} + + public class GameControl + { + } +} \ No newline at end of file diff --git a/Game/Network/Client.cs b/Game/Network/Client.cs index 0972f8b..cd95b57 100644 --- a/Game/Network/Client.cs +++ b/Game/Network/Client.cs @@ -16,6 +16,7 @@ // You should have received a copy of the GNU Lesser General Public License // along with NEWorld. If not, see . // + using System; using System.Threading.Tasks; using Core; diff --git a/Game/Network/Protocols.cs b/Game/Network/Protocols.cs index 62ef3af..a87fab2 100644 --- a/Game/Network/Protocols.cs +++ b/Game/Network/Protocols.cs @@ -16,6 +16,7 @@ // You should have received a copy of the GNU Lesser General Public License // along with NEWorld. If not, see . // + using System.Collections.Generic; using System.Threading; using System.Threading.Tasks; @@ -30,7 +31,9 @@ public static class GetStaticChunkIds { public class Server : FixedLengthProtocol { - public Server() : base(4){} + public Server() : base(4) + { + } public override string Name() { @@ -131,7 +134,7 @@ public override string Name() { return "GetChunk"; } - + public override void HandleRequest(Session.Receive request) { var buffer = new byte[Size]; diff --git a/Game/Network/Server.cs b/Game/Network/Server.cs index a89a913..131a0ce 100644 --- a/Game/Network/Server.cs +++ b/Game/Network/Server.cs @@ -16,6 +16,7 @@ // You should have received a copy of the GNU Lesser General Public License // along with NEWorld. If not, see . // + using System; using System.Threading.Tasks; using Core; @@ -29,10 +30,17 @@ public class Server : IDisposable private Task wait; + public void Dispose() + { + Dispose(true); + GC.SuppressFinalize(this); + } + ~Server() { Dispose(false); } + public void Enable(int port) { server = new Core.Network.Server(port); @@ -67,16 +75,7 @@ private void ReleaseUnmanagedResources() private void Dispose(bool disposing) { ReleaseUnmanagedResources(); - if (disposing) - { - wait?.Dispose(); - } - } - - public void Dispose() - { - Dispose(true); - GC.SuppressFinalize(this); + if (disposing) wait?.Dispose(); } } } \ No newline at end of file diff --git a/Game/Terrain/Block.cs b/Game/Terrain/Block.cs index 92645ca..182389e 100644 --- a/Game/Terrain/Block.cs +++ b/Game/Terrain/Block.cs @@ -16,6 +16,7 @@ // You should have received a copy of the GNU Lesser General Public License // along with NEWorld. If not, see . // + using System.Collections.Generic; using Game.World; using Xenko.Core.Mathematics; @@ -30,14 +31,14 @@ public struct BlockTexCoord public class BlockRenderContext { + public readonly Chunk Current; + public readonly Chunk[] Neighbors; + public BlockRenderContext(Chunk current, Chunk[] neighbors) { Current = current; Neighbors = neighbors; } - - public readonly Chunk Current; - public readonly Chunk[] Neighbors; } public interface IBlockRenderer diff --git a/Game/Umbrella.cs b/Game/Umbrella.cs index 2b9989f..bd1d3b8 100644 --- a/Game/Umbrella.cs +++ b/Game/Umbrella.cs @@ -17,4 +17,6 @@ // along with NEWorld. If not, see . // -[assembly:Core.DeclareNeWorldAssembly] +using Core; + +[assembly: DeclareNeWorldAssembly] \ No newline at end of file diff --git a/Game/Utilities/Aabb.cs b/Game/Utilities/Aabb.cs index c204613..dd89953 100644 --- a/Game/Utilities/Aabb.cs +++ b/Game/Utilities/Aabb.cs @@ -16,6 +16,7 @@ // You should have received a copy of the GNU Lesser General Public License // along with NEWorld. If not, see . // + using System; using Xenko.Core.Mathematics; diff --git a/Game/Utilities/OrderedList.cs b/Game/Utilities/OrderedList.cs index 35895eb..eb09d77 100644 --- a/Game/Utilities/OrderedList.cs +++ b/Game/Utilities/OrderedList.cs @@ -16,6 +16,7 @@ // You should have received a copy of the GNU Lesser General Public License // along with NEWorld. If not, see . // + using System; using System.Collections; using System.Collections.Generic; diff --git a/Game/World/Blocks.cs b/Game/World/Blocks.cs index e25da66..469f82f 100644 --- a/Game/World/Blocks.cs +++ b/Game/World/Blocks.cs @@ -16,6 +16,7 @@ // You should have received a copy of the GNU Lesser General Public License // along with NEWorld. If not, see . // + namespace Game.World { public struct BlockData diff --git a/Game/World/Chunk.cs b/Game/World/Chunk.cs index ad9cfd5..647a7fb 100644 --- a/Game/World/Chunk.cs +++ b/Game/World/Chunk.cs @@ -16,6 +16,7 @@ // You should have received a copy of the GNU Lesser General Public License // along with NEWorld. If not, see . // + using Xenko.Core.Mathematics; namespace Game.World diff --git a/Game/World/ChunkAccess.cs b/Game/World/ChunkAccess.cs index 1ce2c9a..1f08217 100644 --- a/Game/World/ChunkAccess.cs +++ b/Game/World/ChunkAccess.cs @@ -16,6 +16,7 @@ // You should have received a copy of the GNU Lesser General Public License // along with NEWorld. If not, see . // + using Xenko.Core.Mathematics; namespace Game.World diff --git a/Game/World/ChunkConstants.cs b/Game/World/ChunkConstants.cs index eeff063..e90ee58 100644 --- a/Game/World/ChunkConstants.cs +++ b/Game/World/ChunkConstants.cs @@ -16,6 +16,7 @@ // You should have received a copy of the GNU Lesser General Public License // along with NEWorld. If not, see . // + namespace Game.World { public partial class Chunk diff --git a/Game/World/ChunkDisposePattern.cs b/Game/World/ChunkDisposePattern.cs index ddf627d..f02c14d 100644 --- a/Game/World/ChunkDisposePattern.cs +++ b/Game/World/ChunkDisposePattern.cs @@ -16,11 +16,12 @@ // You should have received a copy of the GNU Lesser General Public License // along with NEWorld. If not, see . // + using System; namespace Game.World { - public partial class Chunk: IDisposable + public partial class Chunk : IDisposable { public void Dispose() { diff --git a/Game/World/ChunkGenerator.cs b/Game/World/ChunkGenerator.cs index 76edacf..4970f6c 100644 --- a/Game/World/ChunkGenerator.cs +++ b/Game/World/ChunkGenerator.cs @@ -16,6 +16,7 @@ // You should have received a copy of the GNU Lesser General Public License // along with NEWorld. If not, see . // + using System; namespace Game.World diff --git a/Game/World/ChunkManager.cs b/Game/World/ChunkManager.cs index 1c3d000..aa27cc0 100644 --- a/Game/World/ChunkManager.cs +++ b/Game/World/ChunkManager.cs @@ -16,6 +16,7 @@ // You should have received a copy of the GNU Lesser General Public License // along with NEWorld. If not, see . // + using System.Collections.Generic; using Xenko.Core.Mathematics; diff --git a/Game/World/ChunkReleaseTimer.cs b/Game/World/ChunkReleaseTimer.cs index f0481f8..a599fc5 100644 --- a/Game/World/ChunkReleaseTimer.cs +++ b/Game/World/ChunkReleaseTimer.cs @@ -16,6 +16,7 @@ // You should have received a copy of the GNU Lesser General Public License // along with NEWorld. If not, see . // + using System; using System.Threading; diff --git a/Game/World/ChunkStorage.cs b/Game/World/ChunkStorage.cs index 7f873d5..f402463 100644 --- a/Game/World/ChunkStorage.cs +++ b/Game/World/ChunkStorage.cs @@ -16,6 +16,7 @@ // You should have received a copy of the GNU Lesser General Public License // along with NEWorld. If not, see . // + using System; using System.Runtime.InteropServices; @@ -23,19 +24,6 @@ namespace Game.World { public unsafe partial class Chunk { - private static class Allocator - { - internal static BlockData* Allocate() - { - return (BlockData*) Marshal.AllocHGlobal(CubeSize * sizeof(BlockData)).ToPointer(); - } - - internal static void Release(BlockData* data) - { - Marshal.FreeHGlobal((IntPtr) data); - } - } - public BlockData* Blocks { get; private set; } public uint CopyOnWrite { get; private set; } = uint.MaxValue; @@ -94,5 +82,18 @@ partial void ReleaseCriticalResources() { ReleaseBlockData(); } + + private static class Allocator + { + internal static BlockData* Allocate() + { + return (BlockData*) Marshal.AllocHGlobal(CubeSize * sizeof(BlockData)).ToPointer(); + } + + internal static void Release(BlockData* data) + { + Marshal.FreeHGlobal((IntPtr) data); + } + } } -} +} \ No newline at end of file diff --git a/Game/World/ChunkUpdate.cs b/Game/World/ChunkUpdate.cs index 3595a80..882db03 100644 --- a/Game/World/ChunkUpdate.cs +++ b/Game/World/ChunkUpdate.cs @@ -25,12 +25,12 @@ public partial class Chunk { public delegate void ChunkUpdateHandler(Chunk chunk); + private bool pendingLocalUpdate, pendingNeighborUpdate; + public static event ChunkUpdateHandler OnChunkUpdate; public static event ChunkUpdateHandler OnNeighborUpdate; - private bool pendingLocalUpdate, pendingNeighborUpdate; - private void TriggerUpdate() { EnqueueLocalUpdateTask(); @@ -46,10 +46,7 @@ private async void EnqueueLocalUpdateTask() private void TriggerNeighborUpdate() { - foreach (var neighbor in GetNeighbors()) - { - neighbor.EnqueueNeighborUpdateTask(); - } + foreach (var neighbor in GetNeighbors()) neighbor.EnqueueNeighborUpdateTask(); } private async void EnqueueNeighborUpdateTask() @@ -62,7 +59,7 @@ private async void EnqueueNeighborUpdateTask() public Chunk[] GetNeighbors() { // TODO: Cache The Value - return new [] + return new[] { World.GetChunk(new Int3(Position.X + 1, Position.Y, Position.Z)), World.GetChunk(new Int3(Position.X - 1, Position.Y, Position.Z)), @@ -73,4 +70,4 @@ public Chunk[] GetNeighbors() }; } } -} +} \ No newline at end of file diff --git a/Game/World/Object.cs b/Game/World/Object.cs index 4fded48..ac96943 100644 --- a/Game/World/Object.cs +++ b/Game/World/Object.cs @@ -16,6 +16,7 @@ // You should have received a copy of the GNU Lesser General Public License // along with NEWorld. If not, see . // + using Game.Utilities; using Xenko.Core.Mathematics; diff --git a/Game/World/Player.cs b/Game/World/Player.cs index 28a1805..ad1c77d 100644 --- a/Game/World/Player.cs +++ b/Game/World/Player.cs @@ -16,8 +16,8 @@ // You should have received a copy of the GNU Lesser General Public License // along with NEWorld. If not, see . // + using Core.Math; -using Core.Utilities; using Xenko.Core.Mathematics; namespace Game.World @@ -115,10 +115,7 @@ public PlayerUpdateTask(Player player, uint worldId) public void Task(int instance, int count) { - if (instance == count) - { - player.Update(ChunkService.Worlds.Get(worldId)); - } + if (instance == count) player.Update(ChunkService.Worlds.Get(worldId)); } } } diff --git a/Game/World/PlayerObject.cs b/Game/World/PlayerObject.cs index 2713248..c98e1ca 100644 --- a/Game/World/PlayerObject.cs +++ b/Game/World/PlayerObject.cs @@ -16,6 +16,7 @@ // You should have received a copy of the GNU Lesser General Public License // along with NEWorld. If not, see . // + using System; using Game.Utilities; using Xenko.Core.Mathematics; diff --git a/Game/World/StaticChunkPool.cs b/Game/World/StaticChunkPool.cs index 86bd254..3a9afed 100644 --- a/Game/World/StaticChunkPool.cs +++ b/Game/World/StaticChunkPool.cs @@ -16,6 +16,7 @@ // You should have received a copy of the GNU Lesser General Public License // along with NEWorld. If not, see . // + using System.Collections.Generic; namespace Game.World diff --git a/Game/World/World.cs b/Game/World/World.cs index 9bae4a9..9e9c08c 100644 --- a/Game/World/World.cs +++ b/Game/World/World.cs @@ -16,6 +16,7 @@ // You should have received a copy of the GNU Lesser General Public License // along with NEWorld. If not, see . // + using System; using System.Collections.Generic; using System.Linq; diff --git a/Game/World/WorldTasks.cs b/Game/World/WorldTasks.cs index ca77e10..7776e39 100644 --- a/Game/World/WorldTasks.cs +++ b/Game/World/WorldTasks.cs @@ -16,6 +16,7 @@ // You should have received a copy of the GNU Lesser General Public License // along with NEWorld. If not, see . // + using System; using System.Threading; using Game.Utilities; @@ -71,7 +72,9 @@ public void Task() { var operated = Interlocked.Exchange(ref chunk, null); if (entryAdded) + { operated.World.ResetChunkAndUpdate(operated); + } else { entryAdded = true; @@ -119,13 +122,33 @@ private class LoadUnloadDetectorTask : IRegularReadOnlyTask private readonly Player player; private readonly World world; + public LoadUnloadDetectorTask(World world, Player player) + { + this.player = player; + this.world = world; + } + + public void Task(int instance, int instances) + { + new Instance(world, player, instance, instances).Run(); + } + + // TODO: Remove Type1 Clone + private static int ChebyshevDistance(Int3 l, Int3 r) + { + return Math.Max(Math.Max(Math.Abs(l.X - r.X), Math.Abs(l.Y - r.Y)), Math.Abs(l.Z - r.Z)); + } + private class Instance { private readonly Int3 centerPos; - private readonly World world; private readonly int instance, instances; private readonly OrderedListIntLess loadList = new OrderedListIntLess(MaxChunkLoadCount); - private readonly OrderedListIntGreater unloadList = new OrderedListIntGreater(MaxChunkUnloadCount); + + private readonly OrderedListIntGreater unloadList = + new OrderedListIntGreater(MaxChunkUnloadCount); + + private readonly World world; internal Instance(World wrd, Player player, int ins, int inst) { @@ -153,8 +176,7 @@ private void GenerateLoadUnloadList(int loadRange) var centerCPos = GetChunkPos(centerPos); // TODO: Instance this - if (instance == 0 ) - { + if (instance == 0) foreach (var chunk in world.Chunks) { var curPos = chunk.Value.Position; @@ -163,7 +185,6 @@ private void GenerateLoadUnloadList(int loadRange) unloadList.Insert((curPos * Chunk.RowSize + MiddleOffset - centerPos).LengthSquared(), chunk.Value); } - } var edge1 = loadRange * 2 + 1; var edge2 = edge1 * edge1; @@ -171,7 +192,7 @@ private void GenerateLoadUnloadList(int loadRange) var corner = new Int3(centerCPos.X - loadRange, centerCPos.Y - loadRange, centerCPos.Z - loadRange); for (var i = instance; i < edge3; i += instances) { - var position = corner + new Int3(i / edge2, (i % edge2) / edge1, i % edge1); + var position = corner + new Int3(i / edge2, i % edge2 / edge1, i % edge1); // In load range, pending to load if (!world.IsChunkLoaded(position)) loadList.Insert((position * Chunk.RowSize + MiddleOffset - centerPos).LengthSquared(), @@ -179,23 +200,6 @@ private void GenerateLoadUnloadList(int loadRange) } } } - - public LoadUnloadDetectorTask(World world, Player player) - { - this.player = player; - this.world = world; - } - - public void Task(int instance, int instances) - { - new Instance(world, player, instance, instances).Run(); - } - - // TODO: Remove Type1 Clone - private static int ChebyshevDistance(Int3 l, Int3 r) - { - return Math.Max(Math.Max(Math.Abs(l.X - r.X), Math.Abs(l.Y - r.Y)), Math.Abs(l.Z - r.Z)); - } } } } \ No newline at end of file diff --git a/Main/Assets/Textures/Blocks/Bedrock.png b/Main/Assets/Textures/Blocks/Bedrock.png new file mode 100644 index 0000000..b201b2d --- /dev/null +++ b/Main/Assets/Textures/Blocks/Bedrock.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:dc62a01ef0f38476a24c96ca27f6521576a2345197d903ed62ebd790ece4934d +size 2493 diff --git a/Main/Assets/Textures/Blocks/Cement.png b/Main/Assets/Textures/Blocks/Cement.png new file mode 100644 index 0000000..e1fde37 --- /dev/null +++ b/Main/Assets/Textures/Blocks/Cement.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9b850ab9039bb74f3f40f7c48630e9a836fc856fdbd3185ea95cf56666122c3e +size 1217 diff --git a/Main/Assets/Textures/Blocks/Coal.png b/Main/Assets/Textures/Blocks/Coal.png new file mode 100644 index 0000000..ddbda53 --- /dev/null +++ b/Main/Assets/Textures/Blocks/Coal.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1fc79f50f513e79a9c38c05eafbabfbf188c5d5976bcfef389a01cc1aee7e930 +size 1489 diff --git a/Main/Assets/Textures/Blocks/Dirt.png b/Main/Assets/Textures/Blocks/Dirt.png new file mode 100644 index 0000000..993f4b2 --- /dev/null +++ b/Main/Assets/Textures/Blocks/Dirt.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:50ed8fe0625735646251b1d94d72adf044148ceefb31ccdaba26ed74f2d8a540 +size 1722 diff --git a/Main/Assets/Textures/Blocks/Glowstone.png b/Main/Assets/Textures/Blocks/Glowstone.png new file mode 100644 index 0000000..d7f1b7f --- /dev/null +++ b/Main/Assets/Textures/Blocks/Glowstone.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6c2251bea21f8534476d7a7b9726b3c5fec3aabf0cd4f405f32326fb49763d35 +size 2688 diff --git a/Main/Assets/Textures/Blocks/GrassRound.png b/Main/Assets/Textures/Blocks/GrassRound.png new file mode 100644 index 0000000..3d0231e --- /dev/null +++ b/Main/Assets/Textures/Blocks/GrassRound.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b31fdb88bbaf8b74a3fa228ddae5dcee0635a0a592da14c7e818e2f248d2910e +size 2055 diff --git a/Main/Assets/Textures/Blocks/GrassTop.png b/Main/Assets/Textures/Blocks/GrassTop.png new file mode 100644 index 0000000..5a99ee7 --- /dev/null +++ b/Main/Assets/Textures/Blocks/GrassTop.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:267d9cd9eec11e66db56177c00ff35b3404a32bdf3feacb7a4622b5ca304d34a +size 1876 diff --git a/Main/Assets/Textures/Blocks/Iron.png b/Main/Assets/Textures/Blocks/Iron.png new file mode 100644 index 0000000..2701442 --- /dev/null +++ b/Main/Assets/Textures/Blocks/Iron.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:03fadfb4671f4d4c7b75d48159ac1d29cf4aa03a5836d654794d57aa72e7d636 +size 1026 diff --git a/Main/Assets/Textures/Blocks/Null.png b/Main/Assets/Textures/Blocks/Null.png new file mode 100644 index 0000000..4ae7118 --- /dev/null +++ b/Main/Assets/Textures/Blocks/Null.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:26acd3d08187b5d3eb34c3e1fd388d123aa9a33356adce63ff3091c6bf4e9045 +size 1393 diff --git a/Main/Assets/Textures/Blocks/Plank.png b/Main/Assets/Textures/Blocks/Plank.png new file mode 100644 index 0000000..bc643c8 --- /dev/null +++ b/Main/Assets/Textures/Blocks/Plank.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c5b5a8d6e6b1e74db74c5410296814dc8999a703aa09a31e56fcc38336ebd871 +size 1308 diff --git a/Main/Assets/Textures/Blocks/Rock.png b/Main/Assets/Textures/Blocks/Rock.png new file mode 100644 index 0000000..4cb42cd --- /dev/null +++ b/Main/Assets/Textures/Blocks/Rock.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:78433a3e77d58e3bd1e7455b524181b6d7fa225e9fb8464981024080ab247405 +size 816 diff --git a/Main/Assets/Textures/Blocks/Sand.png b/Main/Assets/Textures/Blocks/Sand.png new file mode 100644 index 0000000..5fd291d --- /dev/null +++ b/Main/Assets/Textures/Blocks/Sand.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:abbd10fe619876f98b0b6356864b4f3344897ef209b0a9c97c79d17806c6d491 +size 2272 diff --git a/Main/Assets/Textures/Blocks/Stone.png b/Main/Assets/Textures/Blocks/Stone.png new file mode 100644 index 0000000..9af71f7 --- /dev/null +++ b/Main/Assets/Textures/Blocks/Stone.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d5563e4b64fe3188b7d92cc1689147e6a3dcbd774c2107b1c6bbf0a5ddd162e0 +size 1935 diff --git a/Main/Assets/Textures/Blocks/TrunkRound.png b/Main/Assets/Textures/Blocks/TrunkRound.png new file mode 100644 index 0000000..2001822 --- /dev/null +++ b/Main/Assets/Textures/Blocks/TrunkRound.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:21f307763e5ba5a895fe11e093a9c1114b1467ffdc064c7e6db22d48ac52e8b5 +size 1040 diff --git a/Main/Assets/Textures/Blocks/TrunkTop.png b/Main/Assets/Textures/Blocks/TrunkTop.png new file mode 100644 index 0000000..0482a16 --- /dev/null +++ b/Main/Assets/Textures/Blocks/TrunkTop.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5472aa55bed80524a9bd991ebc71231b339331ce766a571c0c0ee3c672d00403 +size 930 diff --git a/Main/Assets/Textures/Blocks/Water.png b/Main/Assets/Textures/Blocks/Water.png new file mode 100644 index 0000000..d302d5d --- /dev/null +++ b/Main/Assets/Textures/Blocks/Water.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:23c66afdc9644eb28867780b36e7133395aa2c8310b24443e00836a6fd5a14ba +size 1588 diff --git a/Main/Main.cs b/Main/Main.cs index 7912cbc..64766b9 100644 --- a/Main/Main.cs +++ b/Main/Main.cs @@ -16,6 +16,8 @@ // You should have received a copy of the GNU Lesser General Public License // along with NEWorld. If not, see . // + +using System; using Core; using Game; using Game.Terrain; @@ -43,6 +45,14 @@ public void CoInitialize() EventBus.AddCollection(this); } + public void CoFinalize() + { + } + + public void OnMemoryWarning() + { + } + [DeclareBusEventHandler] public void GameRenderInit(object sender, GameRenderPrepareEvent load) { @@ -55,7 +65,7 @@ public void GameLoads(object sender, GameLoadEvent load) _rockChunkId = StaticChunkPool.GetId("Main.RockChunk"); _waterChunkId = StaticChunkPool.GetId("Main.WaterChunk"); } - + [DeclareBusEventHandler] public void GameUnloads(object sender, GameUnloadEvent load) { @@ -66,14 +76,6 @@ public void GameRenderFinalize(object sender, GameRenderFinalizeEvent load) { } - public void CoFinalize() - { - } - - public void OnMemoryWarning() - { - } - private static void RendererInit() { if (!Services.TryGet("BlockTextures", out var textures)) return; @@ -115,9 +117,9 @@ private static double Noise(int x, int y) private static double InterpolatedNoise(double x, double y) { - var intX = (int)System.Math.Floor(x); + var intX = (int) Math.Floor(x); var fractionalX = x - intX; - var intY = (int)System.Math.Floor(y); + var intY = (int) Math.Floor(y); var fractionalY = y - intY; var v1 = Noise(intX, intY); var v2 = Noise(intX + 1, intY); @@ -152,7 +154,7 @@ public static unsafe void Generator(ChunkGeneratorContext context) for (var z = 0; z < Chunk.RowSize; z++) { var val = heights[x, z] = (int) PerlinNoise2D((pos.X * Chunk.RowSize + x) / NoiseScaleX, - (pos.Z * Chunk.RowSize + z) / NoiseScaleZ) / 2 - 64; + (pos.Z * Chunk.RowSize + z) / NoiseScaleZ) / 2 - 64; if (val < low) low = val; if (val > high) high = val; } @@ -163,13 +165,13 @@ public static unsafe void Generator(ChunkGeneratorContext context) return; } - if ((0-Chunk.RowSize) >= pos.Y * Chunk.RowSize && pos.Y * Chunk.RowSize > high) + if (0 - Chunk.RowSize >= pos.Y * Chunk.RowSize && pos.Y * Chunk.RowSize > high) { context.EnableCopyOnWrite(StaticChunkPool.GetAirChunk()); return; } - if (pos.Y * Chunk.RowSize < (low - Chunk.RowSize - 3)) + if (pos.Y * Chunk.RowSize < low - Chunk.RowSize - 3) { context.EnableCopyOnWrite(_rockChunkId); return; diff --git a/Main/Umbrella.cs b/Main/Umbrella.cs index 5cb3804..8e787b7 100644 --- a/Main/Umbrella.cs +++ b/Main/Umbrella.cs @@ -17,4 +17,6 @@ // along with NEWorld. If not, see . // -[assembly:Core.DeclareNeWorldAssembly] +using Core; + +[assembly: DeclareNeWorldAssembly] \ No newline at end of file diff --git a/NEWorld.Linux/NEWorld.Linux.csproj b/NEWorld.Linux/NEWorld.Linux.csproj index 47a7b5a..eab8ea9 100644 --- a/NEWorld.Linux/NEWorld.Linux.csproj +++ b/NEWorld.Linux/NEWorld.Linux.csproj @@ -1,23 +1,18 @@ - netcoreapp2.1 linux-x64 Resources\Icon.ico WinExe NEWorld.Linux - ..\Bin\Linux\$(Configuration)\ false - true - - + - - + \ No newline at end of file diff --git a/NEWorld.Linux/NEWorldApp.cs b/NEWorld.Linux/NEWorldApp.cs index 342e060..276ff88 100644 --- a/NEWorld.Linux/NEWorldApp.cs +++ b/NEWorld.Linux/NEWorldApp.cs @@ -16,18 +16,14 @@ // You should have received a copy of the GNU Lesser General Public License // along with NEWorld. If not, see . // + namespace NEWorld.Linux { internal static class NEWorldApp { private static void Main(string[] args) { - Core.ApplicationControl.DoLaunch(); - using (var game = new Xenko.Engine.Game()) - { - game.Run(); - } - Core.ApplicationControl.DoShutdown(); + Application.Run(); } } } \ No newline at end of file diff --git a/NEWorld.Windows/NEWorldApp.cs b/NEWorld.Windows/NEWorldApp.cs index 3e740fd..46864d7 100644 --- a/NEWorld.Windows/NEWorldApp.cs +++ b/NEWorld.Windows/NEWorldApp.cs @@ -16,6 +16,9 @@ // You should have received a copy of the GNU Lesser General Public License // along with NEWorld. If not, see . // + +using System.Diagnostics; + namespace NEWorld.Windows { internal static class NEWorldApp @@ -23,13 +26,8 @@ internal static class NEWorldApp private static void Main(string[] args) { // TODO: Remove Later when Launching Server with Client is Possible - var server = System.Diagnostics.Process.Start("NEWorldShell.exe"); - Core.ApplicationControl.DoLaunch(); - using (var game = new Xenko.Engine.Game()) - { - game.Run(); - } - Core.ApplicationControl.DoShutdown(); + var server = Process.Start("NEWorldShell.exe"); + Application.Run(); server?.Kill(); } } diff --git a/NEWorld.macOS/NEWorld.macOS.csproj b/NEWorld.macOS/NEWorld.macOS.csproj index 0baa0dc..b10896a 100644 --- a/NEWorld.macOS/NEWorld.macOS.csproj +++ b/NEWorld.macOS/NEWorld.macOS.csproj @@ -1,23 +1,18 @@ - netcoreapp2.1 osx-x64 Resources\Icon.ico WinExe NEWorld.macOS - ..\Bin\macOS\$(Configuration)\ false - true - - + - - + \ No newline at end of file diff --git a/NEWorld.macOS/NEWorldApp.cs b/NEWorld.macOS/NEWorldApp.cs index b9cc328..0ef7958 100644 --- a/NEWorld.macOS/NEWorldApp.cs +++ b/NEWorld.macOS/NEWorldApp.cs @@ -16,18 +16,14 @@ // You should have received a copy of the GNU Lesser General Public License // along with NEWorld. If not, see . // + namespace NEWorld.macOS { internal static class NEWorldApp { private static void Main(string[] args) { - Core.ApplicationControl.DoLaunch(); - using (var game = new Xenko.Engine.Game()) - { - game.Run(); - } - Core.ApplicationControl.DoShutdown(); + Application.Run(); } } } \ No newline at end of file diff --git a/NEWorld.sln b/NEWorld.sln index 4da911d..93a1eb7 100644 --- a/NEWorld.sln +++ b/NEWorld.sln @@ -1,3 +1,4 @@ + Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 15 VisualStudioVersion = 15.0.28307.271 @@ -18,8 +19,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Main", "Main\Main.csproj", EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NEWorldShell", "NEWorldShell\NEWorldShell.csproj", "{0C30B20E-EBC8-46E2-ADEF-F4FC23C59DF4}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NEWorldServer", "NEWorldServer\NEWorldServer.csproj", "{6252EAE7-5115-41B2-A02C-8F61C2AAE6B8}" -EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -58,10 +57,6 @@ Global {0C30B20E-EBC8-46E2-ADEF-F4FC23C59DF4}.Debug|Any CPU.Build.0 = Debug|Any CPU {0C30B20E-EBC8-46E2-ADEF-F4FC23C59DF4}.Release|Any CPU.ActiveCfg = Release|Any CPU {0C30B20E-EBC8-46E2-ADEF-F4FC23C59DF4}.Release|Any CPU.Build.0 = Release|Any CPU - {6252EAE7-5115-41B2-A02C-8F61C2AAE6B8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {6252EAE7-5115-41B2-A02C-8F61C2AAE6B8}.Debug|Any CPU.Build.0 = Debug|Any CPU - {6252EAE7-5115-41B2-A02C-8F61C2AAE6B8}.Release|Any CPU.ActiveCfg = Release|Any CPU - {6252EAE7-5115-41B2-A02C-8F61C2AAE6B8}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/NEWorld.sln.DotSettings.user b/NEWorld.sln.DotSettings.user index a637337..27a86e1 100644 --- a/NEWorld.sln.DotSettings.user +++ b/NEWorld.sln.DotSettings.user @@ -26,4 +26,7 @@ <Assembly Path="C:\Users\yshli\.nuget\packages\xenko\3.1.0.1-beta01-0430\lib\netstandard2.0\Xenko.dll" /> <Assembly Path="C:\Program Files\dotnet\shared\Microsoft.NETCore.App\2.1.7\System.Collections.Concurrent.dll" /> <Assembly Path="C:\Users\yshli\.nuget\packages\xenko.core\3.1.0.1-beta01-0430\ref\netstandard2.0\Xenko.Core.dll" /> + <Assembly Path="C:\Users\yshli\.nuget\packages\xenko.engine\3.1.0.1-beta01-0441\ref\netstandard2.0\Xenko.Engine.dll" /> + <Assembly Path="C:\Users\yshli\.nuget\packages\xenko.graphics\3.1.0.1-beta01-0441\ref\netstandard2.0\Xenko.Graphics.dll" /> + <Assembly Path="C:\Windows\Microsoft.NET\Framework\v4.0.30319\mscorlib.dll" /> </AssemblyExplorer> \ No newline at end of file diff --git a/NEWorld/Application.cs b/NEWorld/Application.cs new file mode 100644 index 0000000..81e590a --- /dev/null +++ b/NEWorld/Application.cs @@ -0,0 +1,37 @@ +// +// NEWorld/NEWorld: Application.cs +// NEWorld: A Free Game with Similar Rules to Minecraft. +// Copyright (C) 2015-2019 NEWorld Team +// +// NEWorld is free software: you can redistribute it and/or modify it +// under the terms of the GNU Lesser General Public License as published +// by the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// NEWorld is distributed in the hope that it will be useful, but WITHOUT +// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY +// or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General +// Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with NEWorld. If not, see . +// + +using Core; + +namespace NEWorld +{ + public static class Application + { + public static void Run() + { + ApplicationControl.DoLaunch(); + using (var game = new Xenko.Engine.Game()) + { + game.Run(); + } + + ApplicationControl.DoShutdown(); + } + } +} \ No newline at end of file diff --git a/NEWorld/Assets/GameSettings.xkgamesettings b/NEWorld/Assets/GameSettings.xkgamesettings index 7ed69cb..e0c3bb7 100644 --- a/NEWorld/Assets/GameSettings.xkgamesettings +++ b/NEWorld/Assets/GameSettings.xkgamesettings @@ -2,16 +2,16 @@ Id: ea39345b-fe46-475a-b61e-d2e3e67a6cce SerializedVersion: {Xenko: 2.1.0.3} Tags: [] -DefaultScene: 9dff7916-ac70-450a-aed9-fa776976f005:MainScene -GraphicsCompositor: 3156586f-3baa-4f44-bcd7-0d72a73d2f2e:GraphicsCompositor +DefaultScene: 266472ef-16b4-488b-9211-7fd69ba3ffd4:UI/Lounge/LoungeScene +GraphicsCompositor: 6c0e0475-569c-4249-8e38-6c34d2f11b68:UISlim Defaults: - !Xenko.Audio.AudioEngineSettings,Xenko.Audio HrtfSupport: false - !Xenko.Assets.EditorSettings,Xenko.Assets RenderingMode: LDR - !Xenko.Graphics.RenderingSettings,Xenko.Graphics - DefaultBackBufferWidth: 1280 - DefaultBackBufferHeight: 720 + DefaultBackBufferWidth: 600 + DefaultBackBufferHeight: 400 AdaptBackBufferToScreen: false DefaultGraphicsProfile: Level_11_0 ColorSpace: Linear diff --git a/NEWorld/Assets/GraphicsCompositor.xkgfxcomp b/NEWorld/Assets/GraphicsCompositor.xkgfxcomp index 4fa0eef..80491e2 100644 --- a/NEWorld/Assets/GraphicsCompositor.xkgfxcomp +++ b/NEWorld/Assets/GraphicsCompositor.xkgfxcomp @@ -1,40 +1,40 @@ !GraphicsCompositorAsset -Id: 3156586f-3baa-4f44-bcd7-0d72a73d2f2e +Id: 74141388-18d8-4958-9d1e-c4daa50e0add SerializedVersion: {Xenko: 2.1.0.2} Tags: [] Archetype: 823a81bf-bac0-4552-9267-aeed499c40df:DefaultGraphicsCompositorLevel10 Cameras: de2e75c3b2b23e54162686363f3f138e: - Id: dce133b3-fc2c-4978-8f3c-8a7bc66947f0 + Id: 7b2a0985-e9f4-49bc-ab74-f4744f364ef1 Name: Main RenderStages: 47116750c1a5d449b4ad3625f71439b3: - Id: e3a6abbb-fcd8-4308-82a2-fad7de6a5bcc + Id: 0161d4f6-5c9d-4176-a112-879610d2f766 Name: Opaque EffectSlotName: Main SortMode: !SortModeStateChange {} 9105a30fee026d4893472b6aee83d035: - Id: 8676a7c8-a5c8-4aee-929c-33492ebd06e6 + Id: 6f990ec3-f798-410d-869b-74ed90a91010 Name: Transparent EffectSlotName: Main SortMode: !BackToFrontSortMode {} 554e52c061404d4684dd7c4c70f70e0e: - Id: 9772c403-9a1b-4340-9923-4adce150286c + Id: baceac94-87ba-4eae-84e0-6adf785a8f46 Name: ShadowMapCaster EffectSlotName: ShadowMapCaster SortMode: !FrontToBackSortMode {} 5a50638f5c514dc490c8c4f57cc88b57: - Id: c3ba6884-d8c8-421d-bc5f-56fd74ea493f + Id: a19f4eee-fdf7-4c35-a988-8a0e36c67582 Name: ShadowMapCasterParaboloid EffectSlotName: ShadowMapCasterParaboloid SortMode: !FrontToBackSortMode {} bc1a77d2ab254a6e920f86cff65cd75e: - Id: 6d7b2d22-48c7-4dbd-906e-d166d1ae2cd8 + Id: a1a9adb3-0aac-44f0-8d2c-1d46fa6a8f4b Name: ShadowMapCasterCubeMap EffectSlotName: ShadowMapCasterCubeMap SortMode: !FrontToBackSortMode {} 33d9d311a1a65601da9ef56775477f95: - Id: 2f4fde52-5da1-4114-987e-28fa0febbbe4 + Id: 73f58e17-d906-470e-8cf0-a6a5c8be0fe0 Name: GBuffer EffectSlotName: GBuffer SortMode: !FrontToBackSortMode {} @@ -42,31 +42,31 @@ RenderFeatures: d8fb80b0e7995140a46bca8dc36ee8a2: !Xenko.Rendering.MeshRenderFeature,Xenko.Engine RenderStageSelectors: 44cf4a95ef82544e9ce3c6507d5569a9: !Xenko.Rendering.MeshTransparentRenderStageSelector,Xenko.Engine - OpaqueRenderStage: ref!! e3a6abbb-fcd8-4308-82a2-fad7de6a5bcc - TransparentRenderStage: ref!! 8676a7c8-a5c8-4aee-929c-33492ebd06e6 + OpaqueRenderStage: ref!! 0161d4f6-5c9d-4176-a112-879610d2f766 + TransparentRenderStage: ref!! 6f990ec3-f798-410d-869b-74ed90a91010 EffectName: XenkoForwardShadingEffect 6f7224048750e7260ea87c444f74b32c: !Xenko.Rendering.Shadows.ShadowMapRenderStageSelector,Xenko.Engine - ShadowMapRenderStage: ref!! 9772c403-9a1b-4340-9923-4adce150286c + ShadowMapRenderStage: ref!! baceac94-87ba-4eae-84e0-6adf785a8f46 EffectName: XenkoForwardShadingEffect.ShadowMapCaster b60663d7cb46417a94341a39c3bc1a12: !Xenko.Rendering.Shadows.ShadowMapRenderStageSelector,Xenko.Engine - ShadowMapRenderStage: ref!! c3ba6884-d8c8-421d-bc5f-56fd74ea493f + ShadowMapRenderStage: ref!! a19f4eee-fdf7-4c35-a988-8a0e36c67582 EffectName: XenkoForwardShadingEffect.ShadowMapCasterParaboloid f5533b1249b942df8a8aba311cd79532: !Xenko.Rendering.Shadows.ShadowMapRenderStageSelector,Xenko.Engine - ShadowMapRenderStage: ref!! 6d7b2d22-48c7-4dbd-906e-d166d1ae2cd8 + ShadowMapRenderStage: ref!! a1a9adb3-0aac-44f0-8d2c-1d46fa6a8f4b EffectName: XenkoForwardShadingEffect.ShadowMapCasterCubeMap 106341b76db9fcda6a033dad16aa708b: !Xenko.Rendering.MeshTransparentRenderStageSelector,Xenko.Engine - OpaqueRenderStage: ref!! 2f4fde52-5da1-4114-987e-28fa0febbbe4 + OpaqueRenderStage: ref!! 73f58e17-d906-470e-8cf0-a6a5c8be0fe0 EffectName: XenkoForwardShadingEffect.ShadowMapCaster PipelineProcessors: d70f5aee0616e4ab25081ceaf643290c: !Xenko.Rendering.MeshPipelineProcessor,Xenko.Engine - TransparentRenderStage: ref!! 8676a7c8-a5c8-4aee-929c-33492ebd06e6 + TransparentRenderStage: ref!! 6f990ec3-f798-410d-869b-74ed90a91010 26c899b17f88c21ab13bf60a7220ccd1: !Xenko.Rendering.ShadowMeshPipelineProcessor,Xenko.Engine - ShadowMapRenderStage: ref!! 9772c403-9a1b-4340-9923-4adce150286c + ShadowMapRenderStage: ref!! baceac94-87ba-4eae-84e0-6adf785a8f46 ff51170a7d1a4761b73ef6a5c9f0cba2: !Xenko.Rendering.ShadowMeshPipelineProcessor,Xenko.Engine - ShadowMapRenderStage: ref!! c3ba6884-d8c8-421d-bc5f-56fd74ea493f + ShadowMapRenderStage: ref!! a19f4eee-fdf7-4c35-a988-8a0e36c67582 DepthClipping: true ae4336b0a9514e8488e8e0ccbcef25f4: !Xenko.Rendering.ShadowMeshPipelineProcessor,Xenko.Engine - ShadowMapRenderStage: ref!! 6d7b2d22-48c7-4dbd-906e-d166d1ae2cd8 + ShadowMapRenderStage: ref!! a1a9adb3-0aac-44f0-8d2c-1d46fa6a8f4b DepthClipping: true RenderFeatures: 86b959cbdf51a1438d4973177c77c627: !Xenko.Rendering.TransformRenderFeature,Xenko.Engine {} @@ -85,43 +85,43 @@ RenderFeatures: ShadowMapRenderer: !Xenko.Rendering.Shadows.ShadowMapRenderer,Xenko.Engine Renderers: 7c3d3d4c86834c3551bacde2527b3836: !Xenko.Rendering.Shadows.LightDirectionalShadowMapRenderer,Xenko.Engine - ShadowCasterRenderStage: ref!! 9772c403-9a1b-4340-9923-4adce150286c + ShadowCasterRenderStage: ref!! baceac94-87ba-4eae-84e0-6adf785a8f46 1c204b09435636256a3fcfd6f9ddb347: !Xenko.Rendering.Shadows.LightSpotShadowMapRenderer,Xenko.Engine - ShadowCasterRenderStage: ref!! 9772c403-9a1b-4340-9923-4adce150286c + ShadowCasterRenderStage: ref!! baceac94-87ba-4eae-84e0-6adf785a8f46 7c8c69ce27034b4c8bbcab0bcdfe954b: !Xenko.Rendering.Shadows.LightPointShadowMapRendererParaboloid,Xenko.Engine - ShadowCasterRenderStage: ref!! c3ba6884-d8c8-421d-bc5f-56fd74ea493f + ShadowCasterRenderStage: ref!! a19f4eee-fdf7-4c35-a988-8a0e36c67582 d59ef45dd99e49d3af3887763d153aa7: !Xenko.Rendering.Shadows.LightPointShadowMapRendererCubeMap,Xenko.Engine - ShadowCasterRenderStage: ref!! 6d7b2d22-48c7-4dbd-906e-d166d1ae2cd8 + ShadowCasterRenderStage: ref!! a1a9adb3-0aac-44f0-8d2c-1d46fa6a8f4b 28e9bf54a5adbe063f59fb17acb2723e: !Xenko.Rendering.Sprites.SpriteRenderFeature,Xenko.Engine RenderStageSelectors: d74665cff080638a2439c4422e542d85: !Xenko.Rendering.Sprites.SpriteTransparentRenderStageSelector,Xenko.Engine - OpaqueRenderStage: ref!! e3a6abbb-fcd8-4308-82a2-fad7de6a5bcc - TransparentRenderStage: ref!! 8676a7c8-a5c8-4aee-929c-33492ebd06e6 + OpaqueRenderStage: ref!! 0161d4f6-5c9d-4176-a112-879610d2f766 + TransparentRenderStage: ref!! 6f990ec3-f798-410d-869b-74ed90a91010 EffectName: Test 60780391e205770513fdd53e07279a01: !Xenko.Rendering.Background.BackgroundRenderFeature,Xenko.Engine RenderStageSelectors: 11c8b8ccb522e3cd1dd6688016062a6d: !Xenko.Rendering.SimpleGroupToRenderStageSelector,Xenko.Engine - RenderStage: ref!! e3a6abbb-fcd8-4308-82a2-fad7de6a5bcc + RenderStage: ref!! 0161d4f6-5c9d-4176-a112-879610d2f766 EffectName: Test 93933ad00d0c357d4915ad462cbfd04c: !Xenko.Rendering.UI.UIRenderFeature,Xenko.UI RenderStageSelectors: 14a071694411235038a102ac3794bb4d: !Xenko.Rendering.SimpleGroupToRenderStageSelector,Xenko.Engine - RenderStage: ref!! 8676a7c8-a5c8-4aee-929c-33492ebd06e6 + RenderStage: ref!! 6f990ec3-f798-410d-869b-74ed90a91010 EffectName: Test 9013eab3ea0ef6c98bf133b86c173d45: ~(Deleted) SharedRenderers: 60459475d3a3adaf2d1ba5d99913ca75: !Xenko.Rendering.Compositing.ForwardRenderer,Xenko.Engine - Id: eae2968e-f8b9-4541-9f09-291e8b21e99b + Id: 5c0811bd-24ec-45be-8d19-4651518bba2b Clear: Id: 4bc4b2ca-027e-4e4a-94cb-2912709bef5f Color: {R: 0.40491876, G: 0.411895424, B: 0.43775, A: 1.0} LightProbes: true - OpaqueRenderStage: ref!! e3a6abbb-fcd8-4308-82a2-fad7de6a5bcc - TransparentRenderStage: ref!! 8676a7c8-a5c8-4aee-929c-33492ebd06e6 + OpaqueRenderStage: ref!! 0161d4f6-5c9d-4176-a112-879610d2f766 + TransparentRenderStage: ref!! 6f990ec3-f798-410d-869b-74ed90a91010 ShadowMapRenderStages: - fc4d1e0de5c2b0bbc27bcf96e9a848fd: ref!! 9772c403-9a1b-4340-9923-4adce150286c - GBufferRenderStage: ref!! 2f4fde52-5da1-4114-987e-28fa0febbbe4 - PostEffects: !PostProcessingEffects ref!! 88b0e076-6c98-4c42-9e90-3f331a5dbf04 + fc4d1e0de5c2b0bbc27bcf96e9a848fd: ref!! baceac94-87ba-4eae-84e0-6adf785a8f46 + GBufferRenderStage: ref!! 73f58e17-d906-470e-8cf0-a6a5c8be0fe0 + PostEffects*: null LightShafts: null VRSettings: Enabled: false @@ -131,16 +131,16 @@ SharedRenderers: MSAALevel: None MSAAResolver: {} d5b2e71c088247e21556decdce138d96: !Xenko.Rendering.Compositing.ForwardRenderer,Xenko.Engine - Id: 1e68a169-6a0f-4984-af52-9d9e784286fb + Id: 2551278c-77b8-4c5b-8032-4c024acc3146 Clear: Id: 66a42307-1985-4316-871a-768449238c11 Color: {R: 0.40491876, G: 0.411895424, B: 0.43775, A: 1.0} LightProbes: true - OpaqueRenderStage: ref!! e3a6abbb-fcd8-4308-82a2-fad7de6a5bcc - TransparentRenderStage: ref!! 8676a7c8-a5c8-4aee-929c-33492ebd06e6 + OpaqueRenderStage: ref!! 0161d4f6-5c9d-4176-a112-879610d2f766 + TransparentRenderStage: ref!! 6f990ec3-f798-410d-869b-74ed90a91010 ShadowMapRenderStages: - 2323a99a8a983e182f318e55604659b0: ref!! 9772c403-9a1b-4340-9923-4adce150286c - GBufferRenderStage: ref!! 2f4fde52-5da1-4114-987e-28fa0febbbe4 + 2323a99a8a983e182f318e55604659b0: ref!! baceac94-87ba-4eae-84e0-6adf785a8f46 + GBufferRenderStage: ref!! 73f58e17-d906-470e-8cf0-a6a5c8be0fe0 PostEffects: null LightShafts: null VRSettings: @@ -150,48 +150,20 @@ SharedRenderers: SubsurfaceScatteringBlurEffect: null MSAALevel: None MSAAResolver: {} - 34ecb9b2633eacfc439ba8744fe05102: !PostProcessingEffects - Id: 88b0e076-6c98-4c42-9e90-3f331a5dbf04 - AmbientOcclusion: - Enabled: false - LocalReflections: - Enabled: false - ResolvePassResolution: Full - DepthResolution: Half - DepthOfField: - Enabled: false - DOFAreas: {X: 0.5, Y: 6.0, Z: 50.0, W: 200.0} - BrightFilter: - Color: {R: 1.0, G: 1.0, B: 1.0} - Bloom: - Distortion: {X: 1.0, Y: 1.0} - Afterimage: - Enabled: false - LightStreak: - Attenuation: 0.7 - LensFlare: {} - ColorTransforms: - Transforms: - 1e06f805f8b2e949a06c30d45fe413ef: !ToneMap - Operator: !ToneMapHejl2Operator {} - c57351444609d14ea258b3f511ec8a74: !FilmGrain - Enabled: false - e86e22e9a5d65545b8b55fca26e0afee: !Vignetting - Enabled: false - Color: {R: 0.0, G: 0.0, B: 0.0} - Antialiasing: !FXAAEffect {} ee80a20a9bd99f2d70711114e15fe7ca: !Xenko.Rendering.Compositing.DebugRenderer,Xenko.Engine - Id: 5d84ec9b-04da-4738-970f-e7fc4fd99c07 + Id: 64a0fc51-7350-4fae-91bd-a454541890d5 DebugRenderStages: {} + 34ecb9b2633eacfc439ba8744fe05102: ~(Deleted) Game: !Xenko.Rendering.Compositing.SceneCameraRenderer,Xenko.Engine Id: 76fe87cf-f574-4ad6-85b8-e9a9586be0e2 - Camera: ref!! dce133b3-fc2c-4978-8f3c-8a7bc66947f0 + Enabled*: true + Camera*: ref!! 7b2a0985-e9f4-49bc-ab74-f4744f364ef1 Child: !Xenko.Rendering.Compositing.SceneRendererCollection,Xenko.Engine Id: 82568e46-92e7-421a-8dca-114a74e0cd69 Children: - d39c5ddbf8b7d5ca02bafb6496b1cc3c: !Xenko.Rendering.Compositing.ForwardRenderer,Xenko.Engine ref!! eae2968e-f8b9-4541-9f09-291e8b21e99b - 01d338078e9b21121ead0868932613dd: !Xenko.Rendering.Compositing.DebugRenderer,Xenko.Engine ref!! 5d84ec9b-04da-4738-970f-e7fc4fd99c07 - RenderMask: All -SingleView: !Xenko.Rendering.Compositing.ForwardRenderer,Xenko.Engine ref!! 1e68a169-6a0f-4984-af52-9d9e784286fb -Editor: !Xenko.Rendering.Compositing.ForwardRenderer,Xenko.Engine ref!! eae2968e-f8b9-4541-9f09-291e8b21e99b + d39c5ddbf8b7d5ca02bafb6496b1cc3c*: !Xenko.Rendering.Compositing.ForwardRenderer,Xenko.Engine ref!! 5c0811bd-24ec-45be-8d19-4651518bba2b + 01d338078e9b21121ead0868932613dd*: !Xenko.Rendering.Compositing.DebugRenderer,Xenko.Engine ref!! 64a0fc51-7350-4fae-91bd-a454541890d5 + RenderMask*: None +SingleView: !Xenko.Rendering.Compositing.ForwardRenderer,Xenko.Engine ref!! 2551278c-77b8-4c5b-8032-4c024acc3146 +Editor: !Xenko.Rendering.Compositing.ForwardRenderer,Xenko.Engine ref!! 5c0811bd-24ec-45be-8d19-4651518bba2b BlockPositions: {} diff --git a/NEWorld/Assets/UI/Lounge/B0.png b/NEWorld/Assets/UI/Lounge/B0.png new file mode 100644 index 0000000..01feae5 --- /dev/null +++ b/NEWorld/Assets/UI/Lounge/B0.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f4cd74095c946bff288100d22f5a47b203371ce83eaa5947b38d53d43f6e29d2 +size 122464 diff --git a/NEWorld/Assets/UI/Lounge/B0.xktex b/NEWorld/Assets/UI/Lounge/B0.xktex new file mode 100644 index 0000000..6325aee --- /dev/null +++ b/NEWorld/Assets/UI/Lounge/B0.xktex @@ -0,0 +1,10 @@ +!Texture +Id: 1be42123-bc93-48e8-a8a8-37a873ce4c46 +SerializedVersion: {Xenko: 2.0.0.0} +Tags: [] +Source: !file B0.png +IsCompressed: false +Type: !ColorTextureType + ColorKeyColor: {R: 255, G: 0, B: 255, A: 255} +GenerateMipmaps: false +IsStreamable: false diff --git a/NEWorld/Assets/UI/Lounge/B1.png b/NEWorld/Assets/UI/Lounge/B1.png new file mode 100644 index 0000000..ad8de13 --- /dev/null +++ b/NEWorld/Assets/UI/Lounge/B1.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:88a16faa6b4327fd853817904d819982003da7180b78c7074a269b658742ce81 +size 185210 diff --git a/NEWorld/Assets/UI/Lounge/B1.xktex b/NEWorld/Assets/UI/Lounge/B1.xktex new file mode 100644 index 0000000..31c8b9c --- /dev/null +++ b/NEWorld/Assets/UI/Lounge/B1.xktex @@ -0,0 +1,10 @@ +!Texture +Id: bc90caf6-941b-4c95-b8dd-47c43811efbc +SerializedVersion: {Xenko: 2.0.0.0} +Tags: [] +Source: !file B1.png +IsCompressed: false +Type: !ColorTextureType + ColorKeyColor: {R: 255, G: 0, B: 255, A: 255} +GenerateMipmaps: false +IsStreamable: false diff --git a/NEWorld/Assets/UI/Lounge/B2.png b/NEWorld/Assets/UI/Lounge/B2.png new file mode 100644 index 0000000..d756277 --- /dev/null +++ b/NEWorld/Assets/UI/Lounge/B2.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:874a4a2b6e4e6716b29a738c81055db2a81c9e5db07f887ea8ca3723c8cfc03a +size 151652 diff --git a/NEWorld/Assets/UI/Lounge/B2.xktex b/NEWorld/Assets/UI/Lounge/B2.xktex new file mode 100644 index 0000000..7f381ac --- /dev/null +++ b/NEWorld/Assets/UI/Lounge/B2.xktex @@ -0,0 +1,10 @@ +!Texture +Id: 2d8e1661-07d2-4cf7-b6ff-60d7bca0fe23 +SerializedVersion: {Xenko: 2.0.0.0} +Tags: [] +Source: !file B2.png +IsCompressed: false +Type: !ColorTextureType + ColorKeyColor: {R: 255, G: 0, B: 255, A: 255} +GenerateMipmaps: false +IsStreamable: false diff --git a/NEWorld/Assets/UI/Lounge/B3.png b/NEWorld/Assets/UI/Lounge/B3.png new file mode 100644 index 0000000..229a795 --- /dev/null +++ b/NEWorld/Assets/UI/Lounge/B3.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b776ec3304d12ffccfa52eb582d11d75d1d08a4ea29a888173a38e35abc23578 +size 154195 diff --git a/NEWorld/Assets/UI/Lounge/B3.xktex b/NEWorld/Assets/UI/Lounge/B3.xktex new file mode 100644 index 0000000..3664627 --- /dev/null +++ b/NEWorld/Assets/UI/Lounge/B3.xktex @@ -0,0 +1,10 @@ +!Texture +Id: 0a459a5d-87d9-42df-afb8-8203d3f5cf99 +SerializedVersion: {Xenko: 2.0.0.0} +Tags: [] +Source: !file B3.png +IsCompressed: false +Type: !ColorTextureType + ColorKeyColor: {R: 255, G: 0, B: 255, A: 255} +GenerateMipmaps: false +IsStreamable: false diff --git a/NEWorld/Assets/UI/Lounge/B4.png b/NEWorld/Assets/UI/Lounge/B4.png new file mode 100644 index 0000000..ae61a39 --- /dev/null +++ b/NEWorld/Assets/UI/Lounge/B4.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:80ebdd578c3dbbc995f971bc4292bcf0a248a56e65a6d38c67daeb4493a3e3d2 +size 94172 diff --git a/NEWorld/Assets/UI/Lounge/B4.xktex b/NEWorld/Assets/UI/Lounge/B4.xktex new file mode 100644 index 0000000..8d0f625 --- /dev/null +++ b/NEWorld/Assets/UI/Lounge/B4.xktex @@ -0,0 +1,10 @@ +!Texture +Id: 69e7bd7d-543e-421f-a683-519a70ad7d03 +SerializedVersion: {Xenko: 2.0.0.0} +Tags: [] +Source: !file B4.png +IsCompressed: false +Type: !ColorTextureType + ColorKeyColor: {R: 255, G: 0, B: 255, A: 255} +GenerateMipmaps: false +IsStreamable: false diff --git a/NEWorld/Assets/UI/Lounge/B5.png b/NEWorld/Assets/UI/Lounge/B5.png new file mode 100644 index 0000000..6e97efd --- /dev/null +++ b/NEWorld/Assets/UI/Lounge/B5.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:aeb7958227074803e9fbe2fed7f489fef2785941469766497dfceb7e5caa9fd8 +size 2182 diff --git a/NEWorld/Assets/UI/Lounge/B5.xktex b/NEWorld/Assets/UI/Lounge/B5.xktex new file mode 100644 index 0000000..5f89935 --- /dev/null +++ b/NEWorld/Assets/UI/Lounge/B5.xktex @@ -0,0 +1,10 @@ +!Texture +Id: 8903a684-b20f-41cb-8c6f-268c205d80f7 +SerializedVersion: {Xenko: 2.0.0.0} +Tags: [] +Source: !file B5.png +IsCompressed: false +Type: !ColorTextureType + ColorKeyColor: {R: 255, G: 0, B: 255, A: 255} +GenerateMipmaps: false +IsStreamable: false diff --git a/NEWorld/Assets/UI/Lounge/LocalWorldSelector.xkuipage b/NEWorld/Assets/UI/Lounge/LocalWorldSelector.xkuipage new file mode 100644 index 0000000..e100b15 --- /dev/null +++ b/NEWorld/Assets/UI/Lounge/LocalWorldSelector.xkuipage @@ -0,0 +1,38 @@ +!UIPageAsset +Id: d06cf613-9ad3-434c-bfd2-b9e3f5b19e04 +SerializedVersion: {Xenko: 2.1.0.1} +Tags: [] +Design: + Resolution: {X: 1280.0, Y: 720.0, Z: 1000.0} +Hierarchy: + RootParts: + - !Grid ref!! 13360293-ccfc-49de-92e9-d41cb9ec575b + Parts: + - UIElement: !Grid + Id: 13360293-ccfc-49de-92e9-d41cb9ec575b + DependencyProperties: {} + BackgroundColor: {R: 0, G: 0, B: 0, A: 0} + Margin: {} + MaximumWidth: 3.40282347E+38 + MaximumHeight: 3.40282347E+38 + MaximumDepth: 3.40282347E+38 + Children: + e987a57e3a31f725d602e9201c0b23bb: !StackPanel ref!! 538b26ae-7074-42d3-978c-47153e985c6f + RowDefinitions: + 1cfeb1136944ec9d5fce2c51bdb5a980: {} + f4de7cd5a9f2bf46e2e4d4bf529cd3df: {} + b6c0cca7d3fdb7c5f17f7e1967cc34a6: {} + ColumnDefinitions: {} + LayerDefinitions: {} + - UIElement: !StackPanel + Id: 538b26ae-7074-42d3-978c-47153e985c6f + DependencyProperties: + e31642615d104c2d91cd21fd3dd82313~GridBase.RowPropertyKey: 1 + BackgroundColor: {R: 0, G: 0, B: 0, A: 0} + Width: 500.0 + HorizontalAlignment: Center + Margin: {} + MaximumWidth: 3.40282347E+38 + MaximumHeight: 3.40282347E+38 + MaximumDepth: 3.40282347E+38 + Children: {} diff --git a/NEWorld/Assets/UI/Lounge/Lounge.xkuipage b/NEWorld/Assets/UI/Lounge/Lounge.xkuipage new file mode 100644 index 0000000..b96058c --- /dev/null +++ b/NEWorld/Assets/UI/Lounge/Lounge.xkuipage @@ -0,0 +1,238 @@ +!UIPageAsset +Id: 52d6bdef-4fc5-4410-84ae-0d1255ed6eba +SerializedVersion: {Xenko: 2.1.0.1} +Tags: [] +Design: + Resolution: {X: 1280.0, Y: 720.0, Z: 1000.0} +Hierarchy: + RootParts: + - !Grid ref!! e5ccc72f-5e14-4f94-8056-15d7724c8246 + Parts: + - UIElement: !Button + Id: 1b671d97-4a37-48a2-96e8-cbfd8363c83c + DependencyProperties: + b9a39eb68b69f2cb1475a845a757acbb~GridBase.ColumnSpanPropertyKey: 1 + 3430177785c01fcb206444e0be0d35e8~GridBase.RowPropertyKey: 2 + 2b7f21b4fa4241cc7a9f3d4aedf019eb~GridBase.RowSpanPropertyKey: 1 + 88ee862fc11bacfddaebb55fae97e53b~GridBase.ColumnPropertyKey: 1 + BackgroundColor: {R: 0, G: 0, B: 0, A: 0} + DrawLayerNumber: 2 + CanBeHitByUser: true + Width: 210.0 + Height: 40.0 + HorizontalAlignment: Left + VerticalAlignment: Center + Margin: {Left: 10.0} + MaximumWidth: 3.40282347E+38 + MaximumHeight: 3.40282347E+38 + MaximumDepth: 3.40282347E+38 + Name: Exit + Padding: {Left: 10.0, Top: 5.0, Right: 10.0, Bottom: 7.0} + Content: !TextBlock ref!! 7d4ea082-ef2c-4faf-a3dd-448772f14c79 + PressedImage: !SpriteFromSheet + Sheet: 1be3340c-b797-4557-bff7-d9be92dfdb42:XenkoUIDesigns + CurrentFrame: 2 + NotPressedImage: !SpriteFromSheet + Sheet: 1be3340c-b797-4557-bff7-d9be92dfdb42:XenkoUIDesigns + CurrentFrame: 1 + MouseOverImage: !SpriteFromSheet + Sheet: 1be3340c-b797-4557-bff7-d9be92dfdb42:XenkoUIDesigns + ImageStretchType: None + - UIElement: !Grid + Id: 2d105f51-d063-453e-a423-81fdc68a2c7c + DependencyProperties: + 10c39461bee764c41233d24ddb7dc1f3~GridBase.RowPropertyKey: 1 + BackgroundColor: {R: 0, G: 0, B: 0, A: 0} + Margin: {Top: 10.0} + MaximumWidth: 3.40282347E+38 + MaximumHeight: 3.40282347E+38 + MaximumDepth: 3.40282347E+38 + Name: Interactive + Children: + e200fbd1b750fa6c5d9fcddfa875c277: !Button ref!! c27120b3-1f1a-4bb1-bdec-8962049e9e5f + 087365bbc6e6eb967a0574054966635c: !Button ref!! e3de0fc2-2744-4f14-8e7b-775eec4ff34d + 5f77884df073a4e57b05d1da9e327431: !Button ref!! 3de615ee-c31b-421a-bfb0-3f4df8a011cd + ec3f94b03cc4437dbf30ab9c899943be: !Button ref!! 1b671d97-4a37-48a2-96e8-cbfd8363c83c + RowDefinitions: + 45d2b55a5b3de6ccaea3bc6e7221eb22: + Type: Fixed + SizeValue: 50.0 + 633abcaf880990685a2c41a24b4c4695: + MaximumSize: 3.40282347E+38 + Type: Fixed + SizeValue: 50.0 + 4333bf6c515aea6c44d611995130392c: + Type: Fixed + SizeValue: 50.0 + 592348e9881dabdff493556f6a475ebe: {} + ColumnDefinitions: + 9f5dda008a95477df40b5923d990885d: {} + 0be5d098ee8798dd32b2d6f25aa6c5e9: {} + LayerDefinitions: {} + - UIElement: !Button + Id: 3de615ee-c31b-421a-bfb0-3f4df8a011cd + DependencyProperties: + b9a39eb68b69f2cb1475a845a757acbb~GridBase.ColumnSpanPropertyKey: 1 + 3430177785c01fcb206444e0be0d35e8~GridBase.RowPropertyKey: 2 + 2b7f21b4fa4241cc7a9f3d4aedf019eb~GridBase.RowSpanPropertyKey: 1 + BackgroundColor: {R: 0, G: 0, B: 0, A: 0} + DrawLayerNumber: 2 + CanBeHitByUser: true + Width: 210.0 + Height: 40.0 + HorizontalAlignment: Right + VerticalAlignment: Center + Margin: {Right: 10.0} + MaximumWidth: 3.40282347E+38 + MaximumHeight: 3.40282347E+38 + MaximumDepth: 3.40282347E+38 + Name: Options + Padding: {Left: 10.0, Top: 5.0, Right: 10.0, Bottom: 7.0} + Content: !TextBlock ref!! 4c97e84e-eecd-4cf5-bd6f-eb6c04c938bc + PressedImage: !SpriteFromSheet + Sheet: 1be3340c-b797-4557-bff7-d9be92dfdb42:XenkoUIDesigns + CurrentFrame: 2 + NotPressedImage: !SpriteFromSheet + Sheet: 1be3340c-b797-4557-bff7-d9be92dfdb42:XenkoUIDesigns + CurrentFrame: 1 + MouseOverImage: !SpriteFromSheet + Sheet: 1be3340c-b797-4557-bff7-d9be92dfdb42:XenkoUIDesigns + ImageStretchType: None + - UIElement: !TextBlock + Id: 4c97e84e-eecd-4cf5-bd6f-eb6c04c938bc + DependencyProperties: {} + BackgroundColor: {R: 0, G: 0, B: 0, A: 0} + HorizontalAlignment: Center + VerticalAlignment: Center + Margin: {} + MaximumWidth: 3.40282347E+38 + MaximumHeight: 3.40282347E+38 + MaximumDepth: 3.40282347E+38 + Text: Options + Font: 27bab064-a488-480c-a01e-fdba7a935849:UI/Shared/Font/SourceHanSansCN + TextSize: 16.0 + TextColor: {R: 240, G: 240, B: 240, A: 255} + - UIElement: !TextBlock + Id: 677c4e5a-7b34-482d-9a8f-c6d286e44738 + DependencyProperties: {} + BackgroundColor: {R: 0, G: 0, B: 0, A: 0} + HorizontalAlignment: Center + VerticalAlignment: Center + Margin: {} + MaximumWidth: 3.40282347E+38 + MaximumHeight: 3.40282347E+38 + MaximumDepth: 3.40282347E+38 + Text: Play + Font: 27bab064-a488-480c-a01e-fdba7a935849:UI/Shared/Font/SourceHanSansCN + TextSize: 16.0 + TextColor: {R: 240, G: 240, B: 240, A: 255} + - UIElement: !TextBlock + Id: 7d4ea082-ef2c-4faf-a3dd-448772f14c79 + DependencyProperties: {} + BackgroundColor: {R: 0, G: 0, B: 0, A: 0} + HorizontalAlignment: Center + VerticalAlignment: Center + Margin: {} + Text: Exit + Font: 27bab064-a488-480c-a01e-fdba7a935849:UI/Shared/Font/SourceHanSansCN + TextSize: 16.0 + TextColor: {R: 240, G: 240, B: 240, A: 255} + - UIElement: !ImageElement + Id: 93785944-a665-4c81-9170-8f8744957743 + DependencyProperties: {} + BackgroundColor: {R: 0, G: 0, B: 0, A: 0} + HorizontalAlignment: Center + VerticalAlignment: Bottom + Margin: {Bottom: 10.0} + MaximumWidth: 3.40282347E+38 + MaximumHeight: 3.40282347E+38 + MaximumDepth: 3.40282347E+38 + Source: !SpriteFromTexture + Texture: 10bec540-1596-4033-8405-f32612102863:UI/Lounge/Title + Center: {X: 0.0, Y: 0.0} + Color: {R: 255, G: 255, B: 255, A: 255} + StretchType: None + - UIElement: !TextBlock + Id: a786557a-d90d-4a5d-b47d-69c0b9a2fc1c + DependencyProperties: {} + BackgroundColor: {R: 0, G: 0, B: 0, A: 0} + HorizontalAlignment: Center + VerticalAlignment: Center + Margin: {} + Text: Multiplayer + Font: 27bab064-a488-480c-a01e-fdba7a935849:UI/Shared/Font/SourceHanSansCN + TextSize: 16.0 + TextColor: {R: 240, G: 240, B: 240, A: 255} + - UIElement: !Button + Id: c27120b3-1f1a-4bb1-bdec-8962049e9e5f + DependencyProperties: + b9a39eb68b69f2cb1475a845a757acbb~GridBase.ColumnSpanPropertyKey: 2 + BackgroundColor: {R: 0, G: 0, B: 0, A: 0} + DrawLayerNumber: 2 + CanBeHitByUser: true + Width: 440.0 + Height: 40.0 + HorizontalAlignment: Center + VerticalAlignment: Center + Margin: {} + MaximumWidth: 3.40282347E+38 + MaximumHeight: 3.40282347E+38 + MaximumDepth: 3.40282347E+38 + Name: EnterWorldLocal + Padding: {Left: 10.0, Top: 5.0, Right: 10.0, Bottom: 7.0} + Content: !TextBlock ref!! 677c4e5a-7b34-482d-9a8f-c6d286e44738 + PressedImage: !SpriteFromSheet + Sheet: 1be3340c-b797-4557-bff7-d9be92dfdb42:XenkoUIDesigns + CurrentFrame: 2 + NotPressedImage: !SpriteFromSheet + Sheet: 1be3340c-b797-4557-bff7-d9be92dfdb42:XenkoUIDesigns + CurrentFrame: 1 + MouseOverImage: !SpriteFromSheet + Sheet: 1be3340c-b797-4557-bff7-d9be92dfdb42:XenkoUIDesigns + ImageStretchType: None + - UIElement: !Button + Id: e3de0fc2-2744-4f14-8e7b-775eec4ff34d + DependencyProperties: + b9a39eb68b69f2cb1475a845a757acbb~GridBase.ColumnSpanPropertyKey: 2 + 3430177785c01fcb206444e0be0d35e8~GridBase.RowPropertyKey: 1 + BackgroundColor: {R: 0, G: 0, B: 0, A: 0} + DrawLayerNumber: 2 + CanBeHitByUser: true + Width: 440.0 + Height: 40.0 + HorizontalAlignment: Center + VerticalAlignment: Center + Margin: {} + MaximumWidth: 3.40282347E+38 + MaximumHeight: 3.40282347E+38 + MaximumDepth: 3.40282347E+38 + Name: EnterWorldRemote + Padding: {Left: 10.0, Top: 5.0, Right: 10.0, Bottom: 7.0} + Content: !TextBlock ref!! a786557a-d90d-4a5d-b47d-69c0b9a2fc1c + PressedImage: !SpriteFromSheet + Sheet: 1be3340c-b797-4557-bff7-d9be92dfdb42:XenkoUIDesigns + CurrentFrame: 2 + NotPressedImage: !SpriteFromSheet + Sheet: 1be3340c-b797-4557-bff7-d9be92dfdb42:XenkoUIDesigns + CurrentFrame: 1 + MouseOverImage: !SpriteFromSheet + Sheet: 1be3340c-b797-4557-bff7-d9be92dfdb42:XenkoUIDesigns + ImageStretchType: None + - UIElement: !Grid + Id: e5ccc72f-5e14-4f94-8056-15d7724c8246 + DependencyProperties: {} + BackgroundColor: {R: 0, G: 0, B: 0, A: 0} + Margin: {} + MinimumWidth: 600.0 + MinimumHeight: 400.0 + MaximumWidth: 3.40282347E+38 + MaximumHeight: 3.40282347E+38 + MaximumDepth: 3.40282347E+38 + Children: + 3ba6a770f758e35f000a639110b24ea3: !ImageElement ref!! 93785944-a665-4c81-9170-8f8744957743 + e088ff4795cc10d24d8385fc5d117e4d: !Grid ref!! 2d105f51-d063-453e-a423-81fdc68a2c7c + RowDefinitions: + 47395627020cfe293ef661584f8d2aae: {} + 4ae51f5763722281aa1f7f9aaa308ffa: {} + ColumnDefinitions: {} + LayerDefinitions: {} diff --git a/NEWorld/Assets/UI/Lounge/LoungeScene.xkscene b/NEWorld/Assets/UI/Lounge/LoungeScene.xkscene new file mode 100644 index 0000000..e485ab2 --- /dev/null +++ b/NEWorld/Assets/UI/Lounge/LoungeScene.xkscene @@ -0,0 +1,222 @@ +!SceneAsset +Id: 266472ef-16b4-488b-9211-7fd69ba3ffd4 +SerializedVersion: {Xenko: 3.1.0.1} +Tags: [] +ChildrenIds: [] +Offset: {X: 0.0, Y: 0.0, Z: 0.0} +Hierarchy: + RootParts: + - ref!! 0b58c9c6-a837-4da1-85e7-9398f16167f5 + - ref!! e54dea7a-b44c-47ac-8097-34e8f5d9fa05 + - ref!! b743a071-1a3c-4ac5-b6e8-6ade6dc3fe72 + Parts: + - Entity: + Id: 0b58c9c6-a837-4da1-85e7-9398f16167f5 + Name: Camera + Components: + d6d1875287b54a68014538e4d5713f2f: !TransformComponent + Id: 09bd1056-1924-474e-87af-9803664c5b97 + Position: {X: 0.0, Y: 0.0, Z: 0.0} + Rotation: {X: 0.0, Y: 0.0, Z: 0.0, W: 1.0} + Scale: {X: 1.0, Y: 1.0, Z: 1.0} + Children: {} + 933df3d032c0162e7ff9c3af1234527f: !CameraComponent + Id: c98264ae-6c1e-4f8b-a618-d843420fbe2c + Name: null + Projection: Perspective + VerticalFieldOfView: 90.0 + Slot: 318a7c1d-a5b5-449f-aa82-fa422cd75f6c + - Entity: + Id: 115fa7ec-425b-4b30-8a03-6a5ef683dc72 + Name: B1 + Components: + fa2c919757b193961aa21de9e34c46e0: !TransformComponent + Id: cf4e9ca6-b8f6-4e58-9878-8d96a3455610 + Position: {X: -2.56, Y: 0.0, Z: 0.0} + Rotation: {X: -0.707106769, Y: 5.33850759E-08, Z: -0.707106769, W: 5.33850759E-08} + Scale: {X: 1.0, Y: 1.0, Z: 1.0} + Children: {} + aad8bec95ec4d096e3694c88859199f3: !SpriteComponent + Id: 1351f29e-d88a-42fc-8cde-cc3141fd7929 + SpriteProvider: !SpriteFromTexture + Texture: bc90caf6-941b-4c95-b8dd-47c43811efbc:UI/Lounge/B1 + Center: {X: 0.0, Y: 0.0} + IsTransparent: false + Color: {R: 1.0, G: 1.0, B: 1.0, A: 1.0} + PremultipliedAlpha: false + RenderGroup: Group31 + - Entity: + Id: 350ac655-b352-4d5b-b4dd-32780dd4004e + Name: B4 + Components: + 580b57a6a1a04922f81159496c184a0d: !TransformComponent + Id: 3ae26185-12a0-48b9-93d3-6b9ee1f525bf + Position: {X: 0.0, Y: -2.56, Z: 0.0} + Rotation: {X: 0.707106769, Y: 0.0, Z: 0.0, W: 0.707106769} + Scale: {X: 1.0, Y: 1.0, Z: 1.0} + Children: {} + a3f14bb20098f66f7816b6d2ea041a27: !SpriteComponent + Id: 2f285419-604a-4eb0-b68b-50e94585be89 + SpriteProvider: !SpriteFromTexture + Texture: 69e7bd7d-543e-421f-a683-519a70ad7d03:UI/Lounge/B4 + Center: {X: 0.0, Y: 0.0} + IsTransparent: false + Color: {R: 1.0, G: 1.0, B: 1.0, A: 1.0} + PremultipliedAlpha: false + RenderGroup: Group31 + - Entity: + Id: 5ffd5d72-28b2-451c-8234-6e467b8c4408 + Name: Lounge + Components: + 67789aec2871d4fa2a46912fc57d22ea: !TransformComponent + Id: 0030d37d-1d11-412f-96fa-259e6ed1dbb3 + Position: {X: 0.0, Y: 0.0, Z: 0.0} + Rotation: {X: 0.0, Y: 0.0, Z: 0.0, W: 1.0} + Scale: {X: 1.0, Y: 1.0, Z: 1.0} + Children: {} + b6d58c9210a516b2b6a4867e7791f7ca: !UIComponent + Id: 4fe2fbf1-814c-4e9e-ab01-510c663a68b6 + Page: 52d6bdef-4fc5-4410-84ae-0d1255ed6eba:UI/Lounge/Lounge + Resolution: {X: 1280.0, Y: 720.0, Z: 1000.0} + Size: {X: 1.0, Y: 1.0, Z: 1.0} + e24da279611a0507e19eb84fba01d021: !NEWorld.UI.Lounge.LoungePageControl,NEWorld + Id: 62e06f8e-a490-4fea-a477-3c8278cc489d + - Entity: + Id: 71d6af3f-3d32-400a-9baa-a6110a01b4c1 + Name: B5 + Components: + c4b89a6c5bc51357a47777f95603d8b4: !TransformComponent + Id: 714dc374-b8e4-4aba-953d-a099d20c2977 + Position: {X: 0.0, Y: 2.56, Z: 0.0} + Rotation: {X: 0.707106769, Y: 0.0, Z: 0.0, W: 0.707106769} + Scale: {X: 1.0, Y: 1.0, Z: 1.0} + Children: {} + 073e88f94fc61108ee23124539231acb: !SpriteComponent + Id: 3bbdf0d2-d1d7-4f2a-b5c6-ee9a06da3081 + SpriteProvider: !SpriteFromTexture + Texture: 8903a684-b20f-41cb-8c6f-268c205d80f7:UI/Lounge/B5 + Center: {X: 0.0, Y: 0.0} + IsTransparent: false + Color: {R: 1.0, G: 1.0, B: 1.0, A: 1.0} + PremultipliedAlpha: false + RenderGroup: Group31 + - Entity: + Id: 7387d3f1-632d-41cd-a422-530b11683637 + Name: B0 + Components: + 104de6a212e02e97f63537e242f446f1: !TransformComponent + Id: fdde00a1-8f1b-44a0-9cc9-1322e9009ec1 + Position: {X: 0.0, Y: 0.0, Z: 2.56} + Rotation: {X: -1.0, Y: 7.54979E-08, Z: 4.371139E-08, W: -3.300118E-15} + Scale: {X: 1.0, Y: 1.0, Z: 1.0} + Children: {} + 48b39d2cd5af787d76a9c492ae03c4d9: !SpriteComponent + Id: 10ebfa6f-b61f-4b54-a7f3-c906e861fb19 + SpriteProvider: !SpriteFromTexture + Texture: 1be42123-bc93-48e8-a8a8-37a873ce4c46:UI/Lounge/B0 + Center: {X: 0.0, Y: 0.0} + IsTransparent: false + Color: {R: 1.0, G: 1.0, B: 1.0, A: 1.0} + PremultipliedAlpha: false + RenderGroup: Group31 + - Entity: + Id: 82883be6-fec5-4c00-a158-18de5d6f1131 + Name: Skybox + Components: + 7ef0eade8e7ead19153ecb332382f200: !TransformComponent + Id: 37520511-e9c8-4d8f-942b-402bc3411c71 + Position: {X: 0.0, Y: 0.0, Z: 0.0} + Rotation: {X: 0.0, Y: 0.0, Z: 0.0, W: 1.0} + Scale: {X: 5.0, Y: 5.0, Z: 5.0} + Children: + 28c25dc53c0376bcdb9c19f1f7b9d374: ref!! fdde00a1-8f1b-44a0-9cc9-1322e9009ec1 + 62f4781cbea7842ad05c0945096be7d0: ref!! cf4e9ca6-b8f6-4e58-9878-8d96a3455610 + 423e5e8a85ffd9d4b4636ba91babec83: ref!! d94bd9bf-78f8-49da-9075-e723a3836208 + f15b541c527a24363a898fb4bf23cfa3: ref!! cdefa61d-e8ed-424f-a1bf-47f093e35dee + b155c3b348d865cee49124bed8f533d0: ref!! 3ae26185-12a0-48b9-93d3-6b9ee1f525bf + 2744a5f06a7789748a13092ecba8b382: ref!! 714dc374-b8e4-4aba-953d-a099d20c2977 + bfc4c145b08dc18eff13b1b105ddae74: !NEWorld.UI.Lounge.CubeRotate,NEWorld + Id: 4cf7b247-f693-4fbf-9632-9afe1c6c835c + - Entity: + Id: b743a071-1a3c-4ac5-b6e8-6ade6dc3fe72 + Name: Background + Components: + 861fdc218d00a85b1c6804b69e1b8a0e: !TransformComponent + Id: 4b68c73e-7e37-46c0-a46f-63c1007357a1 + Position: {X: 0.0, Y: 0.0, Z: 0.0} + Rotation: {X: 0.0, Y: 0.0, Z: 0.0, W: 1.0} + Scale: {X: 1.0, Y: 1.0, Z: 1.0} + Children: + eaf3931b3f866f8b1a8d96f4ca126505: ref!! b6aa1026-e98b-40fc-89ed-2c01e3a7d887 + 1cf35907131afe0244928299d23006ca: ref!! 37520511-e9c8-4d8f-942b-402bc3411c71 + ab82a00a704d03250cd8d1b1015f3f98: !BackgroundComponent + Id: a6fa561e-d82f-4c15-bbbc-5f629978c44a + Texture: null + Is2D: true + 0041b55cb38d3afc1e5332d36630c3a1: !NEWorld.UI.Shared.AllowWindowResize,NEWorld + Id: 9879abab-2aa4-4fe0-94dc-0c5033f80e9b + - Entity: + Id: c61a47bb-d594-46b3-9e62-ddd509bd4e6f + Name: B2 + Components: + 35147d528f937233b55144d55468cbad: !TransformComponent + Id: d94bd9bf-78f8-49da-9075-e723a3836208 + Position: {X: 0.0, Y: 0.0, Z: -2.56} + Rotation: {X: 0.0, Y: 0.0, Z: 1.0, W: -4.371139E-08} + Scale: {X: 1.0, Y: 1.0, Z: 1.0} + Children: {} + 6a6d686bec6c687a008425a2b16f97a3: !SpriteComponent + Id: da80fb23-ba31-4f70-aeca-eb3abdf120dd + SpriteProvider: !SpriteFromTexture + Texture: 2d8e1661-07d2-4cf7-b6ff-60d7bca0fe23:UI/Lounge/B2 + Center: {X: 0.0, Y: 0.0} + IsTransparent: false + Color: {R: 1.0, G: 1.0, B: 1.0, A: 1.0} + PremultipliedAlpha: false + RenderGroup: Group31 + - Entity: + Id: dc69d5c8-ca48-47bc-bad4-161b68c8ed40 + Name: B3 + Components: + 30fcd725efb0dd95f61b3088ffec5fb3: !TransformComponent + Id: cdefa61d-e8ed-424f-a1bf-47f093e35dee + Position: {X: 2.56, Y: 0.0, Z: 0.0} + Rotation: {X: 0.707106769, Y: -5.33850759E-08, Z: -0.707106769, W: 5.33850759E-08} + Scale: {X: 1.0, Y: 1.0, Z: 1.0} + Children: {} + 2cfe3c4ff975aa258f61324db495b24f: !SpriteComponent + Id: d8346fd2-9a81-426d-bd5f-c8db06957d7c + SpriteProvider: !SpriteFromTexture + Texture: 0a459a5d-87d9-42df-afb8-8203d3f5cf99:UI/Lounge/B3 + Center: {X: 0.0, Y: 0.0} + IsTransparent: false + Color: {R: 1.0, G: 1.0, B: 1.0, A: 1.0} + PremultipliedAlpha: false + RenderGroup: Group31 + - Entity: + Id: e54dea7a-b44c-47ac-8097-34e8f5d9fa05 + Name: UIRoot + Components: + 4bfebd77530a22f76705857236c1ef85: !TransformComponent + Id: 76f0deae-8db0-44ba-9770-76f84d480fca + Position: {X: 0.0, Y: 0.0, Z: 0.0} + Rotation: {X: 0.0, Y: 0.0, Z: 0.0, W: 1.0} + Scale: {X: 1.0, Y: 1.0, Z: 1.0} + Children: + faab5c89c96bd7eb2bd28e116b65acec: ref!! 0030d37d-1d11-412f-96fa-259e6ed1dbb3 + - Entity: + Id: edb024bf-2664-43a8-857f-13d7e21934cd + Name: Background + Components: + 10fc0d8ab55b1d9db4f50407fa7f22e8: !TransformComponent + Id: b6aa1026-e98b-40fc-89ed-2c01e3a7d887 + Position: {X: 0.0, Y: 0.0, Z: 0.0} + Rotation: {X: 0.0, Y: 0.0, Z: 0.0, W: 1.0} + Scale: {X: 1.0, Y: 1.0, Z: 1.0} + Children: {} + 23097f9a14c099393d426e85f115a174: !CameraComponent + Id: 8c2dd018-b9e2-4f8c-9247-69aa2646bfe1 + Name: null + Projection: Perspective + VerticalFieldOfView: 90.0 + Slot: d890f91d-8bc7-4437-b5e3-cc99e651439c diff --git a/NEWorld/Assets/UI/Lounge/Title.png b/NEWorld/Assets/UI/Lounge/Title.png new file mode 100644 index 0000000..b9ff76f --- /dev/null +++ b/NEWorld/Assets/UI/Lounge/Title.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f11d170bce77a970d21c30ebff75d73df1385f5af124bee0eb9938845b9b43b0 +size 45315 diff --git a/NEWorld/Assets/UI/Lounge/Title.xktex b/NEWorld/Assets/UI/Lounge/Title.xktex new file mode 100644 index 0000000..7be1db9 --- /dev/null +++ b/NEWorld/Assets/UI/Lounge/Title.xktex @@ -0,0 +1,13 @@ +!Texture +Id: 10bec540-1596-4033-8405-f32612102863 +SerializedVersion: {Xenko: 2.0.0.0} +Tags: [] +Source: !file Title.png +Width: 503.0 +Height: 192.0 +IsSizeInPercentage: false +IsCompressed: false +Type: !ColorTextureType + ColorKeyColor: {R: 255, G: 0, B: 255, A: 255} +GenerateMipmaps: false +IsStreamable: false diff --git a/NEWorld/Assets/UI/Shared/Font/SourceHanSansCN-Normal.otf b/NEWorld/Assets/UI/Shared/Font/SourceHanSansCN-Normal.otf new file mode 100644 index 0000000..ad68c10 --- /dev/null +++ b/NEWorld/Assets/UI/Shared/Font/SourceHanSansCN-Normal.otf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:df5ff3ec41c52fa0bf63239e4ac056bdba0f3ef6510c71ebe4dc3b78cbd2370b +size 8344108 diff --git a/NEWorld/Assets/UI/Shared/Font/SourceHanSansCN.xkfnt b/NEWorld/Assets/UI/Shared/Font/SourceHanSansCN.xkfnt new file mode 100644 index 0000000..14dcb10 --- /dev/null +++ b/NEWorld/Assets/UI/Shared/Font/SourceHanSansCN.xkfnt @@ -0,0 +1,7 @@ +!SpriteFont +Id: 27bab064-a488-480c-a01e-fdba7a935849 +SerializedVersion: {Xenko: 2.0.0.0} +Tags: [] +FontSource: !FileFontProvider + Source: !file SourceHanSansCN-Normal.otf +FontType: !RuntimeRasterizedSpriteFontType {} diff --git a/NEWorld/Assets/UI/SplashScreen.png b/NEWorld/Assets/UI/SplashScreen.png new file mode 100644 index 0000000..30e18c9 --- /dev/null +++ b/NEWorld/Assets/UI/SplashScreen.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:669634af8447086e983ce37ec2e6466b5ce0855e3221e1918901da9938382398 +size 293507 diff --git a/NEWorld/Assets/UI/SplashScreen.xktex b/NEWorld/Assets/UI/SplashScreen.xktex new file mode 100644 index 0000000..ec394e9 --- /dev/null +++ b/NEWorld/Assets/UI/SplashScreen.xktex @@ -0,0 +1,10 @@ +!Texture +Id: ceed4cf4-2811-44d9-82dc-3305c17225f5 +SerializedVersion: {Xenko: 2.0.0.0} +Tags: [] +Source: !file SplashScreen.png +IsCompressed: false +Type: !ColorTextureType + ColorKeyColor: {R: 255, G: 0, B: 255, A: 255} +GenerateMipmaps: false +IsStreamable: false diff --git a/NEWorld/Assets/UISlim.xkgfxcomp b/NEWorld/Assets/UISlim.xkgfxcomp new file mode 100644 index 0000000..0ff0749 --- /dev/null +++ b/NEWorld/Assets/UISlim.xkgfxcomp @@ -0,0 +1,109 @@ +!GraphicsCompositorAsset +Id: 6c0e0475-569c-4249-8e38-6c34d2f11b68 +SerializedVersion: {Xenko: 2.1.0.2} +Tags: [] +Archetype: 823a81bf-bac0-4552-9267-aeed499c40df:DefaultGraphicsCompositorLevel10 +Cameras: + de2e75c3b2b23e54162686363f3f138e: + Id: 318a7c1d-a5b5-449f-aa82-fa422cd75f6c + Name: Main + 2a64b79a3e9df82fec7ef05128bf39f7*: + Id: d890f91d-8bc7-4437-b5e3-cc99e651439c + Name: Background +RenderStages: + 47116750c1a5d449b4ad3625f71439b3: + Id: 69a59c95-b0be-459b-9662-55b1894755b4 + Name: Opaque + EffectSlotName: Main + SortMode: !SortModeStateChange {} + 9105a30fee026d4893472b6aee83d035: + Id: 2540811e-5545-4a08-8116-0ef4525fd125 + Name: Transparent + EffectSlotName: Main + SortMode: !BackToFrontSortMode {} + 33d9d311a1a65601da9ef56775477f95: ~(Deleted) + 5a50638f5c514dc490c8c4f57cc88b57: ~(Deleted) + 554e52c061404d4684dd7c4c70f70e0e: ~(Deleted) + bc1a77d2ab254a6e920f86cff65cd75e: ~(Deleted) +RenderFeatures: + 28e9bf54a5adbe063f59fb17acb2723e: !Xenko.Rendering.Sprites.SpriteRenderFeature,Xenko.Engine + RenderStageSelectors: + d74665cff080638a2439c4422e542d85: !Xenko.Rendering.Sprites.SpriteTransparentRenderStageSelector,Xenko.Engine + OpaqueRenderStage: ref!! 69a59c95-b0be-459b-9662-55b1894755b4 + TransparentRenderStage: ref!! 2540811e-5545-4a08-8116-0ef4525fd125 + EffectName: Test + 60780391e205770513fdd53e07279a01: !Xenko.Rendering.Background.BackgroundRenderFeature,Xenko.Engine + RenderStageSelectors: + 11c8b8ccb522e3cd1dd6688016062a6d: !Xenko.Rendering.SimpleGroupToRenderStageSelector,Xenko.Engine + RenderStage: ref!! 69a59c95-b0be-459b-9662-55b1894755b4 + EffectName: Test + 93933ad00d0c357d4915ad462cbfd04c: !Xenko.Rendering.UI.UIRenderFeature,Xenko.UI + RenderStageSelectors: + 14a071694411235038a102ac3794bb4d: !Xenko.Rendering.SimpleGroupToRenderStageSelector,Xenko.Engine + RenderStage: ref!! 2540811e-5545-4a08-8116-0ef4525fd125 + EffectName: Test + d8fb80b0e7995140a46bca8dc36ee8a2: ~(Deleted) + 9013eab3ea0ef6c98bf133b86c173d45: ~(Deleted) +SharedRenderers: + 774702b0618350319ae94ce5dcfaf7ea*: !Xenko.Rendering.Compositing.ForwardRenderer,Xenko.Engine + Id: 5f863492-5f6a-46ea-8997-ecbe640753c7 + Clear: + Id: 87ed17ba-bab6-4b2b-bedc-820c6508fd0a + Color: {R: 0.403921574, G: 0.4117647, B: 0.435294122, A: 1.0} + LightProbes: false + OpaqueRenderStage: ref!! 69a59c95-b0be-459b-9662-55b1894755b4 + TransparentRenderStage: ref!! 2540811e-5545-4a08-8116-0ef4525fd125 + ShadowMapRenderStages: {} + GBufferRenderStage: null + PostEffects: null + LightShafts: null + VRSettings: + Enabled: false + RequiredApis: {} + Overlays: {} + SubsurfaceScatteringBlurEffect: null + MSAALevel: None + MSAAResolver: {} + 03ae15e2132a54572efbc954318c434b*: !Xenko.Rendering.Compositing.ForwardRenderer,Xenko.Engine + Id: 34d3b58d-b10b-4b0f-9cd2-69668d823039 + Clear: + Id: 076c8c28-a521-4126-8522-9419ce54af36 + Color: {R: 0.403921574, G: 0.4117647, B: 0.435294122, A: 1.0} + LightProbes: true + OpaqueRenderStage: ref!! 69a59c95-b0be-459b-9662-55b1894755b4 + TransparentRenderStage: ref!! 2540811e-5545-4a08-8116-0ef4525fd125 + ShadowMapRenderStages: {} + GBufferRenderStage: null + PostEffects: null + LightShafts: null + VRSettings: + Enabled: false + RequiredApis: {} + Overlays: {} + SubsurfaceScatteringBlurEffect: null + MSAALevel: None + MSAAResolver: {} + ee80a20a9bd99f2d70711114e15fe7ca: ~(Deleted) + d5b2e71c088247e21556decdce138d96: ~(Deleted) + 60459475d3a3adaf2d1ba5d99913ca75: ~(Deleted) + 34ecb9b2633eacfc439ba8744fe05102: ~(Deleted) +Game*: !Xenko.Rendering.Compositing.SceneRendererCollection,Xenko.Engine + Id: 4cc59f69-90aa-4174-a9f9-3a0b2f0b56e9 + Children: + 778235f3db0b94cc40a27b486ede6cb8: !Xenko.Rendering.Compositing.RenderTextureSceneRenderer,Xenko.Engine + Id: 6f276f35-1938-44c4-95a8-a417402f3906 + RenderTexture: null + Child: !Xenko.Rendering.Compositing.SceneCameraRenderer,Xenko.Engine + Id: 4169c543-b582-4cea-b7ed-e0ca3c8465b7 + Camera: ref!! d890f91d-8bc7-4437-b5e3-cc99e651439c + Child: !Xenko.Rendering.Compositing.ForwardRenderer,Xenko.Engine ref!! 5f863492-5f6a-46ea-8997-ecbe640753c7 + RenderMask: Group31 + 2316758d8e0aa4e062de7cac0c4e0649: null + 6c526e0b7f6745dce5088b357b949abe: !Xenko.Rendering.Compositing.SceneCameraRenderer,Xenko.Engine + Id: 343df3ea-6588-40c1-9739-b3e6dfbf34d3 + Camera: ref!! 318a7c1d-a5b5-449f-aa82-fa422cd75f6c + Child: !Xenko.Rendering.Compositing.ForwardRenderer,Xenko.Engine ref!! 34d3b58d-b10b-4b0f-9cd2-69668d823039 + RenderMask: Group0, Group1, Group2, Group3, Group4, Group5, Group6, Group7, Group8, Group9, Group10, Group11, Group12, Group13, Group14, Group15, Group16, Group17, Group18, Group19, Group20, Group21, Group22, Group23, Group24, Group25, Group26, Group27, Group28, Group29, Group30 +SingleView*: !Xenko.Rendering.Compositing.ForwardRenderer,Xenko.Engine ref!! 5f863492-5f6a-46ea-8997-ecbe640753c7 +Editor*: !Xenko.Rendering.Compositing.ForwardRenderer,Xenko.Engine ref!! 5f863492-5f6a-46ea-8997-ecbe640753c7 +BlockPositions: {} diff --git a/NEWorld/BasicCameraController.cs b/NEWorld/BasicCameraController.cs index d23834a..cac796f 100644 --- a/NEWorld/BasicCameraController.cs +++ b/NEWorld/BasicCameraController.cs @@ -16,6 +16,7 @@ // You should have received a copy of the GNU Lesser General Public License // along with NEWorld. If not, see . // + using System; using Xenko.Core; using Xenko.Core.Mathematics; diff --git a/NEWorld/Effects/VertexTextureTerrain.cs b/NEWorld/Effects/VertexTextureTerrain.cs index ef0070d..dc36c7b 100644 --- a/NEWorld/Effects/VertexTextureTerrain.cs +++ b/NEWorld/Effects/VertexTextureTerrain.cs @@ -6,15 +6,10 @@ // and re-save the associated .xkfx. // -using System; -using Xenko.Core; -using Xenko.Rendering; using Xenko.Graphics; -using Xenko.Shaders; -using Xenko.Core.Mathematics; -using Buffer = Xenko.Graphics.Buffer; +using Xenko.Rendering; -namespace Xenko.Rendering +namespace NEWorld.Effects { public static partial class VertexTextureTerrainKeys { diff --git a/NEWorld/MainScript.cs b/NEWorld/MainScript.cs index db0f802..fd47f64 100644 --- a/NEWorld/MainScript.cs +++ b/NEWorld/MainScript.cs @@ -16,6 +16,7 @@ // You should have received a copy of the GNU Lesser General Public License // along with NEWorld. If not, see . // + using System; using System.Threading; using System.Threading.Tasks; @@ -24,6 +25,7 @@ using Game.Network; using Game.Terrain; using Game.World; +using NEWorld.Effects; using NEWorld.Renderer; using Xenko.Core.Diagnostics; using Xenko.Core.Mathematics; @@ -97,7 +99,9 @@ public class MainScript : SyncScript // Current world private World currentWorld; public Material Material; + public Material MaterialTransparent; + // Player private Player player; @@ -119,7 +123,8 @@ private void InitializeContext() Context.MaterialTransparent = MaterialTransparent; Context.OperatingScene = Entity.Scene; LogPort.Logger = Log; - Context.RdwContext = new RenderDrawContext(Services, RenderContext.GetShared(Services), Game.GraphicsContext); + Context.RdwContext = + new RenderDrawContext(Services, RenderContext.GetShared(Services), Game.GraphicsContext); Log.ActivateLog(LogMessageType.Debug); EventBus.Broadcast(this, new GameRenderPrepareEvent()); } @@ -185,7 +190,8 @@ private void LoadTextures() Material.Passes[0].Parameters.Set(VertexTextureTerrainKeys.Almg, texture); Material.Passes[0].Parameters.Set(VertexTextureTerrainKeys.TexturePerLine, RdTextures.TexturesPerLine); MaterialTransparent.Passes[0].Parameters.Set(VertexTextureTerrainKeys.Almg, texture); - MaterialTransparent.Passes[0].Parameters.Set(VertexTextureTerrainKeys.TexturePerLine, RdTextures.TexturesPerLine); + MaterialTransparent.Passes[0].Parameters + .Set(VertexTextureTerrainKeys.TexturePerLine, RdTextures.TexturesPerLine); } public override void Start() diff --git a/NEWorld/NEWorld.csproj b/NEWorld/NEWorld.csproj index 9ccc28f..123b9de 100644 --- a/NEWorld/NEWorld.csproj +++ b/NEWorld/NEWorld.csproj @@ -9,10 +9,10 @@ true - - - - + + + + diff --git a/NEWorld/Renderer/RdChunk.cs b/NEWorld/Renderer/RdChunk.cs index 9b00315..803ebeb 100644 --- a/NEWorld/Renderer/RdChunk.cs +++ b/NEWorld/Renderer/RdChunk.cs @@ -16,6 +16,7 @@ // You should have received a copy of the GNU Lesser General Public License // along with NEWorld. If not, see . // + using Game.Terrain; using Game.World; using Xenko.Core.Mathematics; @@ -40,7 +41,8 @@ public class ChunkVboGen */ public ChunkVboGen Generate(Chunk chunk) { - using (VertexBuilder vaOpacity = new VertexBuilder(262144), vaTranslucent = new VertexBuilder(262144)) { + using (VertexBuilder vaOpacity = new VertexBuilder(262144), vaTranslucent = new VertexBuilder(262144)) + { var tmp = new Int3(); var context = new BlockRenderContext(chunk, chunk.GetNeighbors()); for (tmp.X = 0; tmp.X < Chunk.RowSize; ++tmp.X) @@ -54,7 +56,12 @@ public ChunkVboGen Generate(Chunk chunk) var mesh0 = vaOpacity.Dump(); var mesh1 = vaTranslucent.Dump(); - Model = mesh0 != null || mesh1 != null ? new Model {new MaterialInstance(Context.Material), new MaterialInstance(Context.MaterialTransparent)} : null; + Model = mesh0 != null || mesh1 != null + ? new Model + { + new MaterialInstance(Context.Material), new MaterialInstance(Context.MaterialTransparent) + } + : null; if (mesh0 != null) Model.Add(mesh0); if (mesh1 != null) { diff --git a/NEWorld/Renderer/RdTextures.cs b/NEWorld/Renderer/RdTextures.cs index 43a6695..628cf2c 100644 --- a/NEWorld/Renderer/RdTextures.cs +++ b/NEWorld/Renderer/RdTextures.cs @@ -16,12 +16,13 @@ // You should have received a copy of the GNU Lesser General Public License // along with NEWorld. If not, see . // + +using System; using System.Collections.Generic; using Core; using Game.Terrain; -using Xenko.Graphics; -using System; using Xenko.Core.Mathematics; +using Xenko.Graphics; using Xenko.Rendering.Images; namespace NEWorld.Renderer @@ -29,14 +30,16 @@ namespace NEWorld.Renderer [DeclareService("BlockTextures")] public class RdTextures : IBlockTextures { + private static readonly int pixelPerTexture = 32; + private static readonly List Textures = new List(); + + public static int TexturesPerLine { get; private set; } + public uint Add(string assetUri) { var id = (uint) Textures.Count; var texture = Context.Content.Load(assetUri); - if (Context.Content.IsLoaded(assetUri)) - { - Textures.Add(texture); - } + if (Context.Content.IsLoaded(assetUri)) Textures.Add(texture); return id; } @@ -49,7 +52,7 @@ public void GetTexturePos(ref BlockTexCoord pos) public static Texture FlushTextures() { var count = Textures.Count; - TexturesPerLine = (1 << (int)(Math.Ceiling(Math.Log(Math.Ceiling(Math.Sqrt(count))) / Math.Log(2)))); + TexturesPerLine = 1 << (int) Math.Ceiling(Math.Log(Math.Ceiling(Math.Sqrt(count))) / Math.Log(2)); var wid = TexturesPerLine * pixelPerTexture; using (Texture texture = Texture.New2D(Context.GraphicsDevice, wid, wid, PixelFormat.R8G8B8A8_UNorm), result = Texture.New2D(Context.GraphicsDevice, pixelPerTexture, pixelPerTexture, @@ -71,6 +74,7 @@ public static Texture FlushTextures() result, result.GetSubResourceIndex(0, 0), null, texture, texture.GetSubResourceIndex(0, 0), rx, ry); } + return MakeMipmap(texture, (int) Math.Floor(Math.Log(pixelPerTexture) / Math.Log(2)), scaler); } } @@ -98,10 +102,5 @@ private static Texture MakeMipmap(Texture input, int levels, ImageScaler scaler) return ret; } - - public static int TexturesPerLine { get; private set; } - - private static int pixelPerTexture = 32; - private static readonly List Textures = new List(); } } \ No newline at end of file diff --git a/NEWorld/Renderer/RdWorld.cs b/NEWorld/Renderer/RdWorld.cs index bab9767..738c9ee 100644 --- a/NEWorld/Renderer/RdWorld.cs +++ b/NEWorld/Renderer/RdWorld.cs @@ -16,6 +16,7 @@ // You should have received a copy of the GNU Lesser General Public License // along with NEWorld. If not, see . // + using System; using System.Collections.Generic; using System.Linq; @@ -122,7 +123,5 @@ private static bool NeighbourChunkLoadCheck(World world, Int3 pos) return Delta.All(p => world.IsChunkLoaded(pos + p)); } } - - } } \ No newline at end of file diff --git a/NEWorld/Renderer/VertexBuilder.cs b/NEWorld/Renderer/VertexBuilder.cs index a22c640..ed7c82e 100644 --- a/NEWorld/Renderer/VertexBuilder.cs +++ b/NEWorld/Renderer/VertexBuilder.cs @@ -16,6 +16,7 @@ // You should have received a copy of the GNU Lesser General Public License // along with NEWorld. If not, see . // + using System; using System.Runtime.InteropServices; using Game.Terrain; diff --git a/NEWorld/Resources/skybox_texture_ldr.dds b/NEWorld/Resources/skybox_texture_ldr.dds new file mode 100644 index 0000000..c16f3f9 --- /dev/null +++ b/NEWorld/Resources/skybox_texture_ldr.dds @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:47813df48d40460a06a94824094d7c9f0b202555c0d2409a618785bf59d39a6f +size 1573012 diff --git a/NEWorld/UI/Lounge/CubeRotate.cs b/NEWorld/UI/Lounge/CubeRotate.cs new file mode 100644 index 0000000..29c8380 --- /dev/null +++ b/NEWorld/UI/Lounge/CubeRotate.cs @@ -0,0 +1,54 @@ +// +// NEWorld/NEWorld: CubeRotate.cs +// NEWorld: A Free Game with Similar Rules to Minecraft. +// Copyright (C) 2015-2019 NEWorld Team +// +// NEWorld is free software: you can redistribute it and/or modify it +// under the terms of the GNU Lesser General Public License as published +// by the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// NEWorld is distributed in the hope that it will be useful, but WITHOUT +// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY +// or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General +// Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with NEWorld. If not, see . +// + +using System; +using Xenko.Core.Mathematics; +using Xenko.Engine; + +namespace NEWorld.UI.Lounge +{ + public class CubeRotate : SyncScript + { + private TransformComponent skyboxRotation; + private DateTime start; + + public override void Start() + { + start = DateTime.Now; + skyboxRotation = Entity.Get(); + } + + public override void Update() + { + var axisVec = new Vector3(0.1f, 1.0f, 0.1f); + axisVec.Normalize(); + var elapsed = (DateTime.Now - start).TotalSeconds; + var angle = elapsed * 2.0 * Math.PI / 180.0; + var rotationVec = axisVec * (float) Math.Sin(angle); + var rotate = new Quaternion(0.0f) + { + W = (float) Math.Cos(angle), + X = rotationVec.X, + Y = rotationVec.Y, + Z = rotationVec.Z + }; + skyboxRotation.Rotation = rotate; + } + } +} \ No newline at end of file diff --git a/NEWorld/UI/Lounge/LoungePageControl.cs b/NEWorld/UI/Lounge/LoungePageControl.cs new file mode 100644 index 0000000..8436f02 --- /dev/null +++ b/NEWorld/UI/Lounge/LoungePageControl.cs @@ -0,0 +1,41 @@ +// +// NEWorld/NEWorld: LoungePageControl.cs +// NEWorld: A Free Game with Similar Rules to Minecraft. +// Copyright (C) 2015-2019 NEWorld Team +// +// NEWorld is free software: you can redistribute it and/or modify it +// under the terms of the GNU Lesser General Public License as published +// by the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// NEWorld is distributed in the hope that it will be useful, but WITHOUT +// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY +// or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General +// Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with NEWorld. If not, see . +// + +using NEWorld.UI.Shared; +using Xenko.Engine; +using Xenko.UI.Controls; + +namespace NEWorld.UI.Lounge +{ + public class LoungePageControl : UIAutoSize + { + public override void Start() + { + base.Start(); + SetupControlEventListeners(); + } + + private void SetupControlEventListeners() + { + var interactive = Entity.Get().Page.RootElement.FindName("Interactive"); + var exit = (Button) interactive.FindName("Exit"); + exit.Click += (obj, args) => ((Xenko.Engine.Game) Game).Exit(); + } + } +} \ No newline at end of file diff --git a/NEWorld/UI/Shared/AllowWindowResize.cs b/NEWorld/UI/Shared/AllowWindowResize.cs new file mode 100644 index 0000000..66fc102 --- /dev/null +++ b/NEWorld/UI/Shared/AllowWindowResize.cs @@ -0,0 +1,97 @@ +// +// NEWorld/NEWorld: AllowWindowResize.cs +// NEWorld: A Free Game with Similar Rules to Minecraft. +// Copyright (C) 2015-2019 NEWorld Team +// +// NEWorld is free software: you can redistribute it and/or modify it +// under the terms of the GNU Lesser General Public License as published +// by the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// NEWorld is distributed in the hope that it will be useful, but WITHOUT +// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY +// or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General +// Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with NEWorld. If not, see . +// + +using System; +using Xenko.Engine; +using Xenko.Graphics; +using Xenko.Rendering; +using Xenko.Rendering.Images; +using Xenko.Rendering.Compositing; + +namespace NEWorld.UI.Shared +{ + public class AllowWindowResize : SyncScript + { + private class BackgroundRenderer : SceneRendererBase + { + private readonly GaussianBlur effectBlur = new GaussianBlur {Radius = 10}; + private Texture renderTexture; + + public Texture Chain(Texture value) + { + renderTexture?.Dispose(); + renderTexture = Texture.New2D(value.GraphicsDevice, value.Width, value.Height, + value.Format, TextureFlags.RenderTarget | TextureFlags.ShaderResource); + effectBlur.SetInput(value); + effectBlur.SetOutput(renderTexture); + return renderTexture; + } + + protected override void DrawCore(RenderContext context, RenderDrawContext drawContext) + { + using (drawContext.PushRenderTargetsAndRestore()) + { + effectBlur.Draw(drawContext); + } + } + } + + private RenderTextureSceneRenderer render; + private BackgroundRenderer blit; + + public override void Start() + { + var compositor = ((Xenko.Engine.Game)Game).SceneSystem.GraphicsCompositor; + var collection = ((SceneRendererCollection) compositor.Game).Children; + render = (RenderTextureSceneRenderer)collection[0]; + collection[1] = blit = new BackgroundRenderer(); + DoBackgroundBufferResize(); + Game.Window.AllowUserResizing = true; + Game.Window.ClientSizeChanged += BackgroundBufferResize; + } + + public override void Update() + { + } + + public override void Cancel() + { + Game.Window.ClientSizeChanged -= BackgroundBufferResize; + base.Cancel(); + } + + private void BackgroundBufferResize(object obj, EventArgs e) + { + DoBackgroundBufferResize(); + } + + private void DoBackgroundBufferResize() + { + var backBuffer = GraphicsDevice.Presenter.BackBuffer; + var oldStage = render.RenderTexture; + var stage = Texture.New2D( + GraphicsDevice, backBuffer.Width, backBuffer.Height, + PixelFormat.B8G8R8A8_UNorm, TextureFlags.RenderTarget | TextureFlags.ShaderResource + ); + render.RenderTexture = stage; + Entity.Get().Texture = blit.Chain(stage); + oldStage?.Dispose(); + } + } +} \ No newline at end of file diff --git a/NEWorld/UI/Shared/UIAutoSize.cs b/NEWorld/UI/Shared/UIAutoSize.cs new file mode 100644 index 0000000..6f4da33 --- /dev/null +++ b/NEWorld/UI/Shared/UIAutoSize.cs @@ -0,0 +1,50 @@ +// +// NEWorld/NEWorld: UIAutoSize.cs +// NEWorld: A Free Game with Similar Rules to Minecraft. +// Copyright (C) 2015-2019 NEWorld Team +// +// NEWorld is free software: you can redistribute it and/or modify it +// under the terms of the GNU Lesser General Public License as published +// by the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// NEWorld is distributed in the hope that it will be useful, but WITHOUT +// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY +// or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General +// Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with NEWorld. If not, see . +// + +using System; +using Xenko.Core.Mathematics; +using Xenko.Engine; + +namespace NEWorld.UI.Shared +{ + public class UIAutoSize : SyncScript + { + public override void Start() + { + AdjustVirtualResolution(this, EventArgs.Empty); + Game.Window.ClientSizeChanged += AdjustVirtualResolution; + } + + public override void Cancel() + { + Game.Window.ClientSizeChanged -= AdjustVirtualResolution; + } + + private void AdjustVirtualResolution(object sender, EventArgs e) + { + var backBufferSize = new Vector2(GraphicsDevice.Presenter.BackBuffer.Width, + GraphicsDevice.Presenter.BackBuffer.Height); + Entity.Get().Resolution = new Vector3(backBufferSize, 1000); + } + + public override void Update() + { + } + } +} \ No newline at end of file diff --git a/NEWorld/Umbrella.cs b/NEWorld/Umbrella.cs index f3bcda3..ebcd842 100644 --- a/NEWorld/Umbrella.cs +++ b/NEWorld/Umbrella.cs @@ -17,4 +17,6 @@ // along with NEWorld. If not, see . // -[assembly:Core.DeclareNeWorldAssembly] +using Core; + +[assembly: DeclareNeWorldAssembly] \ No newline at end of file diff --git a/NEWorldServer/Program.cs b/NEWorldServer/Program.cs index 7f6600c..6a583f8 100644 --- a/NEWorldServer/Program.cs +++ b/NEWorldServer/Program.cs @@ -18,6 +18,7 @@ // using Core; +using Game; using Game.Network; namespace NEWorldServer @@ -31,10 +32,10 @@ public static void Main(string[] args) var cli = new ServerCommandLine(); var server = Services.Get("Game.Server"); server.Enable(31111); - EventBus.Broadcast(null, new Game.GameLoadEvent()); + EventBus.Broadcast(null, new GameLoadEvent()); server.Run(); cli.Start(); - EventBus.Broadcast(null, new Game.GameUnloadEvent()); + EventBus.Broadcast(null, new GameUnloadEvent()); ApplicationControl.DoShutdown(); } } diff --git a/NEWorldShell/Cli.cs b/NEWorldShell/Cli.cs index 919dcf7..a7ac912 100644 --- a/NEWorldShell/Cli.cs +++ b/NEWorldShell/Cli.cs @@ -16,6 +16,7 @@ // You should have received a copy of the GNU Lesser General Public License // along with NEWorld. If not, see . // + using System; using System.Runtime; using Core; diff --git a/NEWorldShell/Command.cs b/NEWorldShell/Command.cs index 750acbe..f9d225e 100644 --- a/NEWorldShell/Command.cs +++ b/NEWorldShell/Command.cs @@ -16,6 +16,7 @@ // You should have received a copy of the GNU Lesser General Public License // along with NEWorld. If not, see . // + using System; using System.Collections.Generic; using System.Linq; diff --git a/NEWorldShell/Program.cs b/NEWorldShell/Program.cs index 21a662a..23cc50e 100644 --- a/NEWorldShell/Program.cs +++ b/NEWorldShell/Program.cs @@ -16,7 +16,9 @@ // You should have received a copy of the GNU Lesser General Public License // along with NEWorld. If not, see . // + using Core; +using Game; using Game.Network; namespace NEWorldShell @@ -30,10 +32,10 @@ public static void Main(string[] args) var cli = new ServerCommandLine(); var server = Services.Get("Game.Server"); server.Enable(31111); - EventBus.Broadcast(null, new Game.GameLoadEvent()); + EventBus.Broadcast(null, new GameLoadEvent()); server.Run(); cli.Start(); - EventBus.Broadcast(null, new Game.GameUnloadEvent()); + EventBus.Broadcast(null, new GameUnloadEvent()); ApplicationControl.DoShutdown(); } } diff --git a/NEWorldShell/Properties/AssemblyInfo.cs b/NEWorldShell/Properties/AssemblyInfo.cs index 597a823..bb788fc 100644 --- a/NEWorldShell/Properties/AssemblyInfo.cs +++ b/NEWorldShell/Properties/AssemblyInfo.cs @@ -16,6 +16,7 @@ // You should have received a copy of the GNU Lesser General Public License // along with NEWorld. If not, see . // + using System.Reflection; using System.Runtime.InteropServices;