Adds pause menu and runtime manager

fix
Jonathan Miller 4 years ago
parent d30ff618b2
commit 076f927eb2

@ -38,7 +38,7 @@ RenderSettings:
m_ReflectionIntensity: 1
m_CustomReflection: {fileID: 0}
m_Sun: {fileID: 0}
m_IndirectSpecularColor: {r: 0, g: 0, b: 0, a: 1}
m_IndirectSpecularColor: {r: 0.7448639, g: 0.8642147, b: 0.93858135, a: 1}
m_UseRadianceAmbientProbe: 0
--- !u!157 &3
LightmapSettings:
@ -97,7 +97,7 @@ LightmapSettings:
m_ExportTrainingData: 0
m_TrainingDataDestination: TrainingData
m_LightProbeSampleCountMultiplier: 4
m_LightingDataAsset: {fileID: 0}
m_LightingDataAsset: {fileID: 112000002, guid: c6cb34e5884519146896d4352b590609, type: 2}
m_LightingSettings: {fileID: 142336883}
--- !u!196 &4
NavMeshSettings:
@ -135,13 +135,14 @@ GameObject:
- component: {fileID: 118672339}
- component: {fileID: 118672338}
- component: {fileID: 118672337}
- component: {fileID: 118672341}
m_Layer: 0
m_Name: Terrain_0_0-20221016 - 091519
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 0
m_IsActive: 1
--- !u!114 &118672337
MonoBehaviour:
m_ObjectHideFlags: 0
@ -214,6 +215,24 @@ Transform:
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &118672341
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 118672336}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 09f7db018542e6542a55547f3456bbc9, type: 3}
m_Name:
m_EditorClassIdentifier:
TerrainObject: {fileID: 118672336}
TerrainName: Terrain_0_0-20221016 - 091519
TopTerrainName:
LeftTerrainName:
BottomTerrainName:
RightTerrainName:
--- !u!850595691 &142336883
LightingSettings:
m_ObjectHideFlags: 0

@ -59,7 +59,7 @@ MonoBehaviour:
m_impostorLoadRequested: 0
m_impostorUnloadRequested: 0
m_isFoldedOut: 0
m_regularCachedTimestamp: 1666098771680
m_regularCachedTimestamp: 1666113265182
m_impostorCachedTimestamp: 0
m_stitchedWestBorder: 0
m_stitchedEastBorder: 0

@ -23,7 +23,6 @@ MonoBehaviour:
- {fileID: 11400000, guid: a23c1a713f25398419877498413d891f, type: 2}
- {fileID: 11400000, guid: 94567904bf7d1a946a22315e5185e453, type: 2}
m_gaiaManagerSpawnerSettings:
- {fileID: 11400000, guid: c3867a1dc5d61694b9ade5a115ae2658, type: 2}
- {fileID: 11400000, guid: 73049ac12c97b4c4d8547330a2b13c8b, type: 2}
- {fileID: 11400000, guid: 217233c9205c20e489541b22ca7b7868, type: 2}
- {fileID: 11400000, guid: 1c13e8da020868e45a1e6704e198303b, type: 2}

@ -31,9 +31,9 @@ Material:
m_Floats:
- _DetailNoiseScale: 2
- _InvFade: 3
- _PW_VFX_Weather_Intensity: 1
- _PW_VFX_Weather_Intensity: 0
m_Colors:
- _MainColor: {r: 1, g: 1, b: 1, a: 1}
- _MainColor: {r: 1, g: 1, b: 1, a: 0.25831574}
- _TilingAndSpeed: {r: 18.29, g: 2, b: 0, a: 20}
- _TintColor: {r: 0.5, g: 0.5, b: 0.5, a: 0.5}
m_BuildTextureStacks: []

@ -31,6 +31,7 @@ Material:
m_Texture: {fileID: 2800000, guid: cd709d6c8c3e44549bdd784629dffdd1, type: 3}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Ints: []
m_Floats:
- _HorizonFadePower: 3
- _HorizonFadeScale: 1.52

