Added sector map in Galaxy tab of in-game menu Added player flag to Ship (replaces AGM.PlayerEntities) Refactored sector map to depend on AGM Moved sector generation to main menu Main menu now supports resuming previous playthrough Database and player settings now statically available via AGM AGM saves current game state in PlayerSettings on exit Sector generation is now asynchronous Added progress callbacks to sector gen + progress dialog in menu Confirmation Dialog / properties panel can now display dynamic text entry Added zone title to Zone map Eliminated ZoneData class (properties moved to ZonePack) Sector, Zone and Entity serialization now fully functional Entity settings now separate from player settings Cleaned up old unused networking message classes Name files now integrated with database cache Added ability to save/load additive DB cache files in database panel Cleaned up Wwise sound setup - removed redundant items & fixed spelling errors Deleted Wwise cache + added to .gitignore
84 lines
1.7 KiB
C#
84 lines
1.7 KiB
C#
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
|
|
|
using System;
|
|
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using LiteNetLib;
|
|
using MessagePack;
|
|
using Unity.Mathematics;
|
|
|
|
[Union(0, typeof(PingMessage)),
|
|
Union(1, typeof(LoginMessage)),
|
|
Union(2, typeof(RegisterMessage)),
|
|
Union(3, typeof(VerifyMessage)),
|
|
Union(4, typeof(ErrorMessage)),
|
|
Union(5, typeof(LoginSuccessMessage)),
|
|
Union(6, typeof(ChatMessage)),
|
|
Union(7, typeof(ChatBroadcastMessage)),
|
|
Union(8, typeof(ChangeNameMessage)),
|
|
MessagePackObject]
|
|
public abstract class Message
|
|
{
|
|
[IgnoreMember] public NetPeer Peer;
|
|
}
|
|
|
|
[MessagePackObject]
|
|
public class PingMessage : Message
|
|
{
|
|
[Key(0)] public float SendTime;
|
|
}
|
|
|
|
|
|
[MessagePackObject]
|
|
public class LoginMessage : Message
|
|
{
|
|
[Key(0)] public string Auth;
|
|
[Key(1)] public byte[] Password;
|
|
}
|
|
|
|
[MessagePackObject]
|
|
public class RegisterMessage : Message
|
|
{
|
|
[Key(0)] public string Name;
|
|
[Key(1)] public string Email;
|
|
[Key(2)] public byte[] Password;
|
|
}
|
|
|
|
[MessagePackObject]
|
|
public class VerifyMessage : Message
|
|
{
|
|
[Key(0)] public Guid Session;
|
|
}
|
|
|
|
[MessagePackObject]
|
|
public class ErrorMessage : Message
|
|
{
|
|
[Key(0)] public string Error;
|
|
}
|
|
|
|
[MessagePackObject]
|
|
public class LoginSuccessMessage : Message
|
|
{
|
|
[Key(0)] public Guid Session;
|
|
}
|
|
|
|
[MessagePackObject]
|
|
public class ChatMessage : Message
|
|
{
|
|
[Key(0)] public string Text;
|
|
}
|
|
|
|
[MessagePackObject]
|
|
public class ChatBroadcastMessage : Message
|
|
{
|
|
[Key(0)] public string User;
|
|
[Key(1)] public string Text;
|
|
}
|
|
|
|
[MessagePackObject]
|
|
public class ChangeNameMessage : Message
|
|
{
|
|
[Key(0)] public string Name;
|
|
}
|