Title Screen
Polished UI for the title screen Added login, registration and session management to CultClient Connected title screen to CultClient login and registration
This commit is contained in:
parent
28c06289bf
commit
95947355c2
37 changed files with 4639 additions and 2433 deletions
|
|
@ -10,6 +10,7 @@
|
|||
<e p="Assembly-CSharp.csproj" t="IncludeRecursive" />
|
||||
<e p="Assets" t="Include">
|
||||
<e p="DragHandler.cs" t="Include" />
|
||||
<e p="LoginScreen.cs" t="Include" />
|
||||
<e p="Plugins" t="Include">
|
||||
<e p="AsyncAwaitUtil" t="Include">
|
||||
<e p="Source" t="Include">
|
||||
|
|
@ -56,6 +57,7 @@
|
|||
<e p="GalaxyEditor.cs" t="Include" />
|
||||
<e p="SerializerTestWindow.cs" t="Include" />
|
||||
</e>
|
||||
<e p="FlatButton.cs" t="Include" />
|
||||
<e p="Galaxy.cs" t="Include" />
|
||||
<e p="Icons.cs" t="Include" />
|
||||
<e p="InitialSettings.cs" t="Include" />
|
||||
|
|
@ -657,7 +659,6 @@
|
|||
<e p="Orbit.cs" t="Include" />
|
||||
<e p="PropertiesPanel.cs" t="Include" />
|
||||
<e p="Prototype.cs" t="Include" />
|
||||
<e p="Scr_Log_In.cs" t="Include" />
|
||||
<e p="ServerShared" t="Include">
|
||||
<e p="ActionCollection.cs" t="Include" />
|
||||
<e p="Attributes.cs" t="Include" />
|
||||
|
|
@ -1090,7 +1091,6 @@
|
|||
<e p="ZoneData.cs" t="Include" />
|
||||
<e p="ZoneGenerator.cs" t="Include" />
|
||||
</e>
|
||||
<e p="Switch_state.cs" t="Include" />
|
||||
<e p="TabActivator.cs" t="Include" />
|
||||
<e p="TabButton.cs" t="Include" />
|
||||
<e p="TabGroup.cs" t="Include" />
|
||||
|
|
@ -1100,6 +1100,7 @@
|
|||
<e p="ZoneRenderer.cs" t="Include" />
|
||||
</e>
|
||||
<e p="Shaders" t="Include">
|
||||
<e p="AdditiveUI.shader" t="Include" />
|
||||
<e p="Background.shader" t="Include" />
|
||||
<e p="CubicPulseBrush.shader" t="Include" />
|
||||
<e p="GalaxyMap.shader" t="Include" />
|
||||
|
|
|
|||
|
|
@ -61,8 +61,10 @@
|
|||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Assets\DragHandler.cs" />
|
||||
<Compile Include="Assets\LoginScreen.cs" />
|
||||
<Compile Include="Assets\Scripts\BackgroundRenderer.cs" />
|
||||
<Compile Include="Assets\Scripts\CultClient.cs" />
|
||||
<Compile Include="Assets\Scripts\FlatButton.cs" />
|
||||
<Compile Include="Assets\Scripts\Galaxy.cs" />
|
||||
<Compile Include="Assets\Scripts\Icons.cs" />
|
||||
<Compile Include="Assets\Scripts\InitialSettings.cs" />
|
||||
|
|
@ -388,8 +390,6 @@
|
|||
<Compile Include="Assets\Scripts\Orbit.cs" />
|
||||
<Compile Include="Assets\Scripts\PropertiesPanel.cs" />
|
||||
<Compile Include="Assets\Scripts\Prototype.cs" />
|
||||
<Compile Include="Assets\Scripts\Scr_Log_In.cs" />
|
||||
<Compile Include="Assets\Scripts\Switch_state.cs" />
|
||||
<Compile Include="Assets\Scripts\TabActivator.cs" />
|
||||
<Compile Include="Assets\Scripts\TabButton.cs" />
|
||||
<Compile Include="Assets\Scripts\TabGroup.cs" />
|
||||
|
|
@ -397,6 +397,7 @@
|
|||
<Compile Include="Assets\Scripts\UnityExtensions.cs" />
|
||||
<Compile Include="Assets\Scripts\UnityFormatters.cs" />
|
||||
<Compile Include="Assets\Scripts\ZoneRenderer.cs" />
|
||||
<None Include="Assets\Shaders\AdditiveUI.shader" />
|
||||
<None Include="Assets\Shaders\Background.shader" />
|
||||
<None Include="Assets\TextMesh Pro\Resources\Shaders\TMP_SDF-Surface-Mobile.shader" />
|
||||
<None Include="Assets\TextMesh Pro\Resources\LineBreaking Leading Characters.txt" />
|
||||
|
|
|
|||
58
Assets/LoginScreen.cs
Normal file
58
Assets/LoginScreen.cs
Normal file
|
|
@ -0,0 +1,58 @@
|
|||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using TMPro;
|
||||
using UnityEngine;
|
||||
using UnityEngine.SceneManagement;
|
||||
|
||||
public class LoginScreen : MonoBehaviour
|
||||
{
|
||||
public FlatButton LoginButton;
|
||||
public FlatButton RegisterButton;
|
||||
public TMP_InputField EmailUsername;
|
||||
public TMP_InputField Email;
|
||||
public TMP_InputField Username;
|
||||
public TMP_InputField Password;
|
||||
public TextMeshProUGUI Error;
|
||||
|
||||
private bool _registering;
|
||||
|
||||
void Start()
|
||||
{
|
||||
Error.text = "";
|
||||
LoginButton.CurrentState = FlatButtonState.Selected;
|
||||
CultClient.AddMessageListener<LoginSuccessMessage>(success => SceneManager.LoadScene("Main"));
|
||||
CultClient.AddMessageListener<ErrorMessage>(error => Error.text = error.Error);
|
||||
RegisterButton.OnClick += _ =>
|
||||
{
|
||||
if (_registering)
|
||||
{
|
||||
CultClient.Register(Email.text, Username.text, Password.text);
|
||||
}
|
||||
else
|
||||
{
|
||||
_registering = true;
|
||||
EmailUsername.gameObject.SetActive(false);
|
||||
Email.gameObject.SetActive(true);
|
||||
Username.gameObject.SetActive(true);
|
||||
LoginButton.CurrentState = FlatButtonState.Unselected;
|
||||
RegisterButton.CurrentState = FlatButtonState.Selected;
|
||||
}
|
||||
};
|
||||
LoginButton.OnClick += _ =>
|
||||
{
|
||||
if (_registering)
|
||||
{
|
||||
_registering = false;
|
||||
EmailUsername.gameObject.SetActive(true);
|
||||
Email.gameObject.SetActive(false);
|
||||
Username.gameObject.SetActive(false);
|
||||
LoginButton.CurrentState = FlatButtonState.Selected;
|
||||
RegisterButton.CurrentState = FlatButtonState.Unselected;
|
||||
}
|
||||
else
|
||||
{
|
||||
CultClient.Login(EmailUsername.text, Password.text);
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 2ddfc923291e13a458e7e78f2100c021
|
||||
guid: a16898360275ccb489eef6245639fb56
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
84
Assets/Materials/Additive UI.mat
Normal file
84
Assets/Materials/Additive UI.mat
Normal file
|
|
@ -0,0 +1,84 @@
|
|||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!21 &2100000
|
||||
Material:
|
||||
serializedVersion: 6
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: Additive UI
|
||||
m_Shader: {fileID: 4800000, guid: 213ced40282f2544ba209194ba5b4316, type: 3}
|
||||
m_ShaderKeywords:
|
||||
m_LightmapFlags: 4
|
||||
m_EnableInstancingVariants: 0
|
||||
m_DoubleSidedGI: 0
|
||||
m_CustomRenderQueue: -1
|
||||
stringTagMap: {}
|
||||
disabledShaderPasses: []
|
||||
m_SavedProperties:
|
||||
serializedVersion: 3
|
||||
m_TexEnvs:
|
||||
- _BumpMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DetailAlbedoMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DetailMask:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DetailNormalMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _EmissionMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MainTex:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MetallicGlossMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _OcclusionMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _ParallaxMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
m_Floats:
|
||||
- _BumpScale: 1
|
||||
- _ColorMask: 15
|
||||
- _Cutoff: 0.5
|
||||
- _DetailNormalMapScale: 1
|
||||
- _DstBlend: 0
|
||||
- _GlossMapScale: 1
|
||||
- _Glossiness: 0.5
|
||||
- _GlossyReflections: 1
|
||||
- _Metallic: 0
|
||||
- _Mode: 0
|
||||
- _OcclusionStrength: 1
|
||||
- _Parallax: 0.02
|
||||
- _SmoothnessTextureChannel: 0
|
||||
- _SpecularHighlights: 1
|
||||
- _SrcBlend: 1
|
||||
- _Stencil: 0
|
||||
- _StencilComp: 8
|
||||
- _StencilOp: 0
|
||||
- _StencilReadMask: 255
|
||||
- _StencilWriteMask: 255
|
||||
- _UVSec: 0
|
||||
- _UseUIAlphaClip: 0
|
||||
- _ZWrite: 1
|
||||
m_Colors:
|
||||
- _Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
|
||||
8
Assets/Materials/Additive UI.mat.meta
Normal file
8
Assets/Materials/Additive UI.mat.meta
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 1cb3b89320b91bf4986d2333eebadbbd
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 2100000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
|
|
@ -57,16 +57,16 @@ Material:
|
|||
m_Offset: {x: 0, y: 0}
|
||||
m_Floats:
|
||||
- Distortion: 0.5
|
||||
- Gain: 0.1
|
||||
- Gather: -1
|
||||
- GatherWavelength: 2
|
||||
- Gain: 0.33
|
||||
- Gather: -0.25
|
||||
- GatherWavelength: 1
|
||||
- NoiseAmplitude: 0.5
|
||||
- NoiseFrequency: 0.2
|
||||
- NoiseGain: 0.66
|
||||
- NoiseLacunarity: 2.25
|
||||
- NoiseOffset: 0.5
|
||||
- NoiseLacunarity: 2.75
|
||||
- NoiseOffset: 1
|
||||
- NoisePosition: 0
|
||||
- Parallax: -0.1
|
||||
- Parallax: 0.1
|
||||
- ParallaxLacunarity: 2
|
||||
- ScrollSpeed: 1
|
||||
- Speed: 5
|
||||
|
|
@ -88,9 +88,9 @@ Material:
|
|||
- _UVSec: 0
|
||||
- _ZWrite: 1
|
||||
m_Colors:
|
||||
- ParallaxDirection: {r: 0, g: 0, b: 0, a: 0}
|
||||
- ParallaxDirection: {r: 0.3442049, g: -0.57971084, b: -10, a: 0}
|
||||
- _Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
- _Color1: {r: 0, g: 0.2587719, b: 0.5, a: 1}
|
||||
- _Color2: {r: 0.252, g: 0.057832334, b: 0.0141119985, a: 1}
|
||||
- _Color3: {r: 0.008918005, g: 0.091000006, b: 0.053115997, a: 1}
|
||||
- _Color2: {r: 0.25, g: 0.11145834, b: 0.012500003, a: 1}
|
||||
- _Color3: {r: 0.1, g: 0.099829406, b: 0.010000003, a: 1}
|
||||
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
|
||||
|
|
|
|||
|
|
@ -60,7 +60,7 @@ Material:
|
|||
- _AngleWidth: 0.0001
|
||||
- _BumpScale: 1
|
||||
- _Cutoff: 0.5
|
||||
- _DangerSteepness: 2
|
||||
- _DangerSteepness: 1.5
|
||||
- _DetailNormalMapScale: 1
|
||||
- _DstBlend: 0
|
||||
- _GlossMapScale: 1
|
||||
|
|
@ -81,6 +81,6 @@ Material:
|
|||
- _ZWrite: 1
|
||||
m_Colors:
|
||||
- _AngleColor: {r: 0, g: 0, b: 0, a: 1}
|
||||
- _Color: {r: 0.071093746, g: 0.16406254, b: 0.35, a: 1}
|
||||
- _Color: {r: 0.1507389, g: 0.4522169, b: 0.6, a: 1}
|
||||
- _DangerColor: {r: 1, g: 0.3473333, b: 0.020999968, a: 1}
|
||||
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
|
||||
|
|
|
|||
8
Assets/Plugins/Editor.meta
Normal file
8
Assets/Plugins/Editor.meta
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
fileFormatVersion: 2
|
||||
guid: f76d0e937a209ee42b3e807299a9e7cf
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
138
Assets/Prefabs/Button.prefab
Normal file
138
Assets/Prefabs/Button.prefab
Normal file
|
|
@ -0,0 +1,138 @@
|
|||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!1001 &6209557833066581672
|
||||
PrefabInstance:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 2
|
||||
m_Modification:
|
||||
m_TransformParent: {fileID: 0}
|
||||
m_Modifications:
|
||||
- target: {fileID: 3856099931455214244, guid: b93e36d73a071274d8e9225e077ce92a,
|
||||
type: 3}
|
||||
propertyPath: m_Name
|
||||
value: Button
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4750078953547169287, guid: b93e36d73a071274d8e9225e077ce92a,
|
||||
type: 3}
|
||||
propertyPath: m_fontSize
|
||||
value: 18
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5084245071935710148, guid: b93e36d73a071274d8e9225e077ce92a,
|
||||
type: 3}
|
||||
propertyPath: m_Sprite
|
||||
value:
|
||||
objectReference: {fileID: 21300000, guid: b412943088786454c9bf10b1f7e1e94b,
|
||||
type: 3}
|
||||
- target: {fileID: 5318229203699776728, guid: b93e36d73a071274d8e9225e077ce92a,
|
||||
type: 3}
|
||||
propertyPath: m_LocalPosition.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5318229203699776728, guid: b93e36d73a071274d8e9225e077ce92a,
|
||||
type: 3}
|
||||
propertyPath: m_LocalPosition.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5318229203699776728, guid: b93e36d73a071274d8e9225e077ce92a,
|
||||
type: 3}
|
||||
propertyPath: m_LocalPosition.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5318229203699776728, guid: b93e36d73a071274d8e9225e077ce92a,
|
||||
type: 3}
|
||||
propertyPath: m_LocalRotation.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5318229203699776728, guid: b93e36d73a071274d8e9225e077ce92a,
|
||||
type: 3}
|
||||
propertyPath: m_LocalRotation.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5318229203699776728, guid: b93e36d73a071274d8e9225e077ce92a,
|
||||
type: 3}
|
||||
propertyPath: m_LocalRotation.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5318229203699776728, guid: b93e36d73a071274d8e9225e077ce92a,
|
||||
type: 3}
|
||||
propertyPath: m_LocalRotation.w
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5318229203699776728, guid: b93e36d73a071274d8e9225e077ce92a,
|
||||
type: 3}
|
||||
propertyPath: m_RootOrder
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5318229203699776728, guid: b93e36d73a071274d8e9225e077ce92a,
|
||||
type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5318229203699776728, guid: b93e36d73a071274d8e9225e077ce92a,
|
||||
type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5318229203699776728, guid: b93e36d73a071274d8e9225e077ce92a,
|
||||
type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5318229203699776728, guid: b93e36d73a071274d8e9225e077ce92a,
|
||||
type: 3}
|
||||
propertyPath: m_AnchoredPosition.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5318229203699776728, guid: b93e36d73a071274d8e9225e077ce92a,
|
||||
type: 3}
|
||||
propertyPath: m_AnchoredPosition.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5318229203699776728, guid: b93e36d73a071274d8e9225e077ce92a,
|
||||
type: 3}
|
||||
propertyPath: m_SizeDelta.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5318229203699776728, guid: b93e36d73a071274d8e9225e077ce92a,
|
||||
type: 3}
|
||||
propertyPath: m_SizeDelta.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5318229203699776728, guid: b93e36d73a071274d8e9225e077ce92a,
|
||||
type: 3}
|
||||
propertyPath: m_AnchorMin.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5318229203699776728, guid: b93e36d73a071274d8e9225e077ce92a,
|
||||
type: 3}
|
||||
propertyPath: m_AnchorMin.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5318229203699776728, guid: b93e36d73a071274d8e9225e077ce92a,
|
||||
type: 3}
|
||||
propertyPath: m_AnchorMax.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5318229203699776728, guid: b93e36d73a071274d8e9225e077ce92a,
|
||||
type: 3}
|
||||
propertyPath: m_AnchorMax.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5318229203699776728, guid: b93e36d73a071274d8e9225e077ce92a,
|
||||
type: 3}
|
||||
propertyPath: m_Pivot.x
|
||||
value: 0.5
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5318229203699776728, guid: b93e36d73a071274d8e9225e077ce92a,
|
||||
type: 3}
|
||||
propertyPath: m_Pivot.y
|
||||
value: 0.5
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6620917632164000384, guid: b93e36d73a071274d8e9225e077ce92a,
|
||||
type: 3}
|
||||
propertyPath: m_Sprite
|
||||
value:
|
||||
objectReference: {fileID: 21300000, guid: 84d126f984de5fd42ac66361c00f830c,
|
||||
type: 3}
|
||||
m_RemovedComponents: []
|
||||
m_SourcePrefab: {fileID: 100100000, guid: b93e36d73a071274d8e9225e077ce92a, type: 3}
|
||||
7
Assets/Prefabs/Button.prefab.meta
Normal file
7
Assets/Prefabs/Button.prefab.meta
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 2758dfa2744d7ad4d8877545189d116e
|
||||
PrefabImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
604
Assets/Prefabs/Flat InputField.prefab
Normal file
604
Assets/Prefabs/Flat InputField.prefab
Normal file
|
|
@ -0,0 +1,604 @@
|
|||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!1 &4451361954557856252
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 4451361954557856253}
|
||||
- component: {fileID: 4451361954557856002}
|
||||
m_Layer: 5
|
||||
m_Name: Text Area
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &4451361954557856253
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 4451361954557856252}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children:
|
||||
- {fileID: 4451361955953725104}
|
||||
- {fileID: 4451361956030022757}
|
||||
m_Father: {fileID: 4451361956630297310}
|
||||
m_RootOrder: 1
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 1, y: 1}
|
||||
m_AnchoredPosition: {x: 0, y: -0.5}
|
||||
m_SizeDelta: {x: -20, y: -13}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!114 &4451361954557856002
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 4451361954557856252}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: -146154839, guid: f70555f144d8491a825f0804e09c671c, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
--- !u!1 &4451361955839250590
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 4451361955839250591}
|
||||
- component: {fileID: 4451361955839250589}
|
||||
- component: {fileID: 4451361955839250588}
|
||||
m_Layer: 5
|
||||
m_Name: Outline
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &4451361955839250591
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 4451361955839250590}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children: []
|
||||
m_Father: {fileID: 4451361956630297310}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 1, y: 1}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 0, y: 0}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &4451361955839250589
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 4451361955839250590}
|
||||
m_CullTransparentMesh: 0
|
||||
--- !u!114 &4451361955839250588
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 4451361955839250590}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Material: {fileID: 0}
|
||||
m_Color: {r: 0.8, g: 0.9333333, b: 1, a: 1}
|
||||
m_RaycastTarget: 1
|
||||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_Sprite: {fileID: 21300000, guid: 61501af80fabaac44ace015a55851277, type: 3}
|
||||
m_Type: 1
|
||||
m_PreserveAspect: 0
|
||||
m_FillCenter: 1
|
||||
m_FillMethod: 4
|
||||
m_FillAmount: 1
|
||||
m_FillClockwise: 1
|
||||
m_FillOrigin: 0
|
||||
m_UseSpriteMesh: 0
|
||||
--- !u!1 &4451361955953725107
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 4451361955953725104}
|
||||
- component: {fileID: 4451361955953725110}
|
||||
- component: {fileID: 4451361955953725105}
|
||||
m_Layer: 5
|
||||
m_Name: Placeholder
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &4451361955953725104
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 4451361955953725107}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children: []
|
||||
m_Father: {fileID: 4451361954557856253}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 1, y: 1}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 0, y: 0}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &4451361955953725110
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 4451361955953725107}
|
||||
m_CullTransparentMesh: 0
|
||||
--- !u!114 &4451361955953725105
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 4451361955953725107}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Material: {fileID: 0}
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_RaycastTarget: 1
|
||||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_text: Enter text...
|
||||
m_isRightToLeft: 0
|
||||
m_fontAsset: {fileID: 11400000, guid: 9dcd07b95faae7641a3ff6fccab43c32, type: 2}
|
||||
m_sharedMaterial: {fileID: 21906973755630180, guid: 9dcd07b95faae7641a3ff6fccab43c32,
|
||||
type: 2}
|
||||
m_fontSharedMaterials: []
|
||||
m_fontMaterial: {fileID: 0}
|
||||
m_fontMaterials: []
|
||||
m_fontColor32:
|
||||
serializedVersion: 2
|
||||
rgba: 4255754665
|
||||
m_fontColor: {r: 0.66400003, g: 0.66400003, b: 0.66400003, a: 0.99215686}
|
||||
m_enableVertexGradient: 0
|
||||
m_colorMode: 3
|
||||
m_fontColorGradient:
|
||||
topLeft: {r: 1, g: 1, b: 1, a: 1}
|
||||
topRight: {r: 1, g: 1, b: 1, a: 1}
|
||||
bottomLeft: {r: 1, g: 1, b: 1, a: 1}
|
||||
bottomRight: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_fontColorGradientPreset: {fileID: 0}
|
||||
m_spriteAsset: {fileID: 0}
|
||||
m_tintAllSprites: 0
|
||||
m_overrideHtmlColors: 0
|
||||
m_faceColor:
|
||||
serializedVersion: 2
|
||||
rgba: 4294967295
|
||||
m_outlineColor:
|
||||
serializedVersion: 2
|
||||
rgba: 4278190080
|
||||
m_fontSize: 14
|
||||
m_fontSizeBase: 14
|
||||
m_fontWeight: 400
|
||||
m_enableAutoSizing: 0
|
||||
m_fontSizeMin: 18
|
||||
m_fontSizeMax: 72
|
||||
m_fontStyle: 2
|
||||
m_textAlignment: 257
|
||||
m_characterSpacing: 0
|
||||
m_wordSpacing: 0
|
||||
m_lineSpacing: 0
|
||||
m_lineSpacingMax: 0
|
||||
m_paragraphSpacing: 0
|
||||
m_charWidthMaxAdj: 0
|
||||
m_enableWordWrapping: 0
|
||||
m_wordWrappingRatios: 0.4
|
||||
m_overflowMode: 0
|
||||
m_firstOverflowCharacterIndex: -1
|
||||
m_linkedTextComponent: {fileID: 0}
|
||||
m_isLinkedTextComponent: 0
|
||||
m_isTextTruncated: 0
|
||||
m_enableKerning: 1
|
||||
m_enableExtraPadding: 1
|
||||
checkPaddingRequired: 0
|
||||
m_isRichText: 1
|
||||
m_parseCtrlCharacters: 1
|
||||
m_isOrthographic: 1
|
||||
m_isCullingEnabled: 0
|
||||
m_ignoreRectMaskCulling: 0
|
||||
m_ignoreCulling: 1
|
||||
m_horizontalMapping: 0
|
||||
m_verticalMapping: 0
|
||||
m_uvLineOffset: 0
|
||||
m_geometrySortingOrder: 0
|
||||
m_VertexBufferAutoSizeReduction: 1
|
||||
m_firstVisibleCharacter: 0
|
||||
m_useMaxVisibleDescender: 1
|
||||
m_pageToDisplay: 1
|
||||
m_margin: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_textInfo:
|
||||
textComponent: {fileID: 4451361955953725105}
|
||||
characterCount: 13
|
||||
spriteCount: 0
|
||||
spaceCount: 1
|
||||
wordCount: 2
|
||||
linkCount: 0
|
||||
lineCount: 1
|
||||
pageCount: 1
|
||||
materialCount: 1
|
||||
m_isUsingLegacyAnimationComponent: 0
|
||||
m_isVolumetricText: 0
|
||||
m_spriteAnimator: {fileID: 0}
|
||||
m_hasFontAssetChanged: 0
|
||||
m_subTextObjects:
|
||||
- {fileID: 0}
|
||||
- {fileID: 0}
|
||||
- {fileID: 0}
|
||||
- {fileID: 0}
|
||||
- {fileID: 0}
|
||||
- {fileID: 0}
|
||||
- {fileID: 0}
|
||||
- {fileID: 0}
|
||||
m_baseMaterial: {fileID: 0}
|
||||
m_maskOffset: {x: 0, y: 0, z: 0, w: 0}
|
||||
--- !u!1 &4451361956030022756
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 4451361956030022757}
|
||||
- component: {fileID: 4451361956030022763}
|
||||
- component: {fileID: 4451361956030022762}
|
||||
m_Layer: 5
|
||||
m_Name: Text
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &4451361956030022757
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 4451361956030022756}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children: []
|
||||
m_Father: {fileID: 4451361954557856253}
|
||||
m_RootOrder: 1
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 1, y: 1}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 0, y: 0}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &4451361956030022763
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 4451361956030022756}
|
||||
m_CullTransparentMesh: 0
|
||||
--- !u!114 &4451361956030022762
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 4451361956030022756}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Material: {fileID: 0}
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_RaycastTarget: 1
|
||||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_text: "\u200B"
|
||||
m_isRightToLeft: 0
|
||||
m_fontAsset: {fileID: 11400000, guid: 9dcd07b95faae7641a3ff6fccab43c32, type: 2}
|
||||
m_sharedMaterial: {fileID: 21906973755630180, guid: 9dcd07b95faae7641a3ff6fccab43c32,
|
||||
type: 2}
|
||||
m_fontSharedMaterials: []
|
||||
m_fontMaterial: {fileID: 0}
|
||||
m_fontMaterials: []
|
||||
m_fontColor32:
|
||||
serializedVersion: 2
|
||||
rgba: 4294111986
|
||||
m_fontColor: {r: 0.95, g: 0.95, b: 0.95, a: 1}
|
||||
m_enableVertexGradient: 0
|
||||
m_colorMode: 3
|
||||
m_fontColorGradient:
|
||||
topLeft: {r: 1, g: 1, b: 1, a: 1}
|
||||
topRight: {r: 1, g: 1, b: 1, a: 1}
|
||||
bottomLeft: {r: 1, g: 1, b: 1, a: 1}
|
||||
bottomRight: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_fontColorGradientPreset: {fileID: 0}
|
||||
m_spriteAsset: {fileID: 0}
|
||||
m_tintAllSprites: 0
|
||||
m_overrideHtmlColors: 0
|
||||
m_faceColor:
|
||||
serializedVersion: 2
|
||||
rgba: 4294967295
|
||||
m_outlineColor:
|
||||
serializedVersion: 2
|
||||
rgba: 4278190080
|
||||
m_fontSize: 14
|
||||
m_fontSizeBase: 14
|
||||
m_fontWeight: 400
|
||||
m_enableAutoSizing: 0
|
||||
m_fontSizeMin: 18
|
||||
m_fontSizeMax: 72
|
||||
m_fontStyle: 0
|
||||
m_textAlignment: 257
|
||||
m_characterSpacing: 0
|
||||
m_wordSpacing: 0
|
||||
m_lineSpacing: 0
|
||||
m_lineSpacingMax: 0
|
||||
m_paragraphSpacing: 0
|
||||
m_charWidthMaxAdj: 0
|
||||
m_enableWordWrapping: 0
|
||||
m_wordWrappingRatios: 0.4
|
||||
m_overflowMode: 0
|
||||
m_firstOverflowCharacterIndex: -1
|
||||
m_linkedTextComponent: {fileID: 0}
|
||||
m_isLinkedTextComponent: 0
|
||||
m_isTextTruncated: 0
|
||||
m_enableKerning: 1
|
||||
m_enableExtraPadding: 1
|
||||
checkPaddingRequired: 0
|
||||
m_isRichText: 1
|
||||
m_parseCtrlCharacters: 1
|
||||
m_isOrthographic: 1
|
||||
m_isCullingEnabled: 0
|
||||
m_ignoreRectMaskCulling: 0
|
||||
m_ignoreCulling: 1
|
||||
m_horizontalMapping: 0
|
||||
m_verticalMapping: 0
|
||||
m_uvLineOffset: 0
|
||||
m_geometrySortingOrder: 0
|
||||
m_VertexBufferAutoSizeReduction: 1
|
||||
m_firstVisibleCharacter: 0
|
||||
m_useMaxVisibleDescender: 1
|
||||
m_pageToDisplay: 1
|
||||
m_margin: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_textInfo:
|
||||
textComponent: {fileID: 4451361956030022762}
|
||||
characterCount: 1
|
||||
spriteCount: 0
|
||||
spaceCount: 0
|
||||
wordCount: 1
|
||||
linkCount: 0
|
||||
lineCount: 1
|
||||
pageCount: 1
|
||||
materialCount: 1
|
||||
m_isUsingLegacyAnimationComponent: 0
|
||||
m_isVolumetricText: 0
|
||||
m_spriteAnimator: {fileID: 0}
|
||||
m_hasFontAssetChanged: 0
|
||||
m_subTextObjects:
|
||||
- {fileID: 0}
|
||||
- {fileID: 0}
|
||||
- {fileID: 0}
|
||||
- {fileID: 0}
|
||||
- {fileID: 0}
|
||||
- {fileID: 0}
|
||||
- {fileID: 0}
|
||||
- {fileID: 0}
|
||||
m_baseMaterial: {fileID: 0}
|
||||
m_maskOffset: {x: 0, y: 0, z: 0, w: 0}
|
||||
--- !u!1 &4451361956630297305
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 4451361956630297310}
|
||||
- component: {fileID: 4451361956630297314}
|
||||
- component: {fileID: 4451361956630297309}
|
||||
- component: {fileID: 4451361956630297308}
|
||||
m_Layer: 5
|
||||
m_Name: Flat InputField
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &4451361956630297310
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 4451361956630297305}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children:
|
||||
- {fileID: 4451361955839250591}
|
||||
- {fileID: 4451361954557856253}
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 0, y: 0}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 0, y: 0}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &4451361956630297314
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 4451361956630297305}
|
||||
m_CullTransparentMesh: 0
|
||||
--- !u!114 &4451361956630297309
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 4451361956630297305}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Material: {fileID: 0}
|
||||
m_Color: {r: 0, g: 0.4180913, b: 1, a: 0.15294118}
|
||||
m_RaycastTarget: 1
|
||||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_Sprite: {fileID: 21300000, guid: 7ed12bf887e951949bd02894a21fb3ff, type: 3}
|
||||
m_Type: 1
|
||||
m_PreserveAspect: 0
|
||||
m_FillCenter: 1
|
||||
m_FillMethod: 4
|
||||
m_FillAmount: 1
|
||||
m_FillClockwise: 1
|
||||
m_FillOrigin: 0
|
||||
m_UseSpriteMesh: 0
|
||||
--- !u!114 &4451361956630297308
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 4451361956630297305}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 2da0c512f12947e489f739169773d7ca, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Navigation:
|
||||
m_Mode: 3
|
||||
m_SelectOnUp: {fileID: 0}
|
||||
m_SelectOnDown: {fileID: 0}
|
||||
m_SelectOnLeft: {fileID: 0}
|
||||
m_SelectOnRight: {fileID: 0}
|
||||
m_Transition: 1
|
||||
m_Colors:
|
||||
m_NormalColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
|
||||
m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1}
|
||||
m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608}
|
||||
m_ColorMultiplier: 1
|
||||
m_FadeDuration: 0.1
|
||||
m_SpriteState:
|
||||
m_HighlightedSprite: {fileID: 0}
|
||||
m_PressedSprite: {fileID: 0}
|
||||
m_DisabledSprite: {fileID: 0}
|
||||
m_AnimationTriggers:
|
||||
m_NormalTrigger: Normal
|
||||
m_HighlightedTrigger: Highlighted
|
||||
m_PressedTrigger: Pressed
|
||||
m_DisabledTrigger: Disabled
|
||||
m_Interactable: 1
|
||||
m_TargetGraphic: {fileID: 4451361956630297309}
|
||||
m_TextViewport: {fileID: 4451361954557856253}
|
||||
m_TextComponent: {fileID: 4451361956030022762}
|
||||
m_Placeholder: {fileID: 4451361955953725105}
|
||||
m_VerticalScrollbar: {fileID: 0}
|
||||
m_VerticalScrollbarEventHandler: {fileID: 0}
|
||||
m_ScrollSensitivity: 1
|
||||
m_ContentType: 0
|
||||
m_InputType: 0
|
||||
m_AsteriskChar: 42
|
||||
m_KeyboardType: 0
|
||||
m_LineType: 0
|
||||
m_HideMobileInput: 0
|
||||
m_HideSoftKeyboard: 0
|
||||
m_CharacterValidation: 0
|
||||
m_RegexValue:
|
||||
m_GlobalPointSize: 14
|
||||
m_CharacterLimit: 0
|
||||
m_OnEndEdit:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_OnSubmit:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_OnSelect:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_OnDeselect:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_OnTextSelection:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_OnEndTextSelection:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_OnValueChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_OnTouchScreenKeyboardStatusChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_CaretColor: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1}
|
||||
m_CustomCaretColor: 0
|
||||
m_SelectionColor: {r: 0.65882355, g: 0.80784315, b: 1, a: 0.7529412}
|
||||
m_Text:
|
||||
m_CaretBlinkRate: 0.85
|
||||
m_CaretWidth: 1
|
||||
m_ReadOnly: 0
|
||||
m_RichText: 1
|
||||
m_GlobalFontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
|
||||
m_OnFocusSelectAll: 1
|
||||
m_ResetOnDeActivation: 1
|
||||
m_RestoreOriginalTextOnEscape: 1
|
||||
m_isRichTextEditingAllowed: 0
|
||||
m_LineLimit: 0
|
||||
m_InputValidator: {fileID: 0}
|
||||
7
Assets/Prefabs/Flat InputField.prefab.meta
Normal file
7
Assets/Prefabs/Flat InputField.prefab.meta
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
fileFormatVersion: 2
|
||||
guid: cde91a528214ecc4081092fcad3cc981
|
||||
PrefabImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
|
|
@ -340,8 +340,8 @@ MonoBehaviour:
|
|||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Padding:
|
||||
m_Left: 4
|
||||
m_Right: 4
|
||||
m_Left: 0
|
||||
m_Right: 0
|
||||
m_Top: 0
|
||||
m_Bottom: 0
|
||||
m_ChildAlignment: 4
|
||||
|
|
@ -363,7 +363,6 @@ MonoBehaviour:
|
|||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
StateDamping: 10
|
||||
Tab: {fileID: 0}
|
||||
Fill: {fileID: 6620917632164000384}
|
||||
Outline: {fileID: 5084245071935710148}
|
||||
Label: {fileID: 4750078953547169287}
|
||||
|
|
@ -385,6 +384,7 @@ MonoBehaviour:
|
|||
FillColor: {r: 0, g: 0.4180913, b: 1, a: 0.7490196}
|
||||
OutlineColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
LayoutPadding: 32
|
||||
Tab: {fileID: 0}
|
||||
--- !u!1 &6976631978676041201
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
|
|
|
|||
BIN
Assets/Resources/Sprites/Aetheria Title.png
(Stored with Git LFS)
Normal file
BIN
Assets/Resources/Sprites/Aetheria Title.png
(Stored with Git LFS)
Normal file
Binary file not shown.
110
Assets/Resources/Sprites/Aetheria Title.png.meta
Normal file
110
Assets/Resources/Sprites/Aetheria Title.png.meta
Normal file
|
|
@ -0,0 +1,110 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 493c55e31a35cb84abfc9c1f7fca23b2
|
||||
TextureImporter:
|
||||
fileIDToRecycleName: {}
|
||||
externalObjects: {}
|
||||
serializedVersion: 9
|
||||
mipmaps:
|
||||
mipMapMode: 0
|
||||
enableMipMap: 1
|
||||
sRGBTexture: 1
|
||||
linearTexture: 0
|
||||
fadeOut: 0
|
||||
borderMipMap: 0
|
||||
mipMapsPreserveCoverage: 0
|
||||
alphaTestReferenceValue: 0.5
|
||||
mipMapFadeDistanceStart: 1
|
||||
mipMapFadeDistanceEnd: 3
|
||||
bumpmap:
|
||||
convertToNormalMap: 0
|
||||
externalNormalMap: 0
|
||||
heightScale: 0.25
|
||||
normalMapFilter: 0
|
||||
isReadable: 0
|
||||
streamingMipmaps: 0
|
||||
streamingMipmapsPriority: 0
|
||||
grayScaleToAlpha: 0
|
||||
generateCubemap: 6
|
||||
cubemapConvolution: 0
|
||||
seamlessCubemap: 0
|
||||
textureFormat: 1
|
||||
maxTextureSize: 2048
|
||||
textureSettings:
|
||||
serializedVersion: 2
|
||||
filterMode: -1
|
||||
aniso: -1
|
||||
mipBias: -100
|
||||
wrapU: 1
|
||||
wrapV: 1
|
||||
wrapW: 1
|
||||
nPOTScale: 0
|
||||
lightmap: 0
|
||||
compressionQuality: 50
|
||||
spriteMode: 1
|
||||
spriteExtrude: 1
|
||||
spriteMeshType: 1
|
||||
alignment: 0
|
||||
spritePivot: {x: 0.5, y: 0.5}
|
||||
spritePixelsToUnits: 100
|
||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||
spriteGenerateFallbackPhysicsShape: 1
|
||||
alphaUsage: 1
|
||||
alphaIsTransparency: 1
|
||||
spriteTessellationDetail: -1
|
||||
textureType: 8
|
||||
textureShape: 1
|
||||
singleChannelComponent: 0
|
||||
maxTextureSizeSet: 0
|
||||
compressionQualitySet: 0
|
||||
textureFormatSet: 0
|
||||
platformSettings:
|
||||
- serializedVersion: 2
|
||||
buildTarget: DefaultTexturePlatform
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
- serializedVersion: 2
|
||||
buildTarget: Standalone
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
- serializedVersion: 2
|
||||
buildTarget: WebGL
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
spriteSheet:
|
||||
serializedVersion: 2
|
||||
sprites: []
|
||||
outline: []
|
||||
physicsShape: []
|
||||
bones: []
|
||||
spriteID: 8c02bbc079aca9c45ac239ba7a2e6ae7
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
spritePackingTag:
|
||||
pSDRemoveMatte: 0
|
||||
pSDShowRemoveMatteOption: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
BIN
Assets/Resources/Sprites/Gamecult logo.png
(Stored with Git LFS)
Normal file
BIN
Assets/Resources/Sprites/Gamecult logo.png
(Stored with Git LFS)
Normal file
Binary file not shown.
110
Assets/Resources/Sprites/Gamecult logo.png.meta
Normal file
110
Assets/Resources/Sprites/Gamecult logo.png.meta
Normal file
|
|
@ -0,0 +1,110 @@
|
|||
fileFormatVersion: 2
|
||||
guid: a3111ffffbc60c748932a62f95e5581e
|
||||
TextureImporter:
|
||||
fileIDToRecycleName: {}
|
||||
externalObjects: {}
|
||||
serializedVersion: 9
|
||||
mipmaps:
|
||||
mipMapMode: 0
|
||||
enableMipMap: 1
|
||||
sRGBTexture: 1
|
||||
linearTexture: 0
|
||||
fadeOut: 0
|
||||
borderMipMap: 0
|
||||
mipMapsPreserveCoverage: 0
|
||||
alphaTestReferenceValue: 0.5
|
||||
mipMapFadeDistanceStart: 1
|
||||
mipMapFadeDistanceEnd: 3
|
||||
bumpmap:
|
||||
convertToNormalMap: 0
|
||||
externalNormalMap: 0
|
||||
heightScale: 0.25
|
||||
normalMapFilter: 0
|
||||
isReadable: 0
|
||||
streamingMipmaps: 0
|
||||
streamingMipmapsPriority: 0
|
||||
grayScaleToAlpha: 0
|
||||
generateCubemap: 6
|
||||
cubemapConvolution: 0
|
||||
seamlessCubemap: 0
|
||||
textureFormat: 1
|
||||
maxTextureSize: 2048
|
||||
textureSettings:
|
||||
serializedVersion: 2
|
||||
filterMode: -1
|
||||
aniso: -1
|
||||
mipBias: -100
|
||||
wrapU: 1
|
||||
wrapV: 1
|
||||
wrapW: 1
|
||||
nPOTScale: 0
|
||||
lightmap: 0
|
||||
compressionQuality: 50
|
||||
spriteMode: 1
|
||||
spriteExtrude: 1
|
||||
spriteMeshType: 1
|
||||
alignment: 0
|
||||
spritePivot: {x: 0.5, y: 0.5}
|
||||
spritePixelsToUnits: 100
|
||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||
spriteGenerateFallbackPhysicsShape: 1
|
||||
alphaUsage: 1
|
||||
alphaIsTransparency: 1
|
||||
spriteTessellationDetail: -1
|
||||
textureType: 8
|
||||
textureShape: 1
|
||||
singleChannelComponent: 0
|
||||
maxTextureSizeSet: 0
|
||||
compressionQualitySet: 0
|
||||
textureFormatSet: 0
|
||||
platformSettings:
|
||||
- serializedVersion: 2
|
||||
buildTarget: DefaultTexturePlatform
|
||||
maxTextureSize: 1024
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
- serializedVersion: 2
|
||||
buildTarget: Standalone
|
||||
maxTextureSize: 1024
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
- serializedVersion: 2
|
||||
buildTarget: WebGL
|
||||
maxTextureSize: 1024
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
spriteSheet:
|
||||
serializedVersion: 2
|
||||
sprites: []
|
||||
outline: []
|
||||
physicsShape: []
|
||||
bones: []
|
||||
spriteID: 40ef633a86d22f249901044fc80039c9
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
spritePackingTag:
|
||||
pSDRemoveMatte: 0
|
||||
pSDShowRemoveMatteOption: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
104
Assets/Resources/Ubuntu/Ubuntu-R SDF 3.mat
Normal file
104
Assets/Resources/Ubuntu/Ubuntu-R SDF 3.mat
Normal file
|
|
@ -0,0 +1,104 @@
|
|||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!21 &2100000
|
||||
Material:
|
||||
serializedVersion: 6
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: Ubuntu-R SDF 3
|
||||
m_Shader: {fileID: 4800000, guid: 68e6db2ebdc24f95958faec2be5558d6, type: 3}
|
||||
m_ShaderKeywords: UNDERLAY_ON
|
||||
m_LightmapFlags: 4
|
||||
m_EnableInstancingVariants: 0
|
||||
m_DoubleSidedGI: 0
|
||||
m_CustomRenderQueue: -1
|
||||
stringTagMap: {}
|
||||
disabledShaderPasses: []
|
||||
m_SavedProperties:
|
||||
serializedVersion: 3
|
||||
m_TexEnvs:
|
||||
- _BumpMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _Cube:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _FaceTex:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MainTex:
|
||||
m_Texture: {fileID: 28302366778474376, guid: 9dcd07b95faae7641a3ff6fccab43c32,
|
||||
type: 2}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _OutlineTex:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
m_Floats:
|
||||
- _Ambient: 0.5
|
||||
- _Bevel: 0.5
|
||||
- _BevelClamp: 0
|
||||
- _BevelOffset: 0
|
||||
- _BevelRoundness: 0
|
||||
- _BevelWidth: 0
|
||||
- _BumpFace: 0
|
||||
- _BumpOutline: 0
|
||||
- _ColorMask: 15
|
||||
- _Diffuse: 0.5
|
||||
- _FaceDilate: 0.2
|
||||
- _FaceUVSpeedX: 0
|
||||
- _FaceUVSpeedY: 0
|
||||
- _GlowInner: 0.24
|
||||
- _GlowOffset: -0.2
|
||||
- _GlowOuter: 0
|
||||
- _GlowPower: 1
|
||||
- _GradientScale: 17
|
||||
- _LightAngle: 3.1416
|
||||
- _MaskSoftnessX: 0
|
||||
- _MaskSoftnessY: 0
|
||||
- _OutlineSoftness: 0.108
|
||||
- _OutlineUVSpeedX: 0
|
||||
- _OutlineUVSpeedY: 0
|
||||
- _OutlineWidth: 0.2
|
||||
- _PerspectiveFilter: 0.875
|
||||
- _Reflectivity: 10
|
||||
- _ScaleRatioA: 0.9411765
|
||||
- _ScaleRatioB: 0.5764706
|
||||
- _ScaleRatioC: 0.2882353
|
||||
- _ScaleX: 1
|
||||
- _ScaleY: 1
|
||||
- _ShaderFlags: 0
|
||||
- _Sharpness: 0
|
||||
- _SpecularPower: 2
|
||||
- _Stencil: 0
|
||||
- _StencilComp: 8
|
||||
- _StencilOp: 0
|
||||
- _StencilReadMask: 255
|
||||
- _StencilWriteMask: 255
|
||||
- _TextureHeight: 1024
|
||||
- _TextureWidth: 1024
|
||||
- _UnderlayDilate: 1
|
||||
- _UnderlayOffsetX: 0
|
||||
- _UnderlayOffsetY: 0
|
||||
- _UnderlaySoftness: 1
|
||||
- _VertexOffsetX: 0
|
||||
- _VertexOffsetY: 0
|
||||
- _WeightBold: 0.75
|
||||
- _WeightNormal: 0
|
||||
m_Colors:
|
||||
- _ClipRect: {r: -32767, g: -32767, b: 32767, a: 32767}
|
||||
- _EnvMatrixRotation: {r: 0, g: 0, b: 0, a: 0}
|
||||
- _FaceColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
- _GlowColor: {r: 0, g: 1, b: 0, a: 1}
|
||||
- _MaskCoord: {r: 0, g: 0, b: 32767, a: 32767}
|
||||
- _OutlineColor: {r: 0, g: 0, b: 0, a: 1}
|
||||
- _ReflectFaceColor: {r: 0, g: 0, b: 0, a: 1}
|
||||
- _ReflectOutlineColor: {r: 0, g: 0, b: 0, a: 1}
|
||||
- _SpecularColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
- _UnderlayColor: {r: 0, g: 0, b: 0, a: 1}
|
||||
8
Assets/Resources/Ubuntu/Ubuntu-R SDF 3.mat.meta
Normal file
8
Assets/Resources/Ubuntu/Ubuntu-R SDF 3.mat.meta
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
fileFormatVersion: 2
|
||||
guid: c7fd09c70ae910a41a996e8cbb72d2e8
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 2100000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
|
|
@ -1,6 +1,8 @@
|
|||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Security.Cryptography;
|
||||
using System.Text;
|
||||
using LiteNetLib;
|
||||
using MessagePack;
|
||||
using UniRx;
|
||||
|
|
@ -10,14 +12,30 @@ public static class CultClient {
|
|||
public static Action<string> Logger = s =>
|
||||
MainThreadDispatcher.Post(_=>Debug.Log(s),null);
|
||||
|
||||
public static NetManager Client;
|
||||
public static event Action<string> OnError;
|
||||
public static int Ping;
|
||||
|
||||
private static NetManager _client;
|
||||
private static NetPeer _peer;
|
||||
private static Dictionary<Type, NotAnActionCollection> _messageCallbacks = new Dictionary<Type, NotAnActionCollection>();
|
||||
private static Guid _token;
|
||||
private static MD5 _hasher = MD5.Create();
|
||||
|
||||
public static bool Verified => _token != Guid.Empty;
|
||||
public static bool Connected => _client != null;
|
||||
|
||||
public static void Send<T>(T m) where T : Message
|
||||
{
|
||||
Logger($"Sending message {MessagePackSerializer.SerializeToJson(m as Message)}");
|
||||
_peer.Send(m as Message);
|
||||
if (Connected)
|
||||
{
|
||||
if (Verified || m is LoginMessage || m is RegisterMessage || m is VerifyMessage)
|
||||
{
|
||||
Logger($"Sending message {MessagePackSerializer.SerializeToJson(m as Message)}");
|
||||
_peer.Send(m as Message);
|
||||
}
|
||||
else Logger("Cannot send message, client is not verified!");
|
||||
}
|
||||
else Logger("Cannot send message, client is not connected!");
|
||||
}
|
||||
|
||||
public static void ClearMessageListeners()
|
||||
|
|
@ -32,38 +50,84 @@ public static class CultClient {
|
|||
((ActionCollection<T>)_messageCallbacks[typeof(T)]).Add(callback);
|
||||
}
|
||||
|
||||
public static void Login(string auth, string password)
|
||||
{
|
||||
if (8 < password.Length && password.Length < 32)
|
||||
Send(new LoginMessage
|
||||
{
|
||||
Auth = auth,
|
||||
Password = _hasher.ComputeHash(Encoding.UTF8.GetBytes(password))
|
||||
});
|
||||
else Logger("Invalid Password");
|
||||
}
|
||||
|
||||
public static void Register(string email, string username, string password)
|
||||
{
|
||||
if (8 < password.Length && password.Length < 32)
|
||||
Send(new RegisterMessage
|
||||
{
|
||||
Email = email,
|
||||
Name = username,
|
||||
Password = _hasher.ComputeHash(Encoding.UTF8.GetBytes(password))
|
||||
});
|
||||
else Logger("Invalid Password");
|
||||
}
|
||||
|
||||
public static void Connect(string host = "localhost", int port = 3075)
|
||||
{
|
||||
EventBasedNetListener listener = new EventBasedNetListener();
|
||||
Client = new NetManager(listener)
|
||||
_client = new NetManager(listener)
|
||||
{
|
||||
// UnsyncedEvents = true,
|
||||
// MergeEnabled = true,
|
||||
// NatPunchEnabled = true
|
||||
};
|
||||
Client.Start(3074);
|
||||
_peer = Client.Connect(host, port, "aetheria-cc65a44d");
|
||||
Observable.EveryUpdate().Subscribe(_ => Client.PollEvents());
|
||||
_client.Start(3074);
|
||||
_peer = _client.Connect(host, port, "aetheria-cc65a44d");
|
||||
Observable.EveryUpdate().Subscribe(_ => _client.PollEvents());
|
||||
listener.NetworkErrorEvent += (point, code) => Logger($"{point.Address}: Error {code}");
|
||||
listener.NetworkReceiveEvent += (peer, reader, method) =>
|
||||
{
|
||||
Logger($"Received message: {MessagePackSerializer.ConvertToJson(new ReadOnlyMemory<byte>(reader.RawData))}");
|
||||
var message = MessagePackSerializer.Deserialize<Message>(reader.RawData);
|
||||
var type = message.GetType();
|
||||
|
||||
if (!Verified)
|
||||
{
|
||||
switch (message)
|
||||
{
|
||||
case LoginSuccessMessage loginSuccess:
|
||||
_token = loginSuccess.Session;
|
||||
return;
|
||||
case ErrorMessage error:
|
||||
OnError?.Invoke(error.Error);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if (_messageCallbacks.ContainsKey(type))
|
||||
typeof(ActionCollection<>).MakeGenericType(new[] {type}).GetMethod("Invoke").Invoke(_messageCallbacks[type], new object[] {message});
|
||||
typeof(ActionCollection<>).MakeGenericType(new[] {type}).GetMethod("Invoke")
|
||||
.Invoke(_messageCallbacks[type], new object[] {message});
|
||||
else
|
||||
Logger(
|
||||
$"Received {type.Name} message but no one is listening for it so I'll just leave it here " +
|
||||
$"¯\\_(ツ)_/¯\n{MessagePackSerializer.ConvertToJson(new ReadOnlyMemory<byte>(reader.RawData))}");
|
||||
|
||||
};
|
||||
|
||||
listener.PeerConnectedEvent += peer =>
|
||||
{
|
||||
Logger($"Peer {peer.EndPoint.Address}:{peer.EndPoint.Port} connected.");
|
||||
_peer = peer;
|
||||
// onConnect();
|
||||
};
|
||||
|
||||
listener.PeerDisconnectedEvent += (peer, info) =>
|
||||
{
|
||||
Logger($"Peer {peer.EndPoint.Address}:{peer.EndPoint.Port} disconnected: {info.Reason}.");
|
||||
_peer = null;
|
||||
};
|
||||
// listener.NetworkLatencyUpdateEvent += (peer, latency) => Logger($"Ping received: {latency} ms");
|
||||
|
||||
listener.NetworkLatencyUpdateEvent +=
|
||||
(peer, latency) => Ping = latency; //Logger($"Ping received: {latency} ms");
|
||||
}
|
||||
}
|
||||
|
|
|
|||
102
Assets/Scripts/FlatButton.cs
Normal file
102
Assets/Scripts/FlatButton.cs
Normal file
|
|
@ -0,0 +1,102 @@
|
|||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using TMPro;
|
||||
using UnityEngine;
|
||||
using UnityEngine.EventSystems;
|
||||
using UnityEngine.UI;
|
||||
|
||||
public class FlatButton : MonoBehaviour, IPointerEnterHandler, IPointerExitHandler, IPointerClickHandler
|
||||
{
|
||||
public event Action<FlatButton> OnClick;
|
||||
public float StateDamping;
|
||||
// public RectTransform Tab;
|
||||
public Image Fill;
|
||||
public Image Outline;
|
||||
public TextMeshProUGUI Label;
|
||||
public VerticalLayoutGroup LabelLayout;
|
||||
public FlatButtonState CurrentState = FlatButtonState.Unselected;
|
||||
public bool DisableClickWhenSelected = true;
|
||||
|
||||
public FlatButtonAppearance UnselectedAppearance;
|
||||
public FlatButtonAppearance SelectedAppearance;
|
||||
public FlatButtonAppearance HoverAppearance;
|
||||
public FlatButtonAppearance ClickAppearance;
|
||||
|
||||
private RectOffset _defaultPadding;
|
||||
private float _currentPadding;
|
||||
|
||||
private void Start()
|
||||
{
|
||||
_defaultPadding = LabelLayout.padding;
|
||||
_currentPadding = _defaultPadding.left;
|
||||
}
|
||||
|
||||
public void OnPointerEnter(PointerEventData eventData)
|
||||
{
|
||||
if (CurrentState == FlatButtonState.Unselected)
|
||||
CurrentState = FlatButtonState.Hover;
|
||||
}
|
||||
|
||||
public void OnPointerExit(PointerEventData eventData)
|
||||
{
|
||||
if (CurrentState == FlatButtonState.Hover)
|
||||
CurrentState = FlatButtonState.Unselected;
|
||||
}
|
||||
|
||||
public void OnPointerClick(PointerEventData eventData)
|
||||
{
|
||||
if (!DisableClickWhenSelected || CurrentState != FlatButtonState.Selected)
|
||||
{
|
||||
Fill.color = ClickAppearance.FillColor;
|
||||
Outline.color = ClickAppearance.OutlineColor;
|
||||
OnClick?.Invoke(this);
|
||||
}
|
||||
}
|
||||
|
||||
private void Update()
|
||||
{
|
||||
FlatButtonAppearance appearance;
|
||||
switch (CurrentState)
|
||||
{
|
||||
case FlatButtonState.Unselected:
|
||||
appearance = UnselectedAppearance;
|
||||
break;
|
||||
case FlatButtonState.Selected:
|
||||
appearance = SelectedAppearance;
|
||||
break;
|
||||
case FlatButtonState.Hover:
|
||||
appearance = HoverAppearance;
|
||||
break;
|
||||
default:
|
||||
appearance = new FlatButtonAppearance();
|
||||
break;
|
||||
}
|
||||
|
||||
Fill.color = Color.Lerp(Fill.color, appearance.FillColor, StateDamping * Time.deltaTime);
|
||||
Outline.color = Color.Lerp(Outline.color, appearance.OutlineColor, StateDamping * Time.deltaTime);
|
||||
_currentPadding = Mathf.Lerp(_currentPadding, appearance.LayoutPadding, StateDamping * Time.deltaTime);
|
||||
LabelLayout.padding = new RectOffset
|
||||
{
|
||||
bottom = _defaultPadding.bottom,
|
||||
top = _defaultPadding.top,
|
||||
left = (int) _currentPadding,
|
||||
right = (int) _currentPadding
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
public enum FlatButtonState
|
||||
{
|
||||
Unselected,
|
||||
Selected,
|
||||
Hover
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public struct FlatButtonAppearance
|
||||
{
|
||||
public Color FillColor;
|
||||
public Color OutlineColor;
|
||||
public int LayoutPadding;
|
||||
}
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
fileFormatVersion: 2
|
||||
guid: c062bd8d0dfb2714a8098c6299ac8741
|
||||
guid: 9ec664fdf25c943478e0ca99c935c2fd
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
|
|
@ -1,17 +0,0 @@
|
|||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using UnityEngine.SceneManagement;
|
||||
using UnityEngine.UI;
|
||||
|
||||
|
||||
public class Scr_Log_In : MonoBehaviour
|
||||
{
|
||||
|
||||
public void Change_Scene()
|
||||
{
|
||||
SceneManager.LoadScene("Main");
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -10,6 +10,17 @@ public class NameAttribute : Attribute
|
|||
}
|
||||
}
|
||||
|
||||
[AttributeUsage(AttributeTargets.Class)]
|
||||
public class RethinkTableAttribute : Attribute
|
||||
{
|
||||
public string TableName;
|
||||
|
||||
public RethinkTableAttribute(string tableName)
|
||||
{
|
||||
TableName = tableName;
|
||||
}
|
||||
}
|
||||
|
||||
public class UpdateOrderAttribute : Attribute
|
||||
{
|
||||
public int Order;
|
||||
|
|
|
|||
|
|
@ -45,6 +45,7 @@ public abstract class DatabaseEntry
|
|||
[IgnoreMember] public GameContext Context { get; set; }
|
||||
}
|
||||
|
||||
[RethinkTable("Users")]
|
||||
[MessagePackObject]
|
||||
[JsonObject(MemberSerialization.OptIn)]
|
||||
public class Player : DatabaseEntry, INamedEntry
|
||||
|
|
@ -58,8 +59,8 @@ public class Player : DatabaseEntry, INamedEntry
|
|||
[JsonProperty("username")] [Key(3)]
|
||||
public string Username;
|
||||
|
||||
[JsonProperty("salt")] [Key(4)]
|
||||
public string Salt;
|
||||
[JsonProperty("corporation")] [Key(4)]
|
||||
public Guid Corporation;
|
||||
|
||||
[IgnoreMember] public string EntryName
|
||||
{
|
||||
|
|
@ -68,6 +69,7 @@ public class Player : DatabaseEntry, INamedEntry
|
|||
}
|
||||
}
|
||||
|
||||
[RethinkTable("Galaxy")]
|
||||
[MessagePackObject]
|
||||
[JsonObject(MemberSerialization.OptIn)]
|
||||
public class Corporation : DatabaseEntry, INamedEntry
|
||||
|
|
|
|||
|
|
@ -28,8 +28,8 @@ public class PingMessage : Message
|
|||
[MessagePackObject]
|
||||
public class LoginMessage : Message
|
||||
{
|
||||
[Key(0)] public string Email;
|
||||
[Key(1)] public string Password;
|
||||
[Key(0)] public string Auth;
|
||||
[Key(1)] public byte[] Password;
|
||||
}
|
||||
|
||||
[MessagePackObject]
|
||||
|
|
@ -37,7 +37,7 @@ public class RegisterMessage : Message
|
|||
{
|
||||
[Key(0)] public string Name;
|
||||
[Key(1)] public string Email;
|
||||
[Key(2)] public string Password;
|
||||
[Key(2)] public byte[] Password;
|
||||
}
|
||||
|
||||
[MessagePackObject]
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@ using MessagePack;
|
|||
using Newtonsoft.Json;
|
||||
using Unity.Mathematics;
|
||||
|
||||
[RethinkTable("Galaxy")]
|
||||
[MessagePackObject]
|
||||
[JsonObject(MemberSerialization.OptIn)]
|
||||
public class ZoneData : DatabaseEntry, INamedEntry
|
||||
|
|
@ -34,6 +35,7 @@ public class ZoneData : DatabaseEntry, INamedEntry
|
|||
}
|
||||
}
|
||||
|
||||
[RethinkTable("Galaxy")]
|
||||
[MessagePackObject]
|
||||
[JsonObject(MemberSerialization.OptIn)]
|
||||
public class Station : DatabaseEntry, INamedEntry
|
||||
|
|
@ -57,6 +59,9 @@ public class Station : DatabaseEntry, INamedEntry
|
|||
[JsonProperty("selling")] [Key(6)]
|
||||
public Dictionary<Guid, float> SellPrices = new Dictionary<Guid, float>();
|
||||
|
||||
[JsonProperty("zone")] [Key(7)]
|
||||
public Guid Zone;
|
||||
|
||||
[IgnoreMember] public string EntryName
|
||||
{
|
||||
get => Name;
|
||||
|
|
@ -64,6 +69,7 @@ public class Station : DatabaseEntry, INamedEntry
|
|||
}
|
||||
}
|
||||
|
||||
[RethinkTable("Galaxy")]
|
||||
[MessagePackObject]
|
||||
[JsonObject(MemberSerialization.OptIn)]
|
||||
public class PlanetData : DatabaseEntry, INamedEntry
|
||||
|
|
@ -77,6 +83,9 @@ public class PlanetData : DatabaseEntry, INamedEntry
|
|||
[JsonProperty("mass")] [Key(3)]
|
||||
public float Mass;
|
||||
|
||||
[JsonProperty("zone")] [Key(4)]
|
||||
public Guid Zone;
|
||||
|
||||
[IgnoreMember] public string EntryName
|
||||
{
|
||||
get => Name;
|
||||
|
|
@ -84,6 +93,7 @@ public class PlanetData : DatabaseEntry, INamedEntry
|
|||
}
|
||||
}
|
||||
|
||||
[RethinkTable("Galaxy")]
|
||||
[MessagePackObject]
|
||||
[JsonObject(MemberSerialization.OptIn)]
|
||||
public class OrbitData : DatabaseEntry
|
||||
|
|
@ -99,4 +109,7 @@ public class OrbitData : DatabaseEntry
|
|||
|
||||
[JsonProperty("period")] [Key(4)]
|
||||
public float Period;
|
||||
|
||||
[JsonProperty("zone")] [Key(5)]
|
||||
public Guid Zone;
|
||||
}
|
||||
|
|
@ -1,8 +0,0 @@
|
|||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
public class Switch_state : MonoBehaviour
|
||||
{
|
||||
|
||||
}
|
||||
|
|
@ -6,96 +6,7 @@ using UnityEngine;
|
|||
using UnityEngine.EventSystems;
|
||||
using UnityEngine.UI;
|
||||
|
||||
public class TabButton : MonoBehaviour, IPointerEnterHandler, IPointerExitHandler, IPointerClickHandler
|
||||
public class TabButton : FlatButton
|
||||
{
|
||||
public event Action<TabButton> OnClick;
|
||||
public float StateDamping;
|
||||
public RectTransform Tab;
|
||||
public Image Fill;
|
||||
public Image Outline;
|
||||
public TextMeshProUGUI Label;
|
||||
public VerticalLayoutGroup LabelLayout;
|
||||
public TabButtonState CurrentState = TabButtonState.Unselected;
|
||||
|
||||
public TabButtonAppearance UnselectedAppearance;
|
||||
public TabButtonAppearance SelectedAppearance;
|
||||
public TabButtonAppearance HoverAppearance;
|
||||
public TabButtonAppearance ClickAppearance;
|
||||
|
||||
private RectOffset _defaultPadding;
|
||||
private float _currentPadding;
|
||||
|
||||
private void Start()
|
||||
{
|
||||
_defaultPadding = LabelLayout.padding;
|
||||
_currentPadding = _defaultPadding.left;
|
||||
}
|
||||
|
||||
public void OnPointerEnter(PointerEventData eventData)
|
||||
{
|
||||
if (CurrentState == TabButtonState.Unselected)
|
||||
CurrentState = TabButtonState.Hover;
|
||||
}
|
||||
|
||||
public void OnPointerExit(PointerEventData eventData)
|
||||
{
|
||||
if (CurrentState == TabButtonState.Hover)
|
||||
CurrentState = TabButtonState.Unselected;
|
||||
}
|
||||
|
||||
public void OnPointerClick(PointerEventData eventData)
|
||||
{
|
||||
if (CurrentState != TabButtonState.Selected)
|
||||
{
|
||||
Fill.color = ClickAppearance.FillColor;
|
||||
Outline.color = ClickAppearance.OutlineColor;
|
||||
OnClick?.Invoke(this);
|
||||
}
|
||||
}
|
||||
|
||||
private void Update()
|
||||
{
|
||||
TabButtonAppearance appearance;
|
||||
switch (CurrentState)
|
||||
{
|
||||
case TabButtonState.Unselected:
|
||||
appearance = UnselectedAppearance;
|
||||
break;
|
||||
case TabButtonState.Selected:
|
||||
appearance = SelectedAppearance;
|
||||
break;
|
||||
case TabButtonState.Hover:
|
||||
appearance = HoverAppearance;
|
||||
break;
|
||||
default:
|
||||
appearance = new TabButtonAppearance();
|
||||
break;
|
||||
}
|
||||
|
||||
Fill.color = Color.Lerp(Fill.color, appearance.FillColor, StateDamping * Time.deltaTime);
|
||||
Outline.color = Color.Lerp(Outline.color, appearance.OutlineColor, StateDamping * Time.deltaTime);
|
||||
_currentPadding = Mathf.Lerp(_currentPadding, appearance.LayoutPadding, StateDamping * Time.deltaTime);
|
||||
LabelLayout.padding = new RectOffset
|
||||
{
|
||||
bottom = _defaultPadding.bottom,
|
||||
top = _defaultPadding.top,
|
||||
left = (int) _currentPadding,
|
||||
right = (int) _currentPadding
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
public enum TabButtonState
|
||||
{
|
||||
Unselected,
|
||||
Selected,
|
||||
Hover
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public struct TabButtonAppearance
|
||||
{
|
||||
public Color FillColor;
|
||||
public Color OutlineColor;
|
||||
public int LayoutPadding;
|
||||
}
|
||||
|
|
@ -19,12 +19,12 @@ public class TabGroup : MonoBehaviour
|
|||
{
|
||||
if (_currentButton != null)
|
||||
{
|
||||
_currentButton.CurrentState = TabButtonState.Unselected;
|
||||
_currentButton.CurrentState = FlatButtonState.Unselected;
|
||||
_currentButton.Tab.gameObject.SetActive(false);
|
||||
}
|
||||
|
||||
_currentButton = thisButton;
|
||||
_currentButton.CurrentState = TabButtonState.Selected;
|
||||
_currentButton.CurrentState = FlatButtonState.Selected;
|
||||
_currentButton.Tab.gameObject.SetActive(true);
|
||||
OnTabChange?.Invoke(_currentButton);
|
||||
};
|
||||
|
|
|
|||
122
Assets/Shaders/AdditiveUI.shader
Normal file
122
Assets/Shaders/AdditiveUI.shader
Normal file
|
|
@ -0,0 +1,122 @@
|
|||
// ----------------------------------------------------------------------------
|
||||
// <copyright file="AdditiveUI.shader" company="Unity Technologies / Supyrb">
|
||||
// Unity built-in shader source. Copyright (c) 2016 Unity Technologies. MIT license (see license.txt)
|
||||
// Copyright (c) 2017 Supyrb. All rights reserved.
|
||||
// </copyright>
|
||||
// <author>
|
||||
// Johannes Deml
|
||||
// send@johannesdeml.com
|
||||
// </author>
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
Shader "UI/Additive"
|
||||
{
|
||||
Properties
|
||||
{
|
||||
[PerRendererData] _MainTex ("Sprite Texture", 2D) = "white" {}
|
||||
_Color ("Tint", Color) = (1,1,1,1)
|
||||
|
||||
_StencilComp ("Stencil Comparison", Float) = 8
|
||||
_Stencil ("Stencil ID", Float) = 0
|
||||
_StencilOp ("Stencil Operation", Float) = 0
|
||||
_StencilWriteMask ("Stencil Write Mask", Float) = 255
|
||||
_StencilReadMask ("Stencil Read Mask", Float) = 255
|
||||
|
||||
_ColorMask ("Color Mask", Float) = 15
|
||||
|
||||
[Toggle(UNITY_UI_ALPHACLIP)] _UseUIAlphaClip ("Use Alpha Clip", Float) = 0
|
||||
}
|
||||
|
||||
SubShader
|
||||
{
|
||||
Tags
|
||||
{
|
||||
"Queue"="Transparent"
|
||||
"IgnoreProjector"="True"
|
||||
"RenderType"="Transparent"
|
||||
"PreviewType"="Plane"
|
||||
"CanUseSpriteAtlas"="True"
|
||||
}
|
||||
|
||||
Stencil
|
||||
{
|
||||
Ref [_Stencil]
|
||||
Comp [_StencilComp]
|
||||
Pass [_StencilOp]
|
||||
ReadMask [_StencilReadMask]
|
||||
WriteMask [_StencilWriteMask]
|
||||
}
|
||||
|
||||
Cull Off
|
||||
Lighting Off
|
||||
ZWrite Off
|
||||
ZTest [unity_GUIZTestMode]
|
||||
Blend SrcAlpha One
|
||||
ColorMask [_ColorMask]
|
||||
|
||||
Pass
|
||||
{
|
||||
Name "Default"
|
||||
CGPROGRAM
|
||||
#pragma vertex vert
|
||||
#pragma fragment frag
|
||||
#pragma target 2.0
|
||||
|
||||
#include "UnityCG.cginc"
|
||||
#include "UnityUI.cginc"
|
||||
|
||||
#pragma multi_compile __ UNITY_UI_ALPHACLIP
|
||||
|
||||
struct appdata_t
|
||||
{
|
||||
float4 vertex : POSITION;
|
||||
float4 color : COLOR;
|
||||
float2 texcoord : TEXCOORD0;
|
||||
UNITY_VERTEX_INPUT_INSTANCE_ID
|
||||
};
|
||||
|
||||
struct v2f
|
||||
{
|
||||
float4 vertex : SV_POSITION;
|
||||
fixed4 color : COLOR;
|
||||
float2 texcoord : TEXCOORD0;
|
||||
float4 worldPosition : TEXCOORD1;
|
||||
UNITY_VERTEX_OUTPUT_STEREO
|
||||
};
|
||||
|
||||
fixed4 _Color;
|
||||
fixed4 _TextureSampleAdd;
|
||||
float4 _ClipRect;
|
||||
|
||||
v2f vert(appdata_t IN)
|
||||
{
|
||||
v2f OUT;
|
||||
UNITY_SETUP_INSTANCE_ID(IN);
|
||||
UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(OUT);
|
||||
OUT.worldPosition = IN.vertex;
|
||||
OUT.vertex = UnityObjectToClipPos(OUT.worldPosition);
|
||||
|
||||
OUT.texcoord = IN.texcoord;
|
||||
|
||||
OUT.color = IN.color * _Color;
|
||||
return OUT;
|
||||
}
|
||||
|
||||
sampler2D _MainTex;
|
||||
|
||||
fixed4 frag(v2f IN) : SV_Target
|
||||
{
|
||||
half4 color = (tex2D(_MainTex, IN.texcoord) + _TextureSampleAdd) * IN.color;
|
||||
|
||||
color.a *= UnityGet2DClipping(IN.worldPosition.xy, _ClipRect);
|
||||
|
||||
#ifdef UNITY_UI_ALPHACLIP
|
||||
clip (color.a - 0.001);
|
||||
#endif
|
||||
|
||||
return color;
|
||||
}
|
||||
ENDCG
|
||||
}
|
||||
}
|
||||
}
|
||||
9
Assets/Shaders/AdditiveUI.shader.meta
Normal file
9
Assets/Shaders/AdditiveUI.shader.meta
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 213ced40282f2544ba209194ba5b4316
|
||||
ShaderImporter:
|
||||
externalObjects: {}
|
||||
defaultTextures: []
|
||||
nonModifiableTextures: []
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
|
|
@ -84,7 +84,7 @@
|
|||
|
||||
float planmag = length(plan);
|
||||
|
||||
float dangerblend = smoothstep(0,_DangerSteepness,planmag);
|
||||
float dangerblend = smoothstep(0,_DangerSteepness * 600, planmag * _ScreenParams.y);
|
||||
|
||||
// Loop over isolines, computing a pseudo distance field for a number of height values
|
||||
float spacing = _HeightRange / 20;
|
||||
|
|
@ -102,7 +102,7 @@
|
|||
float2 plan2 = calcGrad(plan2uv, -tex2D(_MainTex, plan2uv).r);
|
||||
float angle2 = atan2(plan2.y,plan2.x) / 3.1415926536 + 1;
|
||||
float angmag = abs(angle-angle2);
|
||||
angmag = min(angmag,0.05);
|
||||
angmag = min(angmag,0.025);
|
||||
//angmag = clamp(angmag,0.005,0.05);
|
||||
|
||||
// Loop over isoangles
|
||||
|
|
|
|||
|
|
@ -22,14 +22,14 @@ using Microsoft.Extensions.Logging;
|
|||
@"@(([0-9a-zA-Z][-\w]*[0-9a-zA-Z]*\.)+[a-zA-Z0-9]{2,17})$";
|
||||
|
||||
private const string UsernamePattern = @"^[A-Za-z0-9]+(?:[ _-][A-Za-z0-9]+)*$";
|
||||
private Dictionary<Type, NotAnActionCollection> _messageCallbacks = new Dictionary<Type, NotAnActionCollection>();
|
||||
private Dictionary<long, User> _users = new Dictionary<long, User>();
|
||||
private Dictionary<Guid, Session> _sessions = new Dictionary<Guid, Session>();
|
||||
private readonly Dictionary<Type, NotAnActionCollection> _messageCallbacks = new Dictionary<Type, NotAnActionCollection>();
|
||||
private readonly Dictionary<long, User> _users = new Dictionary<long, User>();
|
||||
private readonly Dictionary<Guid, Session> _sessions = new Dictionary<Guid, Session>();
|
||||
private List<User> _readyPlayers = new List<User>();
|
||||
public NetManager NetManager;
|
||||
private NetManager _netManager;
|
||||
private Stopwatch _timer;
|
||||
private Random _random = new Random();
|
||||
private DatabaseCache _database;
|
||||
private readonly DatabaseCache _database;
|
||||
private static readonly RandomNumberGenerator Rng = RandomNumberGenerator.Create();
|
||||
|
||||
private float Time => (float)_timer.Elapsed.TotalSeconds;
|
||||
|
|
@ -56,7 +56,7 @@ using Microsoft.Extensions.Logging;
|
|||
|
||||
public void Stop()
|
||||
{
|
||||
NetManager.Stop();
|
||||
_netManager.Stop();
|
||||
}
|
||||
|
||||
public void Start()
|
||||
|
|
@ -65,14 +65,14 @@ using Microsoft.Extensions.Logging;
|
|||
_timer.Start();
|
||||
|
||||
EventBasedNetListener listener = new EventBasedNetListener();
|
||||
NetManager = new NetManager(listener)
|
||||
_netManager = new NetManager(listener)
|
||||
{
|
||||
// UnsyncedEvents = true,
|
||||
// MergeEnabled = true,
|
||||
// NatPunchEnabled = true,
|
||||
// DiscoveryEnabled = true
|
||||
};
|
||||
NetManager.Start(3075);
|
||||
_netManager.Start(3075);
|
||||
|
||||
listener.NetworkErrorEvent += (point, code) => Logger.Log(LogLevel.Debug, $"{point.Address}: Error {code}");
|
||||
|
||||
|
|
@ -123,9 +123,6 @@ using Microsoft.Extensions.Logging;
|
|||
case RegisterMessage register when !IsValidEmail(register.Email):
|
||||
peer.Send(new ErrorMessage {Error = "Email Invalid"});
|
||||
return;
|
||||
case RegisterMessage register when 8 < register.Password.Length && register.Password.Length < 32:
|
||||
peer.Send(new ErrorMessage {Error = "Password Invalid"});
|
||||
return;
|
||||
case RegisterMessage register:
|
||||
{
|
||||
peer.Send(new LoginSuccessMessage {Session = Guid.NewGuid()});
|
||||
|
|
@ -136,7 +133,7 @@ using Microsoft.Extensions.Logging;
|
|||
{
|
||||
ID = guid,
|
||||
Email = register.Email,
|
||||
Password = Argon2.Hash(register.Password),
|
||||
Password = Argon2.Hash(register.Password, null, memoryCost: 16384),
|
||||
Username = register.Name
|
||||
};
|
||||
_database.Add(newUserData);
|
||||
|
|
@ -151,18 +148,17 @@ using Microsoft.Extensions.Logging;
|
|||
return;
|
||||
case LoginMessage login:
|
||||
{
|
||||
var auth = login.Email;
|
||||
|
||||
var pass = login.Password;
|
||||
var userData = _database.GetAll<Player>().FirstOrDefault(x => x.Email == auth);
|
||||
var isEmail = IsValidEmail(login.Auth);
|
||||
var userData = _database.GetAll<Player>().FirstOrDefault(x =>
|
||||
(isEmail ? x.Email : x.Username) == login.Auth);
|
||||
|
||||
if (userData == null)
|
||||
{
|
||||
peer.Send(new ErrorMessage {Error = "Email Not Found"});
|
||||
peer.Send(new ErrorMessage {Error = isEmail ? "Email Not Found" : "Username Not Found"});
|
||||
return;
|
||||
}
|
||||
|
||||
if (!Argon2.Verify(userData.Password, pass))
|
||||
if (!Argon2.Verify(userData.Password, login.Password))
|
||||
{
|
||||
peer.Send(new ErrorMessage {Error = "Password Wrong"});
|
||||
return;
|
||||
|
|
|
|||
Loading…
Reference in a new issue