@ -23,6 +23,7 @@ Material:
m_Texture: {fileID: 2800000, guid: 6534180a237278145875359c72d70589, type: 3}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Ints: []
m_Floats:
- _CloudsType: 0
- _InvFade: 3

@ -23,6 +23,7 @@ Material:
m_Texture: {fileID: 2800000, guid: 6534180a237278145875359c72d70589, type: 3}
m_Scale: {x: 2, y: 2}
m_Offset: {x: 0, y: 0}
m_Ints: []
m_Floats:
- _CloudsType: 1
- _InvFade: 3

@ -23,6 +23,7 @@ Material:
m_Texture: {fileID: 2800000, guid: 6534180a237278145875359c72d70589, type: 3}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Ints: []
m_Floats:
- _CloudsType: 0
- _InvFade: 3

@ -23,6 +23,7 @@ Material:
m_Texture: {fileID: 2800000, guid: 3d3ead9180a8662418b3165774e66397, type: 3}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Ints: []
m_Floats:
- _InvFade: 0.01
- _Snow_Speed: 2.83

@ -27,6 +27,7 @@ Material:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Ints: []
m_Floats:
- _Close_Opacity: 0.15
- _Exponent: 4

@ -8,9 +8,8 @@ Material:
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: Rain
m_Shader: {fileID: 4800000, guid: 6e4ae4064600d784cac1e41a9e6f2e59, type: 3}
m_ShaderKeywords: _ALPHATEST_ON _DISABLE_SSR_TRANSPARENT _ENABLE_FOG_ON_TRANSPARENT
_NORMALMAP_TANGENT_SPACE _SURFACE_TYPE_TRANSPARENT
m_Shader: {fileID: 211, guid: 0000000000000000f000000000000000, type: 0}
m_ShaderKeywords: _ALPHABLEND_ON _FADING_ON
m_LightmapFlags: 0
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
@ -24,6 +23,7 @@ Material:
- RayTracingPrepass
- MOTIONVECTORS
- ForwardEmissiveForDeferred
- ALWAYS
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
@ -225,7 +225,7 @@ Material:
- _SpecularAAScreenSpaceVariance: 0.1
- _SpecularAAThreshold: 0.2
- _SpecularOcclusionMode: 1
- _SrcBlend: 1
- _SrcBlend: 5
- _StencilRef: 0
- _StencilRefDepth: 0
- _StencilRefGBuffer: 2

@ -14,7 +14,7 @@ MonoBehaviour:
m_EditorClassIdentifier:
m_multiSceneLightingSupport: 1
m_updateInRealtime: 1
m_selectedLightingProfileValuesIndex: -99
m_selectedLightingProfileValuesIndex: 5
m_renamingProfile: 0
m_editSettings: 1
m_lightingBakeMode: 1

@ -43,8 +43,8 @@ MonoBehaviour:
m_enableAmbientAudio: 0
m_enablePostProcessing: 1
m_enableLocationManager: 0
m_enableLoadingScreen: 1
m_quickBakeLighting: 0
m_enableLoadingScreen: 0
m_quickBakeLighting: 1
m_currentPostFX: 0
m_currentWater: 0
m_enableUnderwaterEffects: 1

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 5538a00eb372b9b4988f472b2d546fa1
guid: 54fb3b5383e1ebc46b5ccdf6d7bc69d0
folderAsset: yes
DefaultImporter:
externalObjects: {}

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 8972d795b9be7454aba89216ddabaeb3
guid: 0ec0eeb51a3abd94b82c5873b540b0a3
folderAsset: yes
DefaultImporter:
externalObjects: {}

@ -0,0 +1,23 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEditor;
using UnityEngine.UIElements;
using UnityEngine.Events;
using System.Collections;
using SiegeSong;
[CustomEditor(typeof(TerrainPlateInstantiator))]
public class TerrainPlateInstantiatorEditor : Editor
{
public override VisualElement CreateInspectorGUI()
{
var inspector = new VisualElement();
var button = new Button();
button.text = "Instantiate!";
button.clicked += ((TerrainPlateInstantiator)this.target).InstantiatePlates;
inspector.Add(button);
return inspector;
}
}

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 5ac32d6274914254cb752473a4924d2b
guid: cbc429d381ee98a4399d87becf26f512
MonoImporter:
externalObjects: {}
serializedVersion: 2

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: ac0e18093de8f5740ad6c0c557f9735f
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

File diff suppressed because it is too large Load Diff

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: c6cb34e5884519146896d4352b590609
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 6475696996188705980
userData:
assetBundleName:
assetBundleVariant:

@ -0,0 +1,98 @@
fileFormatVersion: 2
guid: 607797a60fdea684d869a6e11b7f190d
TextureImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 11
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
vTOnly: 0
ignoreMasterTextureLimit: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 1
seamlessCubemap: 1
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: 2
aniso: 0
mipBias: 0
wrapU: 1
wrapV: 1
wrapW: 1
nPOTScale: 1
lightmap: 0
compressionQuality: 50
spriteMode: 0
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: 0
spriteTessellationDetail: -1
textureType: 0
textureShape: 2
singleChannelComponent: 0
flipbookRows: 1
flipbookColumns: 1
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
ignorePngGamma: 0
applyGammaDecoding: 0
platformSettings:
- serializedVersion: 3
buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 100
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
bones: []
spriteID:
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
nameFileIdTable: {}
spritePackingTag:
pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0
userData:
assetBundleName:
assetBundleVariant:

@ -25,6 +25,13 @@ namespace SiegeSong
public bool UsingStation;
public Station TargetStation;
public bool DriveForward;
public bool DriveBackward;
public bool DriveLeft;
public bool DriveRight;
public bool DriveRotateLeft;
public bool DriveRotateRight;
#region Animation Fields
private string AnimationStaggerField = "Stagger";
@ -70,6 +77,24 @@ namespace SiegeSong
Stats.ExpendStamina(Stats.StaminaRecoveryRate + Stats.SprintCost);
}
}
if (DriveForward)
Run(BaseSpeed / 2.0f);
if (DriveBackward)
Run(-BaseSpeed);
if (DriveLeft)
Strafe(-BaseSpeed);
if (DriveRight)
Strafe(BaseSpeed);
if (DriveRotateLeft)
Rotate(-BaseSpeed);
if (DriveRotateRight)
Rotate(BaseSpeed);
}
public void Stop()
@ -128,16 +153,7 @@ namespace SiegeSong
public void Rotate(float value)
{
if (!UsingStation)
{
Moving = true;
if (Animated)
{
Animator.SetFloat(AnimationHorizontalField, value);
Animator.SetFloat(AnimationMagnitudeField, BaseSpeed);
}
transform.Rotate(-transform.right * value * BaseSpeed * NonAnimatedSpeedMult);
}
RotateToDirection(new Vector3(transform.eulerAngles.x, transform.eulerAngles.y + value, transform.eulerAngles.z));
}
public void RotateToDirection(Vector3 direction, bool onlyHead = true)

@ -12,6 +12,7 @@ namespace SiegeSong
public string[] InstanceIDs;
public int[] ActorIDs;
public RuntimeManager RuntimeManager;
public int LastGeneratedInstanceIndex;

@ -1,18 +0,0 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class HuntFood : MonoBehaviour
{
// Start is called before the first frame update
void Start()
{
}
// Update is called once per frame
void Update()
{
}
}

@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: 03f04e53ab4ee424dbac6e961ddc7556
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

@ -1,18 +0,0 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class MakeTrip : MonoBehaviour
{
// Start is called before the first frame update
void Start()
{
}
// Update is called once per frame
void Update()
{
}
}

@ -1,18 +0,0 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class RestHome : MonoBehaviour
{
// Start is called before the first frame update
void Start()
{
}
// Update is called once per frame
void Update()
{
}
}

@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: bace368cd59c95845bb6df8e5b12ea67
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

@ -1,18 +0,0 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class RestTransient : MonoBehaviour
{
// Start is called before the first frame update
void Start()
{
}
// Update is called once per frame
void Update()
{
}
}

@ -1,18 +0,0 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class RetreiveFood : MonoBehaviour
{
// Start is called before the first frame update
void Start()
{
}
// Update is called once per frame
void Update()
{
}
}

@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: 9e51386b2a8e71745b722465c240b3e8
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

@ -1,18 +0,0 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Work : MonoBehaviour
{
// Start is called before the first frame update
void Start()
{
}
// Update is called once per frame
void Update()
{
}
}

@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: 7746307c975fabe4bb6357c394cee955
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

@ -1,18 +0,0 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class BarKeeper : MonoBehaviour
{
// Start is called before the first frame update
void Start()
{
}
// Update is called once per frame
void Update()
{
}
}

@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: 81dd180d3fa564b4ea7e27ebb4baf541
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

@ -1,18 +0,0 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Bard : MonoBehaviour
{
// Start is called before the first frame update
void Start()
{
}
// Update is called once per frame
void Update()
{
}
}

@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: 7ecf12f5bffb08547851c4d56ea60f4b
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

@ -1,18 +0,0 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class CityGuard : MonoBehaviour
{
// Start is called before the first frame update
void Start()
{
}
// Update is called once per frame
void Update()
{
}
}

@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: 1a3fd1d7bf435084da84be454ed3ac63
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

@ -1,18 +0,0 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Cook : MonoBehaviour
{
// Start is called before the first frame update
void Start()
{
}
// Update is called once per frame
void Update()
{
}
}

@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: d7620741ce18c9b4083b3e7b235ed1e0
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

@ -1,18 +0,0 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Enchanter : MonoBehaviour
{
// Start is called before the first frame update
void Start()
{
}
// Update is called once per frame
void Update()
{
}
}

@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: b22b7e5ed29a0e241ae680691d4e6e09
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

@ -1,18 +0,0 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Entertainer : MonoBehaviour
{
// Start is called before the first frame update
void Start()
{
}
// Update is called once per frame
void Update()
{
}
}

@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: b728c7085da4e4348b2b8d2b835503bc
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

@ -1,18 +0,0 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Farmer : MonoBehaviour
{
// Start is called before the first frame update
void Start()
{
}
// Update is called once per frame
void Update()
{
}
}

@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: 4d9674306f0e43b429bfc47af52b124e
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

@ -1,18 +0,0 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Fisher : MonoBehaviour
{
// Start is called before the first frame update
void Start()
{
}
// Update is called once per frame
void Update()
{
}
}

@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: 8089f6de5e922e84090d5cced8bdab28
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

@ -1,18 +0,0 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Healer : MonoBehaviour
{
// Start is called before the first frame update
void Start()
{
}
// Update is called once per frame
void Update()
{
}
}

@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: 1ccfab8dbea5a6340a83171fd023e211
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

@ -1,18 +0,0 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Hunter : MonoBehaviour
{
// Start is called before the first frame update
void Start()
{
}
// Update is called once per frame
void Update()
{
}
}

@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: b35c9da9e983ca14584c2b6b4c428223
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

@ -1,18 +0,0 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class InnKeeper : MonoBehaviour
{
// Start is called before the first frame update
void Start()
{
}
// Update is called once per frame
void Update()
{
}
}

@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: 161478aba5b63b1409d8a9d82ad14016
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

@ -1,18 +0,0 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Miner : MonoBehaviour
{
// Start is called before the first frame update
void Start()
{
}
// Update is called once per frame
void Update()
{
}
}

@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: 9f49a26a1b7847b4da83fa3c65330086
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

@ -1,18 +0,0 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class PrivateGuard : MonoBehaviour
{
// Start is called before the first frame update
void Start()
{
}
// Update is called once per frame
void Update()
{
}
}

@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: 468bcab5ab13d194795ca165d1d881cb
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

@ -1,18 +0,0 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class ShopKeeper : MonoBehaviour
{
// Start is called before the first frame update
void Start()
{
}
// Update is called once per frame
void Update()
{
}
}

@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: 285816949ca88c04c872083e3b262af6
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

@ -1,18 +0,0 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Smith : MonoBehaviour
{
// Start is called before the first frame update
void Start()
{
}
// Update is called once per frame
void Update()
{
}
}

@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: ee69c11f4e74a5a4fb8cb718382ed360
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

@ -1,18 +0,0 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Tailor : MonoBehaviour
{
// Start is called before the first frame update
void Start()
{
}
// Update is called once per frame
void Update()
{
}
}

@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: 9616e74a439f7934c9d1386d8a166a11
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

@ -12,7 +12,6 @@ namespace SiegeSong
public GameObject Species;
public GameObject Instance;
public InstanceManager InstanceManager;
public PlayerReferencePopulator ReferencePopulator;
public Transform StartLocation;
public GameObject PlayerTracker;
public bool IsPlayer;
@ -374,8 +373,9 @@ namespace SiegeSong
InstanceManager.AddInstance(Instance.GetComponent<ActorStatistics>().InstanceID, Instance);
if (IsPlayer)
{
Instance.GetComponentInChildren<PlayerReferencePopulator>().PopulateReferences();
InstanceManager.CurrentPlayerInstanceID = Instance.GetComponent<ActorStatistics>().InstanceID;
InstanceManager.RuntimeManager.PlayerInstance = Instance;
InstanceManager.RuntimeManager.PopulateReferences();
}
}
}

@ -0,0 +1,142 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using SiegeSong;
using Gaia;
namespace SiegeSong
{
public class RuntimeManager : MonoBehaviour
{
public int MinuteOfHour
{
get
{
var timeOfDayRawValue = GaiaGlobal.GetTimeOfDayMainValue();
var totalMinute = (int)(timeOfDayRawValue * minutesInDay);
var hour = totalMinute / minutesInHour;
var minute = totalMinute - (hour * minutesInHour);
return minute;
}
}
public int HourOfDay
{
get
{
var timeOfDayRawValue = GaiaGlobal.GetTimeOfDayMainValue();
var totalMinute = (int)(timeOfDayRawValue * minutesInDay);
var hour = totalMinute / minutesInHour;
return hour;
}
}
public int DayOfYear;
public int DayOfMonth;
public int DayOfWeek;
public int WeekOfMonth;
public int MonthOfYear;
public int Year;
public GameObject PlayerInstance;
public GaiaScenePlayer GaiaPlayer;
public GameObject FogDataObject;
public FogVolumePriority FogPriority;
public FogVolume FogVolume;
public GaiaGlobal GaiaGlobalSettings;
public Suimono.Core.SuimonoModule WaterModule;
private int minutesInHour = 60;
private int minutesInDay = 1440;
private int daysInYear = 336;
private int monthsInYear = 12;
private int daysInWeek = 7;
private int inLoreBaseYear = 1131;
private int rawMinutes;
private string friendlyTime;
void Start()
{
}
void Update()
{
var newFriendlyTime = "";
var newRawMinutes = (int)(GaiaGlobal.GetTimeOfDayMainValue() * minutesInDay);
if (HourOfDay < 12)
newFriendlyTime = $"{(HourOfDay.ToString().Length == 2 ? HourOfDay : "0" + HourOfDay)}:{(MinuteOfHour.ToString().Length == 2 ? MinuteOfHour : "0" + MinuteOfHour)} AM";
else
newFriendlyTime = $"{((HourOfDay - 12).ToString().Length == 2 ? (HourOfDay - 12) : "0" + (HourOfDay - 12))}:{(MinuteOfHour.ToString().Length == 2 ? MinuteOfHour : "0" + MinuteOfHour)} PM";
if (friendlyTime != newFriendlyTime)
{
Debug.Log(newFriendlyTime);
Debug.Log($"Day - {DayOfYear} / Month - {MonthOfYear + 1} / Week of Month - {WeekOfMonth + 1} / Day of Month - {DayOfMonth}");
}
friendlyTime = newFriendlyTime;
if (rawMinutes > newRawMinutes)
{
if (DayOfYear == daysInYear)
{
Year++;
DayOfYear = 0;
var dayNumber = (DayOfMonth + 1).ToString();
var monthNumber = (MonthOfYear + 1).ToString();
PlayerInstance.GetComponentInChildren<NotificationManager>().Notify($"{(dayNumber.Length == 2 ? dayNumber : "0" + dayNumber)}/{(monthNumber.Length == 2 ? monthNumber : "0" + monthNumber)}/{Year + inLoreBaseYear} - The first day of Year {Year + 1} has begun.");
}
else
{
DayOfYear++;
var dayNumber = (DayOfMonth + 1).ToString();
var monthNumber = (MonthOfYear + 1).ToString();
PlayerInstance.GetComponentInChildren<NotificationManager>().Notify($"{(dayNumber.Length == 2 ? dayNumber : "0" + dayNumber)}/{(monthNumber.Length == 2 ? monthNumber : "0" + monthNumber)}/{Year + inLoreBaseYear} - A new day has begun.");
}
MonthOfYear = DayOfYear / monthsInYear;
DayOfMonth = DayOfYear % monthsInYear;
WeekOfMonth = (DayOfYear % monthsInYear) / daysInWeek;
DayOfWeek = (DayOfYear % monthsInYear) % daysInWeek;
}
rawMinutes = newRawMinutes;
}
public void PopulateReferences()
{
if (FogDataObject != null)
{
FogDataObject.GetComponent<FogVolumeData>().GameCamera = PlayerInstance.GetComponentInChildren<PlayerCameraManager>().ActiveCamera.GetComponentInChildren<Camera>();
}
if (FogPriority != null)
{
FogPriority.GameCamera = PlayerInstance.GetComponentInChildren<PlayerCameraManager>().ActiveCamera.GetComponentInChildren<Camera>();
}
if (FogVolume != null)
{
//FogVolume.FogVolumeData = FogDataObject;
FogVolume.AssignCamera();
}
if (GaiaPlayer != null)
{
GaiaPlayer.transform.parent = PlayerInstance.transform;
GaiaPlayer.transform.position = Vector3.zero;
}
if (WaterModule != null)
{
WaterModule.setTrack = PlayerInstance.transform;
WaterModule.setCamera = PlayerInstance.GetComponentInChildren<PlayerCameraManager>().ActiveCamera.transform.GetChild(0);
WaterModule.mainCamera = PlayerInstance.GetComponentInChildren<PlayerCameraManager>().ActiveCamera.transform.GetChild(0);
WaterModule.manualCamera = PlayerInstance.GetComponentInChildren<PlayerCameraManager>().ActiveCamera.transform.GetChild(0);
}
GaiaGlobalSettings.m_mainCamera = PlayerInstance.GetComponentInChildren<PlayerCameraManager>().ActiveCamera.GetComponentInChildren<Camera>();
}
}
}

@ -11,6 +11,7 @@ namespace SiegeSong
public class CommandConsole : MonoBehaviour
{
public InstanceManager InstanceManager;
public RuntimeManager RuntimeManager;
public GameObject ConsoleWrapper;
public Text ConsoleText;
@ -35,6 +36,7 @@ namespace SiegeSong
string[] commandWords =
{
"kill",
"drive",
"resurrect",
"spawn",
"respawn",
@ -120,7 +122,9 @@ namespace SiegeSong
}
}
var parameter = "";
if (words.Length > 2)
if (words.Length == 2)
parameter = words[1];
else if (words.Length == 3)
parameter = words[2];
foreach (var command in commandWords)
@ -147,6 +151,9 @@ namespace SiegeSong
case "setplayer":
SetActorToPlayer(targetInstanceId);
break;
case "drive":
DriveMotor(targetInstanceId, parameter);
break;
case "tgm":
ToggleActorGodMode(targetInstanceId);
break;
@ -160,9 +167,9 @@ namespace SiegeSong
for (var i = 0; i < MaxConsoleLines - 1; i++)
newConsoleLines[i] = consoleLines[i + 1];
newConsoleLines[MaxConsoleLines - 1] = ConsoleInput;
newConsoleLines[MaxConsoleLines - 1] = validCommand ? ConsoleInput : $"ERROR - '{commandWord}' IS NOT A VALID COMMAND - ( {ConsoleInput} )";
ConsoleInput = validCommand ? "" : "INVALID COMMAND";
ConsoleInput = "";
consoleLines = newConsoleLines;
}
@ -211,6 +218,7 @@ namespace SiegeSong
foreach (Transform childtransform in actor.transform)
if (childtransform.gameObject.name == "PlayerAgent")
childtransform.gameObject.active = true;
RuntimeManager.PlayerInstance = actor;
}
void ToggleActorGodMode(string instaceID)
@ -219,5 +227,31 @@ namespace SiegeSong
}
void DriveMotor(string instaceID, string direction)
{
var actorMotor = InstanceManager.GetInstanceByID(instaceID).GetComponent<ActorMotor>();
switch (direction)
{
case "forward":
actorMotor.DriveForward = !actorMotor.DriveForward;
break;
case "backward":
actorMotor.DriveBackward = !actorMotor.DriveBackward;
break;
case "left":
actorMotor.DriveLeft = !actorMotor.DriveLeft;
break;
case "rotateleft":
actorMotor.DriveRotateLeft = !actorMotor.DriveRotateLeft;
break;
case "right":
actorMotor.DriveRight = !actorMotor.DriveRight;
break;
case "rotateright":
actorMotor.DriveRotateRight = !actorMotor.DriveRotateRight;
break;
}
}
}
}

@ -0,0 +1,137 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
using SiegeSong;
namespace SiegeSong
{
public class GlobalPauseMenu : MonoBehaviour
{
public GameObject PauseMenu;
public GameObject OptionsContainer;
private string pauseGamepadInput = "Start";
private string menuVerticalGamepadInput = "D-Pad Vertical";
private string menuHorizontalGamepadInput = "D-Pad Horizontal";
private string menuConfirmGamepadInput = "A";
private string menuRejectGamepadInput = "B";
private bool oldConfirmState;
private bool oldRejectState;
private float oldVerticalState;
private float oldHorizontalState;
private bool open;
private int selectedIndex;
private Color activeColor = Color.white;
private Color inactiveColor = Color.grey;
private int activeFontSize;
private int inactiveFontSize;
private bool loadingSubmenuOpen;
private bool savingSubmenuOpen;
private bool settingsSubmenuOpen;
void Start()
{
}
void Update()
{
if (!open && Input.GetButton(pauseGamepadInput))
{
open = true;
Time.timeScale = 0.0f;
PauseMenu.active = true;
}
if (open)
{
for (var i = 0; i < OptionsContainer.transform.childCount; i++)
{
var childObject = OptionsContainer.transform.GetChild(i);
childObject.GetComponent<Text>().text = selectedIndex == i ? $"- {childObject.name} -" : childObject.name;
childObject.GetComponent<Text>().color = selectedIndex == i ? activeColor : inactiveColor;
childObject.GetComponent<Text>().fontSize = selectedIndex == i ? activeFontSize : inactiveFontSize;
}
var newConfirmState = Input.GetButton(menuConfirmGamepadInput);
var newRejectState = Input.GetButton(menuRejectGamepadInput);
var newMenuVerticalState = Input.GetAxis(menuVerticalGamepadInput);
var newMenuHorizontalState = Input.GetAxis(menuHorizontalGamepadInput);
if (oldVerticalState == 0 && newMenuVerticalState < 0)
{
if (selectedIndex == OptionsContainer.transform.childCount - 1)
selectedIndex = 0;
else
selectedIndex++;
}
if (oldVerticalState == 0 && newMenuVerticalState > 0)
{
if (selectedIndex == 0)
selectedIndex = OptionsContainer.transform.childCount - 1;
else
selectedIndex--;
}
if (!loadingSubmenuOpen && !savingSubmenuOpen && !settingsSubmenuOpen)
{
if ((!oldConfirmState && newConfirmState) || (oldHorizontalState == 0 && newMenuHorizontalState > 0))
{
switch (selectedIndex)
{
case 0:
ResumeGame();
break;
case 1:
OpenLoadingSubmenu();
break;
case 2:
OpenSavingSubmenu();
break;
case 3:
OpenSettingsSubmenu();
break;
case 4:
ExitGame();
break;
}
}
}
oldConfirmState = newConfirmState;
oldRejectState = newRejectState;
oldHorizontalState = newMenuHorizontalState;
oldVerticalState = newMenuVerticalState;
}
}
void ResumeGame()
{
open = false;
PauseMenu.active = false;
Time.timeScale = 1.0f;
}
void OpenLoadingSubmenu()
{
loadingSubmenuOpen = true;
}
void OpenSavingSubmenu()
{
savingSubmenuOpen = true;
}
void OpenSettingsSubmenu()
{
settingsSubmenuOpen = true;
}
void ExitGame()
{
Application.Quit();
}
}
}

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 96b639045b625ca4dba86f9a047a25bd
guid: 77cf0439936b2fe47b16decc5c93d5da
MonoImporter:
externalObjects: {}
serializedVersion: 2

@ -7,7 +7,7 @@ namespace SiegeSong
{
public class PlayerCameraManager : MonoBehaviour
{
public PlayerReferencePopulator ReferencePopulator;
public RuntimeManager RuntimeManager;
public ActorMotor ActorMotor;
@ -192,7 +192,7 @@ namespace SiegeSong
activeCameraIndex = 0;
break;
}
ReferencePopulator.PopulateReferences();
RuntimeManager.PopulateReferences();
}
}
}

@ -13,6 +13,7 @@ namespace SiegeSong
public ActorMotor ActorMotor;
public PlayerCameraManager CameraManager;
public InventoryManager InventoryManager;
public GlobalPauseMenu GlobalPauseMenu;
public Selector Selector;
public ActorLoader loader;

@ -1,85 +0,0 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using SiegeSong;
using Gaia;
namespace SiegeSong
{
public class PlayerReferencePopulator : MonoBehaviour
{
public GameObject Instance;
public GaiaScenePlayer GaiaPlayer;
public GameObject FogDataObject;
public FogVolumePriority FogPriority;
public FogVolume FogVolume;
public GaiaGlobal GaiaGlobalSettings;
public Suimono.Core.SuimonoModule WaterModule;
void Start()
{
}
void Update()
{
}
public void PopulateReferences()
{
if (FogDataObject != null)
{
FogDataObject.GetComponent<FogVolumeData>().GameCamera = Instance.GetComponentInChildren<PlayerCameraManager>().ActiveCamera.GetComponentInChildren<Camera>();
}
if (FogPriority != null)
{
FogPriority.GameCamera = Instance.GetComponentInChildren<PlayerCameraManager>().ActiveCamera.GetComponentInChildren<Camera>();
}
if (FogVolume != null)
{
//FogVolume.FogVolumeData = FogDataObject;
FogVolume.AssignCamera();
}
if (GaiaPlayer != null)
{
GaiaPlayer.transform.parent = Instance.transform;
GaiaPlayer.transform.position = Vector3.zero;
}
if (WaterModule != null)
{
WaterModule.setTrack = Instance.transform;
WaterModule.setCamera = Instance.GetComponentInChildren<PlayerCameraManager>().ActiveCamera.transform.GetChild(0);
WaterModule.mainCamera = Instance.GetComponentInChildren<PlayerCameraManager>().ActiveCamera.transform.GetChild(0);
WaterModule.manualCamera = Instance.GetComponentInChildren<PlayerCameraManager>().ActiveCamera.transform.GetChild(0);
}
GaiaGlobalSettings.m_mainCamera = Instance.GetComponentInChildren<PlayerCameraManager>().ActiveCamera.GetComponentInChildren<Camera>();
}
}
}
//namespace SiegeSong
//{
// public class ZoneLoader : MonoBehaviour
// {
// public ActorLoader[] ActorLoaders;
// public ObjectLoader[] ObjectLoaders;
// public BuildingLoader[] BuildingLoaders;
// void Start()
// {
// }
// void Update()
// {
// }
// }
//}

Binary file not shown.

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save