diff --git a/Assets/Audio.meta b/Assets/Audio.meta new file mode 100644 index 0000000..1dff994 --- /dev/null +++ b/Assets/Audio.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 018b5887d0b4f634795e7c4a9f79c40e +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Audio/Happy Thoughts.mp3 b/Assets/Audio/Happy Thoughts.mp3 new file mode 100644 index 0000000..2f354d5 --- /dev/null +++ b/Assets/Audio/Happy Thoughts.mp3 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e18a4e451560e160f22c10cc76647c8de528733ad24cbf531d7e10c3bbc481a8 +size 1889187 diff --git a/Assets/Audio/Happy Thoughts.mp3.meta b/Assets/Audio/Happy Thoughts.mp3.meta new file mode 100644 index 0000000..6cb9b0a --- /dev/null +++ b/Assets/Audio/Happy Thoughts.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: c894a32c809dded47a635c915577297a +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Data/Logic Blocks/Hook Shot.asset b/Assets/Data/Logic Blocks/Hook Shot.asset index 41ab19a..79dd2b6 100644 --- a/Assets/Data/Logic Blocks/Hook Shot.asset +++ b/Assets/Data/Logic Blocks/Hook Shot.asset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:7c821221422a38d2cdeb8bf229b81065c7ebc7101c7198520d2866415f42892a -size 623 +oid sha256:219e0d780b88bba660e8576f4e8ae64c0882f7f27d88c1f2e6b9e95a60294f90 +size 588 diff --git a/Assets/Data/Logic Blocks/Hook.asset b/Assets/Data/Logic Blocks/Hook.asset index fc9fff5..0ca9236 100644 --- a/Assets/Data/Logic Blocks/Hook.asset +++ b/Assets/Data/Logic Blocks/Hook.asset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:7782be9b087d45f14f38d5d7bab500769c6e345b45bb495f1b4f3af6838055ef -size 672 +oid sha256:72faf863a96070d2ff5149692d8cf47b6352fdb9773dc8151d79d89b39fb0698 +size 656 diff --git a/Assets/Data/Logic Blocks/Water Replace.asset b/Assets/Data/Logic Blocks/Water Replace.asset index ddbe62a..8dbda10 100644 --- a/Assets/Data/Logic Blocks/Water Replace.asset +++ b/Assets/Data/Logic Blocks/Water Replace.asset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:8799c4127f4890332495e4d608afd5a9a48395eb1ec7eb8e6116550bdd623c9e -size 642 +oid sha256:8522acce79038ac633b105d376d5a3f7433cf3d56bc226c3e504eec523b7138c +size 649 diff --git a/Assets/Resources/Missile.png b/Assets/Resources/Missile.png new file mode 100644 index 0000000..707446c --- /dev/null +++ b/Assets/Resources/Missile.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7c7697a50e9b08f487ead25640b11859fcf945fbb21668136b344431df3a9f41 +size 838 diff --git a/Assets/Resources/Missile.png.meta b/Assets/Resources/Missile.png.meta new file mode 100644 index 0000000..60e25cb --- /dev/null +++ b/Assets/Resources/Missile.png.meta @@ -0,0 +1,143 @@ +fileFormatVersion: 2 +guid: 26bf910be038bc04a87ba50e2966f38d +TextureImporter: + fileIDToRecycleName: {} + externalObjects: {} + serializedVersion: 9 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + 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: iPhone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: tvOS + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Android + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Windows Store Apps + 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: + vertices: [] + indices: + edges: [] + weights: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Resources/Replace.png b/Assets/Resources/Replace.png new file mode 100644 index 0000000..15931d4 --- /dev/null +++ b/Assets/Resources/Replace.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4f5d9015f5b6050c7f92b03014e5d678bf8f2d56e021d00b30d19a5a063dc086 +size 1173 diff --git a/Assets/Resources/Replace.png.meta b/Assets/Resources/Replace.png.meta new file mode 100644 index 0000000..4623630 --- /dev/null +++ b/Assets/Resources/Replace.png.meta @@ -0,0 +1,143 @@ +fileFormatVersion: 2 +guid: 30c1c3b607bf75f438e60e96398840cb +TextureImporter: + fileIDToRecycleName: {} + externalObjects: {} + serializedVersion: 9 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + 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: iPhone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: tvOS + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Android + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Windows Store Apps + 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: + vertices: [] + indices: + edges: [] + weights: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scenes/Client Scenes/MainMenu Client.unity b/Assets/Scenes/Client Scenes/MainMenu Client.unity index cf20ed5..3af12ae 100644 --- a/Assets/Scenes/Client Scenes/MainMenu Client.unity +++ b/Assets/Scenes/Client Scenes/MainMenu Client.unity @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:1efeb21e80c06b65ed3b88d8e0f75c9a24ab60971eba16c95c57fb844b0562eb -size 99673 +oid sha256:8dd3410c3c14fb74b702d98b057457e4d468192cb02848c7986ec5a19537416d +size 99672 diff --git a/Assets/Scenes/Levels/RaceTrack Beta.unity b/Assets/Scenes/Levels/RaceTrack Beta.unity index b3d0ace..30607a3 100644 --- a/Assets/Scenes/Levels/RaceTrack Beta.unity +++ b/Assets/Scenes/Levels/RaceTrack Beta.unity @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:14354be5b52a9bfeb748f01bc7aaa0d11fdcfc67482cac90cbb7e0e71ca36b7a -size 36108 +oid sha256:5d55c679cbf4a61b8fd1bd247cca637c9a4f56d3105ba39284d86dd4e68002b8 +size 40997 diff --git a/Assets/Scenes/Menus/MainMenu Server.unity b/Assets/Scenes/Menus/MainMenu Server.unity index 6d7840f..5ef3d8a 100644 --- a/Assets/Scenes/Menus/MainMenu Server.unity +++ b/Assets/Scenes/Menus/MainMenu Server.unity @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:1c26e2383f4f76a433c73ae1b881400009a001b342586e8bcabd8131da95a2dd -size 142632 +oid sha256:81882783cf5a376883ed9ca4f106b45f430a5c9af5cefe8480283c39fe2b3c41 +size 145896 diff --git a/Assets/Scenes/Menus/Winner.unity b/Assets/Scenes/Menus/Winner.unity index 171d3ba..c87b3fa 100644 --- a/Assets/Scenes/Menus/Winner.unity +++ b/Assets/Scenes/Menus/Winner.unity @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:509192f175edae28e8dea6073f0204a67f0f22712a003c0823d549f06cafe6db -size 311656 +oid sha256:9091ff85723439bf82fd8a798d4d537c7fc86e6ca6b88865477d66c0820806ab +size 311665 diff --git a/Assets/Scripts/Billboard.cs b/Assets/Scripts/Billboard.cs index 947120c..c015439 100644 --- a/Assets/Scripts/Billboard.cs +++ b/Assets/Scripts/Billboard.cs @@ -1,6 +1,4 @@ -using System.Collections; -using System.Collections.Generic; -using UnityEngine; +using UnityEngine; public class Billboard : MonoBehaviour { diff --git a/Assets/Scripts/BlockInput.cs b/Assets/Scripts/BlockInput.cs index a09a8f7..eb78d15 100644 --- a/Assets/Scripts/BlockInput.cs +++ b/Assets/Scripts/BlockInput.cs @@ -4,7 +4,6 @@ using UnityEngine; public class BlockInput : MonoBehaviour { - public Character character; public BlockReader blockReader; public float waitTime; @@ -43,5 +42,4 @@ public class BlockInput : MonoBehaviour } FinishedReading(); } - } diff --git a/Assets/Scripts/Character.cs b/Assets/Scripts/Character.cs index 8a25a5a..3040d70 100644 --- a/Assets/Scripts/Character.cs +++ b/Assets/Scripts/Character.cs @@ -1,8 +1,5 @@ using System.Collections; -using System.Collections.Generic; using UnityEngine; -using UnityEngine.UI; -using UnityEngine.SceneManagement; using Networking.Server; using TMPro; @@ -23,7 +20,7 @@ public class Character : MonoBehaviour public bool stuck = false; //Am I still stuck? public bool justMoved = false; //Was the logic block I just executed a move command? public bool inPit = false; - Vector3 death = new Vector3(Mathf.Infinity, 0, 0); + Vector3 death = new Vector3(9999, 0, 0); #region Inspector Fields [SerializeField] @@ -59,7 +56,6 @@ public class Character : MonoBehaviour #endregion Read Only #region Unity Functions - private void Start() { spawn = GameObject.Find("GameManager").GetComponent(); @@ -84,17 +80,12 @@ public class Character : MonoBehaviour if(lives < 1) { this.transform.position = death; - //this.enabled = false; - //gameObject.SetActive(false); } GetComponentInChildren().text = runOrder.ToString(); } - - #endregion Unity Functions #region Class Implementation - public void Initialise(Block startingBlock, Inventory inventory, string Character) { _currentBlock = startingBlock; @@ -141,8 +132,6 @@ public class Character : MonoBehaviour StopAnimation(animation); } - - public IEnumerator RotateInDirection(Direction direction,float angles, Animation animation, float time) { System.Func yFunction = null; @@ -151,15 +140,11 @@ public class Character : MonoBehaviour StartAnimation(animation, time); - //Debug.Log("Rotating by: " + angles); yield return StartCoroutine(Rotate(direction,angles, time * 0.8f, yFunction)); StopAnimation(animation); } - - - public IEnumerator AnimateToPosition(Vector3 position, Animation animation, float time) { System.Func yFunction = null; @@ -231,18 +216,11 @@ public class Character : MonoBehaviour this._currentBlock = respawnPosition; respawnPosition.CurrentPlayer = this; this.stuck = false; - Debug.Log("Moved " + this.name + " to " - + this.transform.position.x + ", " - + this.transform.position.y + ", " - + this.transform.position.z + ", " - + ", respawnNeeded = " + respawnNeeded - + ", stuck = " + this.stuck); } else { - Debug.Log("Failed to find anywhere to put " + this.name); + //Debug.Log("Failed to find anywhere to put " + this.name); } - } /// @@ -270,35 +248,23 @@ public class Character : MonoBehaviour } average /= livePlayerCount; float tosend = lives + (transform.position.x - average); - //Debug.Log(transform.position.x + " - " + average + " =" + (transform.position.x - average)); - //Debug.Log("Value to send: " + tosend); spawn.assignLogicBlock(collectable.gameObject, tosend); collectable.OnCollect(this); } } - - - #endregion Class Implementation #region Private Functions - private IEnumerator LerpToBlock(Vector3 target, float time, System.Func heightOffset = null) { - Vector3 _startPos = transform.position; Vector3 _endPos = target; - Vector3 _newPos; - float elapsedTime = 0; - - while (elapsedTime / time < 1) { - _newPos = Vector3.Lerp(_startPos, _endPos, (elapsedTime / time)); if (heightOffset != null) @@ -320,7 +286,6 @@ public class Character : MonoBehaviour private IEnumerator Rotate(Direction direction, float angles, float time, System.Func heightOffset = null) { - int RotationDir = 0; switch (direction) { @@ -337,10 +302,8 @@ public class Character : MonoBehaviour RotationDir = 2; break; } - lastRotation = angles * RotationDir; - float elapsedTime = 0; float anglePerSecond = (angles * RotationDir) / time; Vector3 _startPos = transform.position; @@ -361,10 +324,5 @@ public class Character : MonoBehaviour if (heightOffset != null) transform.position = _startPos + Vector3.up * heightOffset(1); } - - - #endregion Private Functions - - -} \ No newline at end of file +} diff --git a/Assets/Scripts/Collectables/Collectable.cs b/Assets/Scripts/Collectables/Collectable.cs index 249e236..e129ab4 100644 --- a/Assets/Scripts/Collectables/Collectable.cs +++ b/Assets/Scripts/Collectables/Collectable.cs @@ -1,10 +1,6 @@ -using System.Collections; -using System.Collections.Generic; -using UnityEngine; +using UnityEngine; public abstract class Collectable : MonoBehaviour { - public abstract void OnCollect(Character character); - } diff --git a/Assets/Scripts/Collectables/LogicCollectable.cs b/Assets/Scripts/Collectables/LogicCollectable.cs index f049d8a..5630cdc 100644 --- a/Assets/Scripts/Collectables/LogicCollectable.cs +++ b/Assets/Scripts/Collectables/LogicCollectable.cs @@ -1,12 +1,8 @@ -using System.Collections; -using System.Collections.Generic; -using UnityEngine; -using UnityEngine.UI; +using UnityEngine; using TMPro; public class LogicCollectable : Collectable { - [SerializeField] protected Inventory.Data Collectable; @@ -23,13 +19,8 @@ public class LogicCollectable : Collectable if (BlockMenu != null) { BlockMenu.SetActive(true); - - Debug.Log("You picked up the new coding block " + Collectable.element.DisplayName + "!"); popUpText.text = Collectable.element.DisplayName.ToUpper(); } Destroy(gameObject); } - - - } diff --git a/Assets/Scripts/Collectables/LogicCollectable_Multiplayer.cs b/Assets/Scripts/Collectables/LogicCollectable_Multiplayer.cs index ce38ea7..4372dcb 100644 --- a/Assets/Scripts/Collectables/LogicCollectable_Multiplayer.cs +++ b/Assets/Scripts/Collectables/LogicCollectable_Multiplayer.cs @@ -1,6 +1,4 @@ -using System.Collections; -using System.Collections.Generic; -using UnityEngine; +using UnityEngine; public class LogicCollectable_Multiplayer : Collectable { @@ -10,11 +8,7 @@ public class LogicCollectable_Multiplayer : Collectable public override void OnCollect (Character character) { character.Inventory.Add(Collectable); - Destroy (gameObject); - //send the message to the mobile of what block it picked up } - - } diff --git a/Assets/Scripts/ColourCollide.cs b/Assets/Scripts/ColourCollide.cs index c4ca610..424e0e5 100644 --- a/Assets/Scripts/ColourCollide.cs +++ b/Assets/Scripts/ColourCollide.cs @@ -1,6 +1,4 @@ -using System.Collections; -using System.Collections.Generic; -using UnityEngine; +using UnityEngine; public class ColourCollide : MonoBehaviour { diff --git a/Assets/Scripts/DontDestroy.cs b/Assets/Scripts/DontDestroy.cs new file mode 100644 index 0000000..d023bdd --- /dev/null +++ b/Assets/Scripts/DontDestroy.cs @@ -0,0 +1,15 @@ +using UnityEngine; + +public class DontDestroy : MonoBehaviour +{ + void Awake() + { + GameObject[] objs = GameObject.FindGameObjectsWithTag("Music"); + + if (objs.Length > 1) + { + Destroy(this.gameObject); + } + DontDestroyOnLoad(this.gameObject); + } +} diff --git a/Assets/Scripts/portalTesting.cs.meta b/Assets/Scripts/DontDestroy.cs.meta similarity index 83% rename from Assets/Scripts/portalTesting.cs.meta rename to Assets/Scripts/DontDestroy.cs.meta index b001d65..b8a86e5 100644 --- a/Assets/Scripts/portalTesting.cs.meta +++ b/Assets/Scripts/DontDestroy.cs.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 51774b69ca73ce6469c6a1d83fbcc234 +guid: 8e272bbeaf109774d85345290e8d4111 MonoImporter: externalObjects: {} serializedVersion: 2 diff --git a/Assets/Scripts/EnableCameraDepthInForward.cs b/Assets/Scripts/EnableCameraDepthInForward.cs index 382bfd2..07fa867 100644 --- a/Assets/Scripts/EnableCameraDepthInForward.cs +++ b/Assets/Scripts/EnableCameraDepthInForward.cs @@ -1,9 +1,6 @@ -// -// Attach this script to your camera in order to use depth nodes in forward rendering -// +// Attach this script to your camera in order to use depth nodes in forward rendering using UnityEngine; -using System.Collections; [RequireComponent(typeof(Camera))] public class EnableCameraDepthInForward : MonoBehaviour { diff --git a/Assets/Scripts/GameMode/GameMode.cs b/Assets/Scripts/GameMode/GameMode.cs index f50ace3..0ade77d 100644 --- a/Assets/Scripts/GameMode/GameMode.cs +++ b/Assets/Scripts/GameMode/GameMode.cs @@ -6,7 +6,6 @@ using Networking.Server; public abstract class GameMode : ScriptableObject { - [SerializeField] [Tooltip("Scene to load which contains Gamemode UI")] private string GameModeScene; @@ -67,7 +66,6 @@ public abstract class GameMode : ScriptableObject /// Block which the character finished on protected virtual void OnPlayerMoved(Character character, ClientData client, Block currentBlock) { } - protected virtual void OnPlayerKilled(Character character, ClientData client) { } /// @@ -100,8 +98,7 @@ public abstract class GameMode : ScriptableObject /// All players in game /// returns true if victory condition has been met public abstract bool isGameOver(PlayerData[] allPlayers); - - + public float GetRoundTime() { float retVal = gameTimes[0]; @@ -187,40 +184,5 @@ public abstract class GameMode : ScriptableObject OnGameOver(allPlayers); OnGameOverEvent?.Invoke(); } -} -#endregion Public Functions - - - -/* --- Calls we need --- - * - * PreGameSetup(); - //Called once before the game actually starts - * GameStart(PlayerData[] AllPlayers); //Called once after players have Spawned - * - * OnInputStart(PlayerData[] AllPlayers) //Called when players enter input mode - * OnRecievedPlayerInput(PlayerData Player) //Called when a specific player has sent their input - * OnInputEnd(PlayerData[] AllPlayers) //Called when player input mode has finished - * - * OnRoundStart(PlayerData[] AllPlayers) //Just before Players start moving - * - * ------- Start Round Loop ------- - * - * OnPlayerMoved(PlayerData player) //Called after each player moves - * IsGameOver(PlayerData[] AllPlayers) //Called after each player moves - * - * AllPlayersMoved(PlayerData[] AllPlayers) //Called after all players have moved - * EnvironmentTurn() //Also called after all players have moved but should be kept specialised to environment stuff - * IsGameOver(PlayerData[] AllPlayers) //We need to check if the environment terminated the game - * - * --------- End Game Loop --------- - * - * OnRoundEnd(PlayerData[] AllPlayers) //Called after movements are made - * IsGameOver(PlayerData[] AllPlayers) //This needs to be checked again - * - * GameEnd(PlayerData[] AllPlayers) - * - * - * - * - * - */ + #endregion Public Functions +} diff --git a/Assets/Scripts/GameMode/GameModeEvents.cs b/Assets/Scripts/GameMode/GameModeEvents.cs index a9d9042..ec796b6 100644 --- a/Assets/Scripts/GameMode/GameModeEvents.cs +++ b/Assets/Scripts/GameMode/GameModeEvents.cs @@ -1,6 +1,4 @@ -using System.Collections; -using System.Collections.Generic; -using UnityEngine; +using UnityEngine; using UnityEngine.Events; public class GameModeEvents : MonoBehaviour @@ -17,7 +15,6 @@ public class GameModeEvents : MonoBehaviour public UnityEvent OnRoundEnd = new UnityEvent(); public UnityEvent OnGameOver = new UnityEvent(); - private void OnEnable() { Reference.Value.GameStartEvent += GameStart; @@ -57,6 +54,7 @@ public class GameModeEvents : MonoBehaviour { OnRoundEnd.Invoke(); } + private void GameOver() { OnGameOver.Invoke(); diff --git a/Assets/Scripts/GameMode/GameModeReference.cs b/Assets/Scripts/GameMode/GameModeReference.cs index f9d98f1..df0de99 100644 --- a/Assets/Scripts/GameMode/GameModeReference.cs +++ b/Assets/Scripts/GameMode/GameModeReference.cs @@ -1,6 +1,4 @@ -using System.Collections; -using System.Collections.Generic; -using UnityEngine; +using UnityEngine; [CreateAssetMenu(menuName = "Major Project/GameMode Refence", order = 201)] public class GameModeReference : ScriptableObject diff --git a/Assets/Scripts/GameMode/TestGameMode.cs b/Assets/Scripts/GameMode/TestGameMode.cs deleted file mode 100644 index 104e425..0000000 --- a/Assets/Scripts/GameMode/TestGameMode.cs +++ /dev/null @@ -1,18 +0,0 @@ -using System.Collections; -using System.Collections.Generic; -using UnityEngine; - -public class TestGameMode : MonoBehaviour -{ - // Start is called before the first frame update - void Start() - { - - } - - // Update is called once per frame - void Update() - { - - } -} diff --git a/Assets/Scripts/GameMode/TestGameMode.cs.meta b/Assets/Scripts/GameMode/TestGameMode.cs.meta deleted file mode 100644 index 4244d1f..0000000 --- a/Assets/Scripts/GameMode/TestGameMode.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: efa4d444fe1d14e4daf014fc89bfc971 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/GlobalVariables.cs b/Assets/Scripts/GlobalVariables.cs index 34a225c..95a9468 100644 --- a/Assets/Scripts/GlobalVariables.cs +++ b/Assets/Scripts/GlobalVariables.cs @@ -1,13 +1,7 @@ -using System.Collections; -using System.Collections.Generic; -using UnityEngine; - -public static class GlobalVariables +public static class GlobalVariables { - public static bool soundVolume = true; public static bool musicVolume = true; public static bool playerMoves = true; - public static int difficulty = 1; public static string winnername = "Claire"; public static string winneranimal = "Cat"; } diff --git a/Assets/Scripts/InGameNotificaion.cs b/Assets/Scripts/InGameNotificaion.cs index ba16797..fa7a2c4 100644 --- a/Assets/Scripts/InGameNotificaion.cs +++ b/Assets/Scripts/InGameNotificaion.cs @@ -1,27 +1,21 @@ -using System.Collections; -using System.Collections.Generic; -using UnityEngine.UI; -using UnityEngine; +using UnityEngine; public class InGameNotificaion : MonoBehaviour { public GameObject BlockMenu; public GameObject WelcomeMenu; - //On Awake private void Awake () { WelcomeMenu.SetActive (true); BlockMenu.SetActive (false); } - //Welcome Menu Options public void OnPlayClick () { WelcomeMenu.SetActive (false); } - //Block Menu Options public void OnContinueClick () { BlockMenu.SetActive (false); diff --git a/Assets/Scripts/Inventory.cs b/Assets/Scripts/Inventory.cs index a07fe56..9daf9dd 100644 --- a/Assets/Scripts/Inventory.cs +++ b/Assets/Scripts/Inventory.cs @@ -1,5 +1,4 @@ using System.Linq; -using System.Collections; using System.Collections.Generic; using UnityEngine; @@ -18,20 +17,17 @@ public class Inventory : ScriptableObject public void Add(LogicBlock element, int count = 1, bool isInfinit = false) { - Data data = new Data { element = element, Count = count, isInfinit = isInfinit }; - Add(data); } public void Add(Data data) { - if (_bagItems.Exists(p => p.element.isSameType(data.element))) { Data bagData = BagItems.Find(p => p.element.isSameType(data.element)); @@ -47,14 +43,10 @@ public class Inventory : ScriptableObject public void Remove(LogicBlock element) { - - if (!_bagItems.Exists(p => p.element.isSameType(element))) { return; } - - Data data = _bagItems.First(p => p.element.isSameType(element)); if (!data.isInfinit) @@ -62,13 +54,9 @@ public class Inventory : ScriptableObject if (data.Count > data.minCount) data.Count--; - - if (data.Count <= 0) _bagItems.Remove(data); } - - OnItemsUpdated?.Invoke(); } @@ -94,11 +82,9 @@ public class Inventory : ScriptableObject Data dataCopy = new Data(data.element, data.Count, data.isInfinit,data.minCount); retVal._bagItems.Add(dataCopy); } - return retVal; } - [System.Serializable] public class Data { @@ -107,7 +93,6 @@ public class Inventory : ScriptableObject public int minCount; public bool isInfinit = false; - public Data() { } public Data(LogicBlock element, int Count, bool isInfinit, int minCount = 0) diff --git a/Assets/Scripts/KeyboardInput.cs b/Assets/Scripts/KeyboardInput.cs index 3e64e89..ddce4d5 100644 --- a/Assets/Scripts/KeyboardInput.cs +++ b/Assets/Scripts/KeyboardInput.cs @@ -1,13 +1,10 @@ -using System.Collections; -using System.Collections.Generic; -using UnityEngine; +using UnityEngine; /// /// Debug class for controlling a character with keyboard input /// public class KeyboardInput : MonoBehaviour { - #region Inspector Fields [SerializeField] [Tooltip("Character to move")] @@ -17,7 +14,6 @@ public class KeyboardInput : MonoBehaviour #endregion Unity Functions #region Unity Functions - // Update is called once per frame void Update() { if (character == null) @@ -33,14 +29,12 @@ public class KeyboardInput : MonoBehaviour } if (Input.GetKeyDown(KeyCode.UpArrow)) { - float outTime; Move move = (Move)ScriptableObject.CreateInstance(typeof(Move)); StartCoroutine(move.Run(character, characterSpeed)); Destroy(move); } if (Input.GetKeyDown(KeyCode.Space)) { - float outTime; Jump jump = (Jump)ScriptableObject.CreateInstance(typeof(Jump)); StartCoroutine(jump.Run(character, characterSpeed)); Destroy(jump); @@ -55,4 +49,4 @@ public class KeyboardInput : MonoBehaviour } #endregion Unity Functions -} \ No newline at end of file +} diff --git a/Assets/Scripts/LevelBlocks/Air.cs b/Assets/Scripts/LevelBlocks/Air.cs index b46afc5..d68bd54 100644 --- a/Assets/Scripts/LevelBlocks/Air.cs +++ b/Assets/Scripts/LevelBlocks/Air.cs @@ -1,5 +1,4 @@ using System.Collections; -using System.Collections.Generic; using UnityEngine; public class Air : ActiveBlock @@ -23,14 +22,9 @@ public class Air : ActiveBlock //Very hacky, but it solved a weird bug where falling off the left-hand-side of the track didn't kill you, it just got you stuck down there forever //You have to leave the camera's sight in order to die from falling yield return StartCoroutine(player.AnimateToPosition(transform.position + Vector3.down * fallingDistance,Character.Animation.Hit, fallingAnimationTime)); - //yield return StartCoroutine(LerpScale(player.transform, Vector3.zero, fallingAnimationTime)); - yield return StartCoroutine(player.AnimateToPosition(transform.position + Vector3.down * 100, Character.Animation.Hit, 0.01f)); - //player.gameObject.SetActive(false); - Debug.Log("Set player scale to one"); player.transform.localScale = Vector3.one; - } public override IEnumerator OnRoundEnd(PlayerData[] allPlayers) @@ -43,25 +37,20 @@ public class Air : ActiveBlock if (DeleteCount == 0) Destroy(gameObject); } - yield break; } private IEnumerator LerpScale(Transform target, Vector3 endScale, float time) { - Vector3 startScale = target.localScale; float elapsedTime = 0; while(elapsedTime < time) { - target.localScale = Vector3.Slerp(startScale, endScale, (elapsedTime / time)); - yield return new WaitForEndOfFrame(); elapsedTime += Time.deltaTime; } - target.localScale = endScale; } } diff --git a/Assets/Scripts/LevelBlocks/Block.cs b/Assets/Scripts/LevelBlocks/Block.cs index 73c8feb..52a0896 100644 --- a/Assets/Scripts/LevelBlocks/Block.cs +++ b/Assets/Scripts/LevelBlocks/Block.cs @@ -261,12 +261,8 @@ public class Block : MonoBehaviour return retVal; GameObject airBlock = Resources.Load("Cube_Air"); - Debug.Log(airBlock, airBlock); - GameObject newBlock = Instantiate(airBlock); - newBlock.name = "AIR_BLOCK"; - Debug.Log(newBlock, newBlock); newBlock.transform.position = position; return newBlock.GetComponent(); diff --git a/Assets/Scripts/Logic/BlockReader.cs b/Assets/Scripts/Logic/BlockReader.cs index 0512700..48ae0c1 100644 --- a/Assets/Scripts/Logic/BlockReader.cs +++ b/Assets/Scripts/Logic/BlockReader.cs @@ -8,7 +8,6 @@ using UnityEngine; [System.Serializable] public class BlockReader { - #region Inspector Variables [SerializeField] [Tooltip("List of LogicBlocks which will affected this character")] @@ -35,7 +34,6 @@ public class BlockReader /// Sum of size of all Blocks in the chain /// public int Length { get { int retVal = 0; LogicChain.ForEach(p => retVal += p.Size()); return retVal; } } - #endregion Read-only Variables #region Private Variables @@ -82,11 +80,7 @@ public class BlockReader { currentBlockIndex++; currentBlock.Reset(); - } - - //Should other readers wait for this one - //return (runAgainNot || !currentBlock.WaitUntilFinished); } /// @@ -132,7 +126,5 @@ public class BlockReader if (OnUpdate != null) OnUpdate.Invoke(); } - #endregion } - diff --git a/Assets/Scripts/Logic/Blocks/CombinedBlock.cs b/Assets/Scripts/Logic/Blocks/CombinedBlock.cs index 5907491..5bf1bfc 100644 --- a/Assets/Scripts/Logic/Blocks/CombinedBlock.cs +++ b/Assets/Scripts/Logic/Blocks/CombinedBlock.cs @@ -1,5 +1,4 @@ using System.Collections; -using System.Collections.Generic; using UnityEngine; [CreateAssetMenu(menuName = "Major Project/Combined Block")] @@ -7,10 +6,6 @@ using UnityEngine; public class CombinedBlock : LogicBlock { #region Inspector Variables - //[SerializeField] - //[Tooltip("Is this block editable")] - //public bool isEditable = false; - [SerializeField] [Tooltip("Blocks this will run through")] public BlockReader blockReader = new BlockReader(); @@ -20,11 +15,6 @@ public class CombinedBlock : LogicBlock public override bool WaitUntilFinished { get { if (blockReader != null && blockReader.CurrentBlock != null) return (blockReader.CurrentBlock.WaitUntilFinished || base.WaitUntilFinished); else return base.WaitUntilFinished; } } #endregion - #region Private Variables - - #endregion Private Variables - - public override IEnumerator Run(Character player, float animationTime, bool useBlockDirection = false) { BlockLogic(player,animationTime); @@ -35,7 +25,6 @@ public class CombinedBlock : LogicBlock { yield return player.StartCoroutine(blockReader.Read(player, animationTime / SpeedMultiplier)); } - } else { @@ -54,7 +43,6 @@ public class CombinedBlock : LogicBlock yield break; } - /// /// Returns the block that the character will endUp on after they use this logic element /// @@ -75,8 +63,6 @@ public class CombinedBlock : LogicBlock blockReader.Reset(); } - - public override LogicBlock Clone() { CombinedBlock retVal = base.Clone() as CombinedBlock; @@ -88,8 +74,6 @@ public class CombinedBlock : LogicBlock return retVal; } - - #region Serialisation Functions public override void CopyToken(BlockToken token) { @@ -115,7 +99,6 @@ public class CombinedBlock : LogicBlock return retVal; } #endregion Serialisation Functions - } [System.Serializable] diff --git a/Assets/Scripts/Logic/Blocks/EditableBlock.cs b/Assets/Scripts/Logic/Blocks/EditableBlock.cs index d115cd6..77e8c9e 100644 --- a/Assets/Scripts/Logic/Blocks/EditableBlock.cs +++ b/Assets/Scripts/Logic/Blocks/EditableBlock.cs @@ -1,11 +1,9 @@ -using System.Collections; -using System.Collections.Generic; +using System.Collections.Generic; using UnityEngine; [CreateAssetMenu(menuName = "Major Project/Editable Block")] public class EditableBlock : CombinedBlock { - public override LogicBlock[] GetAllBlocks() { List retVal = new List(); @@ -25,7 +23,4 @@ public class EditableBlock : CombinedBlock return retVal; } - - - } diff --git a/Assets/Scripts/Logic/Blocks/HookShot.cs b/Assets/Scripts/Logic/Blocks/HookShot.cs index ad7a077..b89b2da 100644 --- a/Assets/Scripts/Logic/Blocks/HookShot.cs +++ b/Assets/Scripts/Logic/Blocks/HookShot.cs @@ -1,5 +1,4 @@ using System.Collections; -using System.Collections.Generic; using UnityEngine; [CreateAssetMenu(menuName = "Major Project/Pick Ups/HookShot Block")] @@ -44,25 +43,17 @@ public class HookShot : LogicBlock { return Block.GetOrCreateBlockAtPosition(position - Direction.ToVector(transform), 1, layerMask); } - } - return retVal; - - - - } protected override IEnumerator BlockLogic(Character player, float animationTime, bool useBlockDirection = false) { Block hitBlock = GetEndBlock(player.CurrentBlock, player.transform, ~player.Ignore); - //Debug.Log("hookshot: " + hitBlock.position, hitBlock.gameObject); if (hitBlock == player.CurrentBlock) yield break; - //Debug.Log("Instantiating shot"); GameObject shot = GameObject.CreatePrimitive(PrimitiveType.Sphere); shot.transform.localScale = Vector3.one * 0.33f; yield return player.StartCoroutine(lerpShot(shot.transform, player.transform.position, hitBlock.VisualPosition,ShotSpeed)); @@ -81,7 +72,6 @@ public class HookShot : LogicBlock private IEnumerator lerpShot(Transform target, Vector3 startPosition,Vector3 endPosition, float time) { - float elapsedTime = 0; while (elapsedTime < time) @@ -91,7 +81,6 @@ public class HookShot : LogicBlock yield return new WaitForEndOfFrame(); elapsedTime += Time.deltaTime; } - target.position = endPosition; } @@ -115,7 +104,6 @@ public class HookShot : LogicBlock return retVal; } - } [System.Serializable] diff --git a/Assets/Scripts/Logic/Blocks/Jump.cs b/Assets/Scripts/Logic/Blocks/Jump.cs index 7f1ad91..eb27d4d 100644 --- a/Assets/Scripts/Logic/Blocks/Jump.cs +++ b/Assets/Scripts/Logic/Blocks/Jump.cs @@ -1,5 +1,4 @@ using System.Collections; -using System.Collections.Generic; using UnityEngine; /// @@ -9,7 +8,6 @@ using UnityEngine; [System.Serializable] public class Jump : LogicBlock { - [SerializeField] [Tooltip("Direction to Jump")] protected Direction direction = Direction.Forward; @@ -23,15 +21,12 @@ public class Jump : LogicBlock protected int Height = 1; #region Class Functions - /// /// Implementation of BlockLogic, moves the player forward /// /// Player to move protected override IEnumerator BlockLogic(Character player, float animationTime, bool useBlockDirection = false) { - //player.Jump(direction, animationTime); - player.justMoved = true; Block endBlock = GetEndBlock(player.CurrentBlock, player.transform, ~player.Ignore); @@ -41,9 +36,7 @@ public class Jump : LogicBlock endBlock.CurrentPlayer.StartAnimation(Character.Animation.Hit); endBlock = GetEndBlock(endBlock, player.transform, ~player.Ignore); } - yield return player.StartCoroutine(player.MoveToBlock(endBlock, Character.Animation.Jump, animationTime)); - } /// @@ -60,8 +53,6 @@ public class Jump : LogicBlock else return JumpLong(startBlock, transform, layerMask); } - - #endregion Class Functions #region Helper Functions @@ -69,7 +60,6 @@ public class Jump : LogicBlock { //setting up variables Vector3 position; // position wanted - Block hit; //output of block detection Block retVal = StartBlock; //block we'll actually move to //Check blocks in front until we hit an obstruction or went the distance @@ -82,16 +72,7 @@ public class Jump : LogicBlock if (Block.isBlockAtPosition(position + Vector3.up, 1, layerMask)) break; - retVal = Block.GetOrCreateBlockAtPosition(position, 1, layerMask); - - ////If block at Position is walkable set it to last known position - //if (Block.isBlockAtPosition(position, 1, layerMask, out hit) && hit.isWalkable(layerMask)) - // retVal = hit; - ////else if block down one is walkable - //else if (Block.isBlockAtPosition(position + Vector3.down, 1, layerMask, out hit) && hit.isWalkable(layerMask)) - // retVal = hit; - } return retVal; @@ -119,15 +100,10 @@ public class Jump : LogicBlock if (Block.isBlockAtPosition(position, 1, layerMask, out hit) && hit.isWalkable(layerMask)) retVal = hit; } - return retVal; } - - #endregion Helper Functions - - #region Serialisation functions public override void CopyToken(BlockToken token) { @@ -146,6 +122,4 @@ public class Jump : LogicBlock return retVal; } #endregion Serialisation functions - - -} \ No newline at end of file +} diff --git a/Assets/Scripts/Logic/Blocks/LogicBlock.cs b/Assets/Scripts/Logic/Blocks/LogicBlock.cs index b264b67..ba0b304 100644 --- a/Assets/Scripts/Logic/Blocks/LogicBlock.cs +++ b/Assets/Scripts/Logic/Blocks/LogicBlock.cs @@ -1,5 +1,4 @@ using System.Collections; -using System.Collections.Generic; using UnityEngine; /// @@ -8,7 +7,6 @@ using UnityEngine; [System.Serializable] public abstract class LogicBlock : ScriptableObject { - #region Inspector Fields [SerializeField] [Header("UI Settings")] @@ -31,7 +29,6 @@ public abstract class LogicBlock : ScriptableObject [SerializeField] [Tooltip("Speed this block will be played back at. (Default = 1)")] protected float SpeedMultiplier = 1; - #endregion Inspector Fields #region ReadOnly Variables @@ -44,12 +41,10 @@ public abstract class LogicBlock : ScriptableObject #endregion #region private variables - /// /// Amount of times this block has run /// protected int RepeatCount = 0; - #endregion private variables #region Class Functions @@ -60,9 +55,7 @@ public abstract class LogicBlock : ScriptableObject /// returns true if block is finished public virtual IEnumerator Run(Character player, float animationSpeed,bool useBlockDirection = false) { - float TotalAnimationTime = animationSpeed / SpeedMultiplier; - if(GlobalVariables.playerMoves == true){ player.DisplayBlock(this); @@ -162,7 +155,6 @@ public abstract class LogicBlock : ScriptableObject } #endregion Serialisation Functions - public bool isSameType(object other) { if (Object.ReferenceEquals(null, other)) @@ -188,27 +180,18 @@ public abstract class LogicBlock : ScriptableObject { return new LogicBlock[] { this }; } - - #endregion Class Functions } [System.Serializable] public class BlockToken { - public System.Type blockType; - public Color Color; - public string _DisplayName; - public string ObjectName; - public bool WaitUntilFinished; - public int RepeatAmount; - public float SpeedMultiplier; public BlockToken(LogicBlock block) @@ -218,11 +201,8 @@ public class BlockToken public LogicBlock ToLogicBlock() { - LogicBlock retVal = (LogicBlock)ScriptableObject.CreateInstance(blockType); retVal.CopyToken(this); - return retVal; } - } diff --git a/Assets/Scripts/Logic/Blocks/Move.cs b/Assets/Scripts/Logic/Blocks/Move.cs index 04fa373..8676e81 100644 --- a/Assets/Scripts/Logic/Blocks/Move.cs +++ b/Assets/Scripts/Logic/Blocks/Move.cs @@ -1,5 +1,4 @@ using System.Collections; -using System.Collections.Generic; using UnityEngine; /// @@ -9,12 +8,10 @@ using UnityEngine; [System.Serializable] public class Move : LogicBlock { - [SerializeField] protected Direction direction = Direction.Forward; #region Class Functions - /// /// Implementation of BlockLogic, moves the player forward /// @@ -28,7 +25,6 @@ public class Move : LogicBlock endBlock = GetEndBlock(player.CurrentBlock, player.CurrentBlock.transform, ~player.Ignore); else endBlock = GetEndBlock(player.CurrentBlock, player.transform, ~player.Ignore); - yield return player.StartCoroutine(player.MoveToBlock(endBlock, Character.Animation.Walk, animationTime)); } @@ -41,7 +37,6 @@ public class Move : LogicBlock /// public override Block GetEndBlock(Block startBlock,Transform tranform, LayerMask layerMask) { - DebugExtensions.DrawCube(startBlock.position, Vector3.one / 2, Color.red, 3, false); Vector3 wantedPosition = startBlock.position + direction.ToVector(tranform); // position wanted @@ -70,7 +65,6 @@ public class Move : LogicBlock return retVal; } - #endregion Class Functions } diff --git a/Assets/Scripts/Logic/Blocks/Replace.cs b/Assets/Scripts/Logic/Blocks/Replace.cs index 99571ae..7267511 100644 --- a/Assets/Scripts/Logic/Blocks/Replace.cs +++ b/Assets/Scripts/Logic/Blocks/Replace.cs @@ -1,5 +1,4 @@ using System.Collections; -using System.Collections.Generic; using UnityEngine; [CreateAssetMenu(menuName = "Major Project/Pick Ups/Replace Block")] @@ -43,15 +42,11 @@ public class Replace : LogicBlock return retVal; } - } [System.Serializable] public class ReplaceToken : BlockToken { public string prefabName; - public ReplaceToken(LogicBlock block) : base(block) { } } - - diff --git a/Assets/Scripts/Logic/Blocks/Rotate.cs b/Assets/Scripts/Logic/Blocks/Rotate.cs index edf3d0f..048b12b 100644 --- a/Assets/Scripts/Logic/Blocks/Rotate.cs +++ b/Assets/Scripts/Logic/Blocks/Rotate.cs @@ -1,5 +1,4 @@ using System.Collections; -using System.Collections.Generic; using UnityEngine; /// @@ -20,18 +19,13 @@ public class Rotate : LogicBlock protected int Angle = 90; #endregion Inspector Fields - #region Class Functions - /// /// Rotates the player in the direction specified by this block /// /// Player to rotate protected override IEnumerator BlockLogic(Character player, float animationTime, bool useBlockDirection = false) { - //player.Rotate(direction, animationTime); - - //Debug.Log("Rotating by: " + Angle); yield return player.StartCoroutine(player.RotateInDirection(direction,Angle, Character.Animation.Jump, animationTime)); } @@ -63,10 +57,8 @@ public class Rotate : LogicBlock retVal.direction = direction; retVal.angle = Angle; - return retVal; } - #endregion Class Functions } diff --git a/Assets/Scripts/Logic/Blocks/Shoot.cs b/Assets/Scripts/Logic/Blocks/Shoot.cs index 31586b0..2537caf 100644 --- a/Assets/Scripts/Logic/Blocks/Shoot.cs +++ b/Assets/Scripts/Logic/Blocks/Shoot.cs @@ -1,8 +1,6 @@ using System.Collections; -using System.Collections.Generic; using UnityEngine; - [CreateAssetMenu(menuName = "Major Project/Pick Ups/Shoot Block")] [System.Serializable] public class Shoot : LogicBlock @@ -22,7 +20,6 @@ public class Shoot : LogicBlock return startBlock; } - protected override IEnumerator BlockLogic(Character player, float animationTime, bool useBlockDirection = false) { Projectile newProjectile = Instantiate(Projectile, player.transform.position, player.transform.rotation); @@ -58,7 +55,6 @@ public class Shoot : LogicBlock return retVal; } - } [System.Serializable] @@ -68,4 +64,4 @@ public class ShotToken : BlockToken public string prefabName; public ShotToken(LogicBlock block) : base(block) { } -} \ No newline at end of file +} diff --git a/Assets/Scripts/MainMenuControllerClient.cs b/Assets/Scripts/MainMenuControllerClient.cs index 658bab9..fe464cc 100644 --- a/Assets/Scripts/MainMenuControllerClient.cs +++ b/Assets/Scripts/MainMenuControllerClient.cs @@ -1,7 +1,4 @@ -using System.Collections; -using System.Collections.Generic; -using UnityEngine.UI; -using UnityEngine; +using UnityEngine; public class MainMenuControllerClient : MonoBehaviour { @@ -9,7 +6,6 @@ public class MainMenuControllerClient : MonoBehaviour public GameObject HowToPlayMenu; public GameObject HowToPlayMenu_inventory; - //On Awake private void Awake () { MainMenu.SetActive (true); diff --git a/Assets/Scripts/MainMenuControllerServer.cs b/Assets/Scripts/MainMenuControllerServer.cs index 8eefb88..b3dda63 100644 --- a/Assets/Scripts/MainMenuControllerServer.cs +++ b/Assets/Scripts/MainMenuControllerServer.cs @@ -7,13 +7,10 @@ public class MainMenuControllerServer : MonoBehaviour public GameObject SettingsMenu; public GameObject AboutMenu; public GameObject CreditsMenu; - - public Button SoundButton; public Button MusicButton; - public Button DifficultyButton; public Button playerMovesButton; + public AudioSource backgroundMusic; - //On Awake private void Awake() { MainMenu.SetActive(true); @@ -22,7 +19,6 @@ public class MainMenuControllerServer : MonoBehaviour CreditsMenu.SetActive(false); } - //Main Menu Options public void OnPlayClick() { UnityEngine.SceneManagement.SceneManager.LoadScene("Lobby"); @@ -34,95 +30,56 @@ public class MainMenuControllerServer : MonoBehaviour public void OnAboutClick() { - //toggle which menu displays MainMenu.SetActive(false); AboutMenu.SetActive(true); } public void OnCreditClick() { - //toggle which menu displays MainMenu.SetActive(false); CreditsMenu.SetActive(true); } public void OnSettingsClick() { - //toggle which menu displays MainMenu.SetActive(false); SettingsMenu.SetActive(true); } - //Settings Menu public void OnBackSettingsClick () { - //Settings menu SettingsMenu.SetActive (false); MainMenu.SetActive (true); } public void OnBackAboutClick () { - //about menu AboutMenu.SetActive (false); MainMenu.SetActive (true); } public void OnBackCreditClick () { - //about menu CreditsMenu.SetActive (false); MainMenu.SetActive (true); } - //Settings menu public void OnMusicVolumeClick() { if (GlobalVariables.musicVolume == true) { - //backgroundMusic.Stop(); + backgroundMusic.Stop(); MusicButton.GetComponentInChildren().text = "Music Volume: OFF"; GlobalVariables.musicVolume = false; } else { - //backgroundMusic.Play(); + backgroundMusic.Play(); MusicButton.GetComponentInChildren().text = "Music Volume: ON"; GlobalVariables.musicVolume = true; } } - //Settings menu - public void OnSoundVolumeClick () - { - if (GlobalVariables.soundVolume == true) { - SoundButton.GetComponentInChildren ().text = "Sound Volume: OFF"; - GlobalVariables.soundVolume = false; - } else { - SoundButton.GetComponentInChildren ().text = "Sound Volume: ON"; - GlobalVariables.soundVolume = true; - } - } - - public void OnDifficultyClick() - { - if (GlobalVariables.difficulty == 1) - { - DifficultyButton.GetComponentInChildren().text = "Difficulty: MEDIUM"; - GlobalVariables.difficulty = 2; - } - else if (GlobalVariables.difficulty == 2) - { - DifficultyButton.GetComponentInChildren().text = "Difficulty: HARD"; - GlobalVariables.difficulty = 3; - } - else - { - DifficultyButton.GetComponentInChildren().text = "Difficulty: EASY"; - GlobalVariables.difficulty = 1; - } - } - public void OnDisplayPlayerMoves() { if (GlobalVariables.playerMoves == true) diff --git a/Assets/Scripts/Managers/GameManager.cs b/Assets/Scripts/Managers/GameManager.cs index aedba90..d6bbbcb 100644 --- a/Assets/Scripts/Managers/GameManager.cs +++ b/Assets/Scripts/Managers/GameManager.cs @@ -7,7 +7,6 @@ using Networking.Server; using Networking; using UnityEngine.SceneManagement; - public class GameManager : MonoBehaviour { #region Inspector Field @@ -17,7 +16,6 @@ public class GameManager : MonoBehaviour [SerializeField] private GameModeReference CurrentGameMode; - [Header("References")] [SerializeField] [Tooltip("Prefab of character for players to play")] @@ -30,7 +28,6 @@ public class GameManager : MonoBehaviour private ClientList ClientList; public blockSpawn spawnBlock; - #endregion Inspector Field #region Private Variables @@ -51,19 +48,14 @@ public class GameManager : MonoBehaviour #endregion Read Only #region Unity Functions - private void Start() { spawnBlock = gameObject.GetComponent(); - - //Start Game StartCoroutine(GameRoutine()); } private void Update() { - //This is required so that the server can continue to recieve client messages - //(it is a unity thing) server.ServerUpdate(); } @@ -83,13 +75,9 @@ public class GameManager : MonoBehaviour #region Class Functions private IEnumerator GameRoutine() { - //Allows game mode to instantiate anything it might need; gameMode.PreGameStart(); - //gets list of items to check spawn locations - //spawnBlock.wakeup(); - //Spawn Characters and tell let the GameMode do anything with the characters it might want SpawnCharacters(); playerDataAsArray.ForEach(p => p.client.SendLives()); @@ -101,34 +89,32 @@ public class GameManager : MonoBehaviour int playersalive_left = 0; int spotinarray = 0; int players = 0; - //check here if one player left - foreach(PlayerData data in playerDataAsArray) + + foreach (PlayerData data in playerDataAsArray) { players++; - if (data.character.lives > 0) + if (data.client.Lives > 0) { playersalive_left++; spotinarray = players; } } - /*if(playersalive_left == 1) + if(playersalive_left == 1) { - GlobalVariables.winneranimal = playerDataAsArray[spotinarray].client.characterAnimal; - GlobalVariables.winnername = playerDataAsArray[spotinarray].client.Name; + GlobalVariables.winneranimal = playerDataAsArray[spotinarray-1].client.characterAnimal; + GlobalVariables.winnername = playerDataAsArray[spotinarray-1].client.Name; SceneManager.LoadScene("Winner"); - }*/ + } //wait until we have recieved all player input yield return StartCoroutine(WaitForPlayerInput()); //I hate having to do this EnvironmentBlocks = FindObjectsOfType(); - ////Debug.Log("Active blocks found: " + EnvironmentBlocks.Length); //Routine for players movement yield return StartCoroutine(RoundRoutine()); //it's pretty long so it gets it's own coroutine; } - //Let the gamemode know that the game is over gameMode.GameEnd(playerDataAsArray); } @@ -144,12 +130,9 @@ public class GameManager : MonoBehaviour //Tell the gamemode that we are starting a round gameMode.RoundStart(playerDataAsArray); - - //Loop until all players have finished moving while (playerDataAsArray.Any(p => !p.blockReader.Finished)) { - //Loop through all players foreach (PlayerData player in playerDataAsArray) { @@ -177,8 +160,6 @@ public class GameManager : MonoBehaviour gameMode.PlayerKilled(player); } - - //Let GameMode know that Round is Over yield return StartCoroutine(EnvironmentEnd()); gameMode.RoundEnd(playerDataAsArray.ToArray()); @@ -192,14 +173,12 @@ public class GameManager : MonoBehaviour { if (player.client.Lives == 0) { - //Debug.Log("Remove: " + player.client.characterAnimal); removePlayer(player); } } //spawn collectible logic blocks spawnBlock.Spawn(); - //Reset some player Data foreach (PlayerData player in playerDataAsArray) { @@ -211,9 +190,9 @@ public class GameManager : MonoBehaviour } playerData = playerData.OrderBy(unit => unit.Value.character.CurrentBlock.transform.position.x).ToDictionary(unit => unit.Key, unit => unit.Value); - Dictionary filteredPlayers = playerData.Where(p => !p.Value.isDead).ToDictionary(unit => unit.Key, unit => unit.Value); + //Dictionary filteredPlayers = playerData.Where(p => !p.Value.isDead).ToDictionary(unit => unit.Key, unit => unit.Value); int order = 1; - foreach (PlayerData data in filteredPlayers.Values) + foreach (PlayerData data in playerDataAsArray) { data.character.runOrder = order; order++; @@ -230,7 +209,6 @@ public class GameManager : MonoBehaviour { if (player.client.Lives == 0) { - //Debug.Log("Remove: " + player.client.characterAnimal); removePlayer(player); } } @@ -277,13 +255,6 @@ public class GameManager : MonoBehaviour data.client.Inventory.Remove(data.blockReader.CurrentBlock); data.blockReader.CurrentBlock.hasBeenRemoved = true; } - - //Process the move - //blockFinished = data.blockReader.Read(data.character, AnimationTime, out waitTime); - - //Wait for the animation to finish - //yield return new WaitForSeconds(waitTime); - yield return StartCoroutine(data.blockReader.Read(data.character, AnimationTime)); } @@ -292,24 +263,15 @@ public class GameManager : MonoBehaviour playerData = new Dictionary(); Block[] SpawnBlocks = FindObjectsOfType().Where(p => p.isSpawnable).ToArray(); - int blockIndex = 0; - foreach (Block block in SpawnBlocks) - { - ////Debug.Log("Block #" + blockIndex++ + " (" + block.transform.position.x + ", " + block.transform.position.y + ", " + block.transform.position.z + ")"); - } - //int spawnIndex = 0; //If we have an odd number of players, then we start at spawn point 0 (in the middle) //If we have an even number, then we skip it //int spawnIndex = ((ClientList.Count() + 1) % 2); - int spawnIndex = 0; foreach (ClientData client in ClientList) { - ////Debug.Log("spawnIndex = " + spawnIndex); Character newChar = Instantiate(characterPrefab); - //Block startingBlock = SpawnBlocks[(spawnIndex++ % ClientList.ConnectedClients.Count)]; Block startingBlock = SpawnBlocks[spawnIndex++]; newChar.Initialise(startingBlock, client.Inventory, client.characterAnimal); newChar.transform.forward = startingBlock.SpawnDirection.ToVector(); @@ -329,7 +291,6 @@ public class GameManager : MonoBehaviour yield return new WaitUntil(() => InitiativeGroup.All(p => p.isFinished)); InitiativeGroup.ForEach(p => p.Reset()); } - } private IEnumerator EnvironmentEnd() @@ -351,7 +312,6 @@ public class GameManager : MonoBehaviour #endregion Class Functions #region Networking Functions - /// /// Registers functions which should deal with incoming messages from clients /// @@ -374,20 +334,15 @@ public class GameManager : MonoBehaviour /// messages passed by server private void RecieveLogicList(NetworkMessage msg) { - //try to read base message as a logic message LogicProtocols.LogicMsg logicMsg; if (!msg.TryRead(out logicMsg)) return; - ////Debug that we have recieved it - ////Debug.Log("Recieved function from " + ClientList[msg.conn.connectionId].Name); - //Update player Data with recieved list playerData[msg.conn.Hash()].blockReader.LogicChain = new List(logicMsg.elements); playerData[msg.conn.Hash()].recievedList = true; } - #endregion Networking Functions } diff --git a/Assets/Scripts/Managers/GameManagerRacetrack.cs b/Assets/Scripts/Managers/GameManagerRacetrack.cs deleted file mode 100644 index d380b63..0000000 --- a/Assets/Scripts/Managers/GameManagerRacetrack.cs +++ /dev/null @@ -1,189 +0,0 @@ -using System.Collections; -using System.Collections.Generic; -using System.Linq; -using UnityEngine; -using UnityEngine.Networking; -using Networking.Server; -using Networking; -using UnityEngine.SceneManagement; - -/* -public class GameManagerRacetrack : MonoBehaviour -{ - #region Inspector Field - [Header("Settings")] - [SerializeField] - private float AnimationTime; - [SerializeField] - private GameModeReference CurrentGameMode; - - - [Header("References")] - [SerializeField] - [Tooltip("Prefab of character for players to play")] - private Character characterPrefab; - - [SerializeField] - private ServerObject server; - - [SerializeField] - private ClientList ClientList; - - #endregion Inspector Field - - - #region Private Variables - private Dictionary playerData; - private GameMode gamemode; - #endregion Private Variables - - #region Read Only - private IEnumerable playerArray { get { return playerData.Values; } } - #endregion Read Only - - public GameObject levelInfo; - public blockSpawn bspawn; - - public void Awake() - { - gamemode = CurrentGameMode.Value; - RegisterHandlers(); - SpawnCharacters(); - ClientList.ForEach(p => p.ChangeScene("ClientScene")); - } - - private void Start() - { - StartCoroutine(displayforSeconds(levelInfo, 5.0f)); - gamemode.GameStart(playerArray.ToArray()); - StartRound(); - } - - private void Update() - { - server.ServerUpdate(); - } - - IEnumerator displayforSeconds(GameObject display, float time) - { - display.SetActive (true); - yield return new WaitForSeconds(time); - display.SetActive (false); - } - - private void RecieveLogicList(NetworkMessage msg) - { - LogicProtocols.LogicMsg logicMsg; - if (!msg.TryRead(out logicMsg)) - return; - - Debug.Log("Recieved function from " + msg.conn.connectionId); - - playerData[msg.conn.connectionId].blockReader.LogicChain = new List(logicMsg.elements); - playerData[msg.conn.connectionId].recievedList = true; - - if (playerData.All(p => p.Value.recievedList)) - DoRoundRoutine(); - } - - private void DoRoundRoutine() - { - Debug.Log("Starting Round"); - StartCoroutine(RoundRoutine()); - } - - private void StartRound() - { - gamemode.RoundStart(playerArray.ToArray()); - LogicProtocols.FloatMsg RoundTime = new LogicProtocols.FloatMsg( gamemode.GetRoundTime()); - bspawn.Spawn(); - playerArray.ForEach(p => p.client.conn.Send(LogicProtocols.SendRoundTime, RoundTime)); - } - - private IEnumerator RoundRoutine() - { - playerArray.ForEach(p => p.recievedList = false); - - //Debug.Log("Doing Round Routine"); - - while (playerArray.Any(p => !p.blockReader.Finished)) - { - //Debug.Log("One Move"); - foreach (PlayerData player in playerArray) - StartCoroutine(RunOnce(player)); - - //wait until all players have finished - yield return new WaitUntil(() => playerArray.All(p => p.waiting)); - - gamemode.FinishedMove(playerArray.ToArray()); - playerArray.ForEach(p => p.client.SendScore()); - - } - - if (gamemode.isGameOver(playerArray.ToArray())) - { - Debug.Log("Game Over"); - SceneManager.LoadScene("ScoreBoards"); - } - - gamemode.RoundEnd(playerArray.ToArray()); - - foreach (PlayerData player in playerArray) - { - player.blockReader.Reset(); - player.waiting = false; - player.client.SendInventory(); - player.client.ChangeScene("ClientScene"); - } - //Debug.Log("Finished Moving"); - - StartRound(); - } - - private void SpawnCharacters() - { - playerData = new Dictionary(); - Block[] SpawnBlocks = FindObjectsOfType().Where(p => p.isSpawnable).ToArray(); - - int spawnIndex = 0; - foreach (ClientData client in ClientList) - { - Character newChar = Instantiate(characterPrefab); - Block startingBlock = SpawnBlocks[(spawnIndex++ % ClientList.ConnectedClients.Count)]; - newChar.Initialise(startingBlock, client.Inventory, client.characterAnimal); - newChar.transform.forward = startingBlock.SpawnDirection.ToVector(); - playerData.Add(client.ID, new PlayerData(newChar,client)); - newChar.ClientLink = client; - client.playerCharacter = newChar; - } - } - - private void RegisterHandlers() - { - server.server.RegisterHandler(LogicProtocols.SendLogicList, RecieveLogicList); - } - - private IEnumerator RunOnce(PlayerData data) - { - data.waiting = false; - bool blockFinished = false; - float waitTime; - while (!blockFinished && !data.blockReader.Finished) - { - //Debug.Log(data.client + "Moving once"); - - if (data.blockReader.CurrentBlock != null && !data.blockReader.CurrentBlock.hasBeenRemoved) - { - data.client.Inventory.Remove(data.blockReader.CurrentBlock); - data.blockReader.CurrentBlock.hasBeenRemoved = true; - } - - blockFinished = data.blockReader.Read(data.character, AnimationTime,out waitTime); - - //Debug.Log("Waiting: " + waitTime); - yield return new WaitForSeconds(waitTime); - gamemode.PlayerMoved(data); - } - data.waiting = true; - } -}*/ diff --git a/Assets/Scripts/Managers/GameManagerRacetrack.cs.meta b/Assets/Scripts/Managers/GameManagerRacetrack.cs.meta deleted file mode 100644 index ce2dbec..0000000 --- a/Assets/Scripts/Managers/GameManagerRacetrack.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 87e8efe34e51a8e439656a3512097f21 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Map Generation/MapManager.cs b/Assets/Scripts/Map Generation/MapManager.cs index 7052f1c..222cb4e 100644 --- a/Assets/Scripts/Map Generation/MapManager.cs +++ b/Assets/Scripts/Map Generation/MapManager.cs @@ -1,10 +1,7 @@ -using Networking.Client; -using Networking.Server; -using System.Collections; +using Networking.Server; using System.Collections.Generic; using UnityEngine; -//public class MapManager : MonoBehaviour [CreateAssetMenu(menuName = "Major Project/Map Generation/Map Manager")] public class MapManager : ScriptableObject { @@ -31,13 +28,6 @@ public class MapManager : ScriptableObject int diffCap = 5; //The highest the difficulty rating can go int difficulty; //Current difficulty rating - /*int diffMin; //Minimum difficulty for a map section to be selected - int diffMax; //Maximum difficulty for a map section to be selected - int diffMinStart = 0; //Initial minimum difficulty for a map section to be selected - int diffMaxStart = 1; //Initial maximum difficulty for a map section to be selected - int diffMinMax = 4; //The highest diffMin can go - ensure that it doesn't go too high to have legal map sections - */ - int widthMin; //The minimum widthIn that we want for a new map section int widthMax; //The maximum widthIn that we want for a new map section int widthMinMin = 3; //The minimum to which widthMin can be reduced @@ -58,13 +48,6 @@ public class MapManager : ScriptableObject } } - //Debug.Log("sections.Count = " + sections.Count); - - foreach (MapSection section in sections) - { - //Debug.Log("Possible section: " + section.name); - } - initialPlayerCount = clients.ConnectedClients.Count; activeSections = new List(); @@ -90,22 +73,8 @@ public class MapManager : ScriptableObject widthMin = activeSections[0].widthOut - 2; widthMax = activeSections[0].widthOut + 2; - difficulty = diffStart; - //Set the maximum possible diffMin value to 1 less than the highest difficulty on the section list - /*diffMinMax = 0; - - foreach (MapSection section in sections) - { - if (section.difficulty > diffMinMax) - { - diffMinMax = section.difficulty; - } - } - - diffMinMax--;*/ - switch (initialPlayerCount) { case 2: @@ -157,7 +126,6 @@ public class MapManager : ScriptableObject } break; } - checkForward(); } @@ -168,7 +136,6 @@ public class MapManager : ScriptableObject updateCriteria(); //We update the section selection criteria for the current gamestate - Debug.Log("Sections length:" + sections.Count); int count = -1; foreach (MapSection section in sections) @@ -176,7 +143,6 @@ public class MapManager : ScriptableObject count++; if (section == null) { - Debug.Log("Section is empty [" + count + "]"); continue; } @@ -190,20 +156,8 @@ public class MapManager : ScriptableObject } } } - //Having generated our list, we choose a random segment from it - - foreach (MapSection section in validSections) - { - //Debug.Log("Valid section: " + section.name); - }/**/ - - //Debug.Log("Choosing section"); - MapSection nextSection = validSections[(int)Random.Range(0.0f, (float)validSections.Count)]; - - //Debug.Log("Chosen section: " + nextSection.name); - addSection(nextSection); } @@ -212,7 +166,6 @@ public class MapManager : ScriptableObject //Instantiate new section at x = endX Vector3 pos = new Vector3(endX, 0.0f, 0.0f); GameObject newSection = (GameObject)Instantiate(section.gameObject, pos, Quaternion.identity); - //GameObject.Instantiate(section.gameObject, pos, Quaternion.identity); MapSection newSectionScript = newSection.GetComponent(); @@ -233,64 +186,40 @@ public class MapManager : ScriptableObject bool checkSegments(MapSection first, MapSection second) { int connections = 0; - - //Debug.Log("Checking " + first.name + ", " + second.name); - //No more than one link section in a row if (first.length == 1 && second.length == 1) { return false; } - //if (second.difficulty < diffMin || second.difficulty > diffMax) if (second.difficultyMax < difficulty || second.difficultyMin > difficulty) //Check that we're in the right difficulty range for this section { - //Debug.Log("Difficulty = " + difficulty + ", max = " + second.difficultyMax + ", min = " + second.difficultyMin); return false; } if (second.widthIn < widthMin || second.widthIn > widthMax) //And that it's in the right width range { - //Debug.Log("width = " + second.widthIn + ", max = " + widthMin + ", min = " + widthMax); return false; } - ////Debug.Log("Checking sections: first = " + first.name + ", second = " + second.name); - foreach (GameObject exit in first.exits) { foreach (GameObject entry in second.entrances) { - //Debug.Log("Checking connections: exit = " + exit.transform.localPosition.z + ", " + exit.transform.localPosition.x+ ", entry = " + entry.transform.localPosition.z + ", " + entry.transform.localPosition.x);/**/ if (checkConnection(exit, entry)) { connections++; } } } - - ////Debug.Log("Connections = " + connections); - - if (connections >= minConns) - { - ////Debug.Log("Valid section!"); - } - else - { - ////Debug.Log("Invalid section!"); - } - return (connections >= minConns); } bool checkConnection(GameObject exit, GameObject entry) { - /*//Debug.Log("Checking connections: exit = " + exit.transform.localPosition.z + ", " + exit.transform.localPosition.x - + ", entry = " + entry.transform.localPosition.z + ", " + entry.transform.localPosition.x);*/ //If the squares being checked don't line up, the connection is invalid if (exit.transform.localPosition.z != entry.transform.localPosition.z) { - ////Debug.Log(exit.transform.localPosition.z + " != " + entry.transform.localPosition.z); return false; } @@ -298,23 +227,14 @@ public class MapManager : ScriptableObject //It's technically possible to cross two water blocks, but we don't count that if (requiresJump(exit) && requiresJump(entry)) { - ////Debug.Log("Invalid connection - both water"); return false; } - ////Debug.Log("Exit.is_Walkable = " + exit.GetComponent().is_Walkable + ", Entry.is_Walkable = " + entry.GetComponent().is_Walkable); - //Since we currently don't let people jump over walls, if either block is a wall, the connection is invalid if (isWall(exit) || isWall(entry)) { - ////Debug.Log("Invalid connection - not walkable"); return false; } - - ////Debug.Log("Exit.isWater = " + exit.GetComponent().isWater + ", Entry.isWater = " + entry.GetComponent().isWater); - - ////Debug.Log("Valid connection!"); - //If we've passed all these tests, the connection is valid! return true; } @@ -349,7 +269,6 @@ public class MapManager : ScriptableObject if (checkView(trackEnd)) { chooseNextSection(); - //spawn.GetComponent().wakeup(); checkForward(); } } @@ -368,7 +287,6 @@ public class MapManager : ScriptableObject spawn.GetComponent().updatePositions((int)startX); activeSections[0].destroySection(); activeSections.RemoveAt(0); - } } @@ -409,39 +327,21 @@ public class MapManager : ScriptableObject { if (clients.ConnectedClients.Count <= (float)(0.5f * initialPlayerCount)) { - //Debug.Log("Initial players = " + initialPlayerCount + ", current players = " + clients.ConnectedClients.Count + ", player count at half or below"); difficulty++; - widthMin -= 2; widthMax -= 2; } if (clients.ConnectedClients.Count <= (float)(0.33f * initialPlayerCount)) { - //Debug.Log("Initial players = " + initialPlayerCount + ", current players = " + clients.ConnectedClients.Count + ", player count below 33%"); difficulty += 2; - widthMin -= 2; widthMax -= 2; } } - //Ramp up the difficulty as the track extends difficulty += ((int)endX - (int)startX) / 7; - /*diffMin += (totalSections - 2) / 2; - diffMax += totalSections / 2;*/ - - //Dropping the difficulty-based track narrowing for now - we have wide sections designed to be hard, we want them to show up - - //Once the difficulty has ramped up, we cause the track to steadily narrow - //It can no longer widen, only remain constant or shrink - //if (diffMin > 2) - /*if (difficulty > 2) - { - widthMax--; - }*/ - //Apply caps if (difficulty > diffCap) { diff --git a/Assets/Scripts/Map Generation/MapSection.cs b/Assets/Scripts/Map Generation/MapSection.cs index c84ebed..039395c 100644 --- a/Assets/Scripts/Map Generation/MapSection.cs +++ b/Assets/Scripts/Map Generation/MapSection.cs @@ -1,5 +1,4 @@ -using System.Collections; -using System.Collections.Generic; +using System.Collections.Generic; using UnityEngine; public class MapSection : MonoBehaviour @@ -31,11 +30,6 @@ public class MapSection : MonoBehaviour public List collectableSpawns; //Which blocks can items spawn on? - // Start is called before the first frame update - void Start() - { - } - public void InitSection() { size = widthMax * length; @@ -58,15 +52,6 @@ public class MapSection : MonoBehaviour public void destroySection() { - /*foreach (GameObject block in blocks) - { - Object.Destroy(block); - }*/ - - /*Debug.Log("Destroying section " + name + ", position = " + transform.position.x + ", " + transform.position.y + ", " + transform.position.z); - gameObject.transform.position = new Vector3(0.0f, 0.0f, 1000.0f);*/ - //Debug.Log("Destroying section " + name + ", position = " + transform.position.x + ", " + transform.position.y + ", " + transform.position.z); - //gameObject.SetActive(false); Destroy(gameObject, 0.0f); } } diff --git a/Assets/Scripts/Map Generation/SectionList.cs b/Assets/Scripts/Map Generation/SectionList.cs index 9e441ba..d7248f0 100644 --- a/Assets/Scripts/Map Generation/SectionList.cs +++ b/Assets/Scripts/Map Generation/SectionList.cs @@ -1,5 +1,4 @@ -using System.Collections; -using System.Collections.Generic; +using System.Collections.Generic; using UnityEngine; [CreateAssetMenu(menuName = "Major Project/Map Generation/Section List")] diff --git a/Assets/Scripts/Map Generation/TestGenerator.cs b/Assets/Scripts/Map Generation/TestGenerator.cs index c5bda83..6bf9f63 100644 --- a/Assets/Scripts/Map Generation/TestGenerator.cs +++ b/Assets/Scripts/Map Generation/TestGenerator.cs @@ -1,12 +1,9 @@ -using System.Collections; -using System.Collections.Generic; -using UnityEngine; +using UnityEngine; public class TestGenerator : MonoBehaviour { public MapManager manager; - // Start is called before the first frame update void Start() { manager.init(); diff --git a/Assets/Scripts/NetworkOutput.cs b/Assets/Scripts/NetworkOutput.cs index 975a8f8..360f904 100644 --- a/Assets/Scripts/NetworkOutput.cs +++ b/Assets/Scripts/NetworkOutput.cs @@ -1,7 +1,4 @@ -using System.Collections; -using System.Collections.Generic; -using UnityEngine; -using UnityEngine.Networking; +using UnityEngine; using Networking.Client; using Networking; @@ -16,7 +13,6 @@ public class NetworkOutput : MonoBehaviour public void SendList() { LogicProtocols.LogicMsg msg = new LogicProtocols.LogicMsg(Tray.reader.LogicChain.ToArray()); - Debug.Log("sending on " + LogicProtocols.SendLogicList); Client.client.SendByChannel(LogicProtocols.SendLogicList, msg,TransportConfigure.ReliableFragmented); } diff --git a/Assets/Scripts/Networking/Client/ClientLoginManager.cs b/Assets/Scripts/Networking/Client/ClientLoginManager.cs index 71eb702..eb3095c 100644 --- a/Assets/Scripts/Networking/Client/ClientLoginManager.cs +++ b/Assets/Scripts/Networking/Client/ClientLoginManager.cs @@ -1,15 +1,11 @@ -using System.Collections; -using System.Collections.Generic; -using UnityEngine; +using UnityEngine; using UnityEngine.Networking; namespace Networking.Client { - public class ClientLoginManager : MonoBehaviour { #region Inspector Fields - [Header("Connection Settings")] [SerializeField] @@ -51,18 +47,11 @@ namespace Networking.Client #endregion Inspector Fields #region Events - public System.Action OnConnectedToServer; public System.Action OnLoginSucess; public System.Action OnLoginFail; - #endregion Events - #region Private variables - - #endregion Private variables - - // Start is called before the first frame update private void Awake() { if (StartClientOnAwake) @@ -80,7 +69,6 @@ namespace Networking.Client Client.client.UnregisterHandler(LoginProtocols.RequestLoginDetails); } - public void StartClient(string ipAddress, int port) { Client.Connect(ipAddress, Port); @@ -142,6 +130,5 @@ namespace Networking.Client Client.Stop(); } - } -} \ No newline at end of file +} diff --git a/Assets/Scripts/Networking/Client/ClientObject.cs b/Assets/Scripts/Networking/Client/ClientObject.cs index 5c1013c..ce9e5b3 100644 --- a/Assets/Scripts/Networking/Client/ClientObject.cs +++ b/Assets/Scripts/Networking/Client/ClientObject.cs @@ -1,6 +1,4 @@ -using System.Collections; -using System.Collections.Generic; -using UnityEngine; +using UnityEngine; using UnityEngine.Networking; namespace Networking.Client @@ -8,7 +6,6 @@ namespace Networking.Client [CreateAssetMenu(menuName = "Major Project/Networking/ClientObject", order = 150)] public class ClientObject : ScriptableObject { - #region Inspector Fields [Header("Connection Settings")] [SerializeField] @@ -56,7 +53,6 @@ namespace Networking.Client [SerializeField] [Tooltip("A list of all connected clients")] public ConnectedClients ConnectedClients; - #endregion Inspector Fields #region ReadOnly Variables diff --git a/Assets/Scripts/Networking/Client/ClientOutputManager.cs b/Assets/Scripts/Networking/Client/ClientOutputManager.cs index a11f8fd..0f37540 100644 --- a/Assets/Scripts/Networking/Client/ClientOutputManager.cs +++ b/Assets/Scripts/Networking/Client/ClientOutputManager.cs @@ -1,18 +1,12 @@ -using System.Collections; -using System.Collections.Generic; -using UnityEngine; +using UnityEngine; public class ClientOutputManager : MonoBehaviour { - // Start is called before the first frame update void Start() { - } - // Update is called once per frame void Update() - { - + { } } diff --git a/Assets/Scripts/Networking/Client/ConnectedClients.cs b/Assets/Scripts/Networking/Client/ConnectedClients.cs index 9c7e062..890601d 100644 --- a/Assets/Scripts/Networking/Client/ConnectedClients.cs +++ b/Assets/Scripts/Networking/Client/ConnectedClients.cs @@ -1,13 +1,9 @@ -using System.Collections; -using System.Collections.Generic; -using System.Linq; +using System.Collections.Generic; using UnityEngine; using UnityEngine.Networking; -using Networking; namespace Networking.Client { - [CreateAssetMenu(menuName = "Major Project/Networking/Client/OtherClientsList", order = 150)] public class ConnectedClients : ScriptableObject { @@ -38,7 +34,6 @@ namespace Networking.Client client.client.RegisterHandler(LoginProtocols.OtherClientDisconnected, OnClientDisconnect); } - public void Reset() { AllClients = new List(); @@ -46,7 +41,6 @@ namespace Networking.Client OnClientsChange?.Invoke(AllClients); } - public void OnClientConnect(NetworkMessage msg) { LoginProtocols.LoginMsg loginMsg; @@ -67,11 +61,8 @@ namespace Networking.Client AllClients.RemoveAll(p => (p.Name == loginMsg.Name) && (p.Color == loginMsg.Color) && (p.characterAnimal == loginMsg.Animal)); OnClientsChange?.Invoke(AllClients); } - - } - [System.Serializable] public class ClientData { @@ -98,5 +89,4 @@ namespace Networking.Client this.characterAnimal = msg.Animal; } } - } diff --git a/Assets/Scripts/Networking/Core/Protocols/LogicProtocols.cs b/Assets/Scripts/Networking/Core/Protocols/LogicProtocols.cs index eb1a220..4b25655 100644 --- a/Assets/Scripts/Networking/Core/Protocols/LogicProtocols.cs +++ b/Assets/Scripts/Networking/Core/Protocols/LogicProtocols.cs @@ -1,11 +1,7 @@ -using System.Collections; -using System.Collections.Generic; -using UnityEngine; -using UnityEngine.Networking; +using UnityEngine.Networking; namespace Networking { - public class LogicProtocols { public const short SendLogicList = 200; @@ -15,10 +11,8 @@ namespace Networking public const short SendScore = 205; public const short SendLives = 204; - public class LogicMsg : MessageBase { - public LogicBlock[] elements; public LogicMsg() { } @@ -54,8 +48,6 @@ namespace Networking elements[i] = token.ToLogicBlock(); } } - - } public class InventoryMsg : MessageBase @@ -130,7 +122,6 @@ namespace Networking public class StringMsg : MessageBase { - public float String; public StringMsg() { } @@ -155,7 +146,6 @@ namespace Networking public class EmptyMsg : MessageBase { - } } -} \ No newline at end of file +} diff --git a/Assets/Scripts/PortalSetup.cs b/Assets/Scripts/PortalSetup.cs index 7e8b78b..c8ad935 100644 --- a/Assets/Scripts/PortalSetup.cs +++ b/Assets/Scripts/PortalSetup.cs @@ -1,9 +1,7 @@ using System.Collections; using System.Collections.Generic; using UnityEngine; -using UnityEngine.Networking; using Networking.Server; -using Networking; public class PortalSetup : MonoBehaviour { diff --git a/Assets/Scripts/Projectiles/HomingMissile.cs b/Assets/Scripts/Projectiles/HomingMissile.cs index 1ad71f8..a978f86 100644 --- a/Assets/Scripts/Projectiles/HomingMissile.cs +++ b/Assets/Scripts/Projectiles/HomingMissile.cs @@ -1,6 +1,4 @@ using System.Collections; -using System.Collections.Generic; -using System.Linq; using UnityEngine; using Networking.Server; @@ -9,11 +7,8 @@ public class HomingMissile : Projectile [SerializeField] ClientList Clients; - - public override IEnumerator ProjectileLogic(Character player, float animationTime, Vector3 direction) { - Character target = findPlayer(player); yield return StartCoroutine(LerpTo(transform.position + Vector3.up * 2, 0.5f)); @@ -39,7 +34,6 @@ public class HomingMissile : Projectile yield return StartCoroutine(player.CurrentBlock.DoPush(player, possibleDirections[i].ToVector())); break; } - } private Character findPlayer(Character thisCharacter) @@ -57,7 +51,6 @@ public class HomingMissile : Projectile if (retVal.transform.position.x <= client.playerCharacter.transform.position.x) retVal = client.playerCharacter; } - return retVal; } @@ -73,11 +66,7 @@ public class HomingMissile : Projectile transform.LookAt(endPosition, Vector3.up); yield return new WaitForEndOfFrame(); elapsedTime += Time.deltaTime; - - } - transform.position = endPosition; - } } diff --git a/Assets/Scripts/Projectiles/Hookshot.cs b/Assets/Scripts/Projectiles/Hookshot.cs index 507c75a..a53c503 100644 --- a/Assets/Scripts/Projectiles/Hookshot.cs +++ b/Assets/Scripts/Projectiles/Hookshot.cs @@ -1,10 +1,8 @@ using System.Collections; -using System.Collections.Generic; using UnityEngine; public class Hookshot : Projectile { - [SerializeField] private Transform hookObject; @@ -14,7 +12,6 @@ public class Hookshot : Projectile [SerializeField] private LineRenderer line; - public override IEnumerator ProjectileLogic(Character player, float animationTime, Vector3 direction) { Block hitBlock = GetEndBlock(player.CurrentBlock, direction, ~player.Ignore); @@ -25,7 +22,6 @@ public class Hookshot : Projectile yield return StartCoroutine(lerpShot(hookObject, hookObject.position, hookObject.position + direction*10, 1.0f)); yield break; } - yield return StartCoroutine(lerpShot(hookObject, player.transform.position, hitBlock.VisualPosition, ShotSpeed * Vector3.Distance(player.transform.position,hitBlock.VisualPosition)/10)); @@ -71,15 +67,12 @@ public class Hookshot : Projectile { return Block.GetOrCreateBlockAtPosition(position - direction, 1, layerMask); } - } - return retVal; } private IEnumerator lerpShot(Transform target, Vector3 startPosition, Vector3 endPosition, float time) { - float elapsedTime = 0; while (elapsedTime < time) @@ -90,7 +83,6 @@ public class Hookshot : Projectile yield return new WaitForEndOfFrame(); elapsedTime += Time.deltaTime; } - target.position = endPosition; } } diff --git a/Assets/Scripts/Projectiles/Projectile.cs b/Assets/Scripts/Projectiles/Projectile.cs index 301aac1..16c1562 100644 --- a/Assets/Scripts/Projectiles/Projectile.cs +++ b/Assets/Scripts/Projectiles/Projectile.cs @@ -1,5 +1,4 @@ using System.Collections; -using System.Collections.Generic; using UnityEngine; public abstract class Projectile : MonoBehaviour diff --git a/Assets/Scripts/Traps/ConveyorBelt.cs b/Assets/Scripts/Traps/ConveyorBelt.cs index 42812ea..b33fda6 100644 --- a/Assets/Scripts/Traps/ConveyorBelt.cs +++ b/Assets/Scripts/Traps/ConveyorBelt.cs @@ -1,8 +1,5 @@ using System.Collections; -using System.Collections.Generic; using UnityEngine; -using Networking.Client; -using Networking.Server; public class ConveyorBelt : ActiveBlock { @@ -10,7 +7,6 @@ public class ConveyorBelt : ActiveBlock [SerializeField] public LogicBlock Action; - public override int GetInitative() { return 5; diff --git a/Assets/Scripts/Traps/CrushingBoulder.cs b/Assets/Scripts/Traps/CrushingBoulder.cs index ab188f6..087dbd2 100644 --- a/Assets/Scripts/Traps/CrushingBoulder.cs +++ b/Assets/Scripts/Traps/CrushingBoulder.cs @@ -1,26 +1,23 @@ using System.Collections; -using System.Collections.Generic; using TMPro; using UnityEngine; public class CrushingBoulder : ActiveBlock { - public int countdowntimer; + int countdowntimer; public TextMeshPro counter; - int countdown; + public int countdown; public override int GetInitative() { return 3; } - private void Start() - { - countdown = countdowntimer; - } + private void Update() { counter.text = countdown.ToString(); } + public override IEnumerator OnEnvironmentTurn(PlayerData[] allPlayers) { countdown--; diff --git a/Assets/Scripts/Traps/CubeWithCrystals.cs b/Assets/Scripts/Traps/CubeWithCrystals.cs index f6384d7..4d1059b 100644 --- a/Assets/Scripts/Traps/CubeWithCrystals.cs +++ b/Assets/Scripts/Traps/CubeWithCrystals.cs @@ -1,5 +1,4 @@ using System.Collections; -using System.Collections.Generic; using UnityEngine; public class CubeWithCrystals : ActiveBlock @@ -17,7 +16,6 @@ public class CubeWithCrystals : ActiveBlock yield return new WaitForSeconds(1.0f); StartCoroutine(ShrinkCoroutine()); isFinished = true; - //yield break; } IEnumerator GrowCoroutine() diff --git a/Assets/Scripts/Traps/FloatingOnWater.cs b/Assets/Scripts/Traps/FloatingOnWater.cs index 66d6644..78a6153 100644 --- a/Assets/Scripts/Traps/FloatingOnWater.cs +++ b/Assets/Scripts/Traps/FloatingOnWater.cs @@ -14,11 +14,6 @@ public class FloatingOnWater : MonoBehaviour public bool triggeranimate; public bool triggeranimate1; - private void Update() - { - - } - private void Start() { for(int i = 0; i < clientData.ConnectedClients.Count; i++) diff --git a/Assets/Scripts/Traps/InGroundTrap.cs b/Assets/Scripts/Traps/InGroundTrap.cs index 5c6a891..c1fc5cb 100644 --- a/Assets/Scripts/Traps/InGroundTrap.cs +++ b/Assets/Scripts/Traps/InGroundTrap.cs @@ -1,6 +1,4 @@ using System.Collections; -using System.Collections.Generic; -using UnityEngine; public class InGroundTrap : ActiveBlock { diff --git a/Assets/Scripts/Traps/ShootingCannon.cs b/Assets/Scripts/Traps/ShootingCannon.cs index 53d7811..6dbdac5 100644 --- a/Assets/Scripts/Traps/ShootingCannon.cs +++ b/Assets/Scripts/Traps/ShootingCannon.cs @@ -3,7 +3,6 @@ using System.Collections.Generic; using TMPro; using UnityEngine; - public class ShootingCannon : ActiveBlock { [Header("Cannon Settings")] @@ -21,15 +20,10 @@ public class ShootingCannon : ActiveBlock return 4; } - private void Start() - { - //countdown = countdowntimer; - } private void Update() { counter.text = countdown.ToString(); counter2.text = countdown.ToString(); - } public override IEnumerator OnEnvironmentTurn(PlayerData[] allPlayers) @@ -37,11 +31,9 @@ public class ShootingCannon : ActiveBlock if (countdown > 0) { countdown--; - isFinished = true; yield break; } - countdown = countdowntimer; Vector3 bulletPosition; @@ -55,7 +47,6 @@ public class ShootingCannon : ActiveBlock StartCoroutine(player.MoveToBlock(moveToBlock, Character.Animation.Hit, 1)); } - StartCoroutine(lerpShot(bulletPosition, Vector3.Distance(spawnLocation.position,bulletPosition)/15)); if (hitPlayers.Length > 0) @@ -65,10 +56,8 @@ public class ShootingCannon : ActiveBlock yield break; } - private Character[] getHitPlayers(out Vector3 endPosition) { - Vector3 curPos; List retVal = new List(); Block hit; diff --git a/Assets/Scripts/Tutorial/TutorialSetup.cs b/Assets/Scripts/Tutorial/TutorialSetup.cs index 817aa08..a372b32 100644 --- a/Assets/Scripts/Tutorial/TutorialSetup.cs +++ b/Assets/Scripts/Tutorial/TutorialSetup.cs @@ -1,14 +1,11 @@ using System.Collections; -using System.Collections.Generic; using UnityEngine; public class TutorialSetup : MonoBehaviour { - public Character character; public InventoryUI inventoryUI; - // Start is called before the first frame update void Start() { StartCoroutine(wait(0.1f, new System.Action(LastStart))); @@ -24,5 +21,4 @@ public class TutorialSetup : MonoBehaviour yield return new WaitForSeconds(time); callback(); } - } diff --git a/Assets/Scripts/UI/BagItem.cs b/Assets/Scripts/UI/BagItem.cs index 8f54453..a4efbfd 100644 --- a/Assets/Scripts/UI/BagItem.cs +++ b/Assets/Scripts/UI/BagItem.cs @@ -1,8 +1,4 @@ -using System.Collections; -using System.Collections.Generic; -using UnityEngine; -using UnityEngine.EventSystems; -using TMPro; +using UnityEngine; using UnityEngine.UI; public class BagItem : LogicElementHolder @@ -22,12 +18,7 @@ public class BagItem : LogicElementHolder private Text CountText1; #endregion Private Variables - #region Read Only - - #endregion Read Only - #region Class Functionality - public void Initialise(Inventory.Data data) { InventoryData = data; @@ -50,10 +41,8 @@ public class BagItem : LogicElementHolder else CountText1.text = "∞"; } - #endregion Class Functionality - #region LogicElementHolder Implementation /// /// When a logicElement needs to be added back to this holder @@ -83,9 +72,7 @@ public class BagItem : LogicElementHolder LogicElementUI logicElement = Instantiate(LogicElementPrefab.gameObject, LogicElementLocation).GetComponent(); logicElement.Initialise(InventoryData.element, this,true); - UpdateUI(); - } /// @@ -106,9 +93,5 @@ public class BagItem : LogicElementHolder { } - - - #endregion LogicElementHolder Implementation - } diff --git a/Assets/Scripts/UI/ColourSquareCollection.cs b/Assets/Scripts/UI/ColourSquareCollection.cs index aaed621..132bb6b 100644 --- a/Assets/Scripts/UI/ColourSquareCollection.cs +++ b/Assets/Scripts/UI/ColourSquareCollection.cs @@ -1,6 +1,4 @@ -using System.Collections; -using System.Collections.Generic; -using UnityEngine; +using UnityEngine; using TMPro; using UnityEngine.UI; @@ -16,14 +14,12 @@ public class ColourSquareCollection : MonoBehaviour void Start(){ //have to first get colour from player, hard code purple in at the moment - colourCube.GetComponent().color = currentPlayerColour; objs = GameObject.FindGameObjectsWithTag("Coloured"); counter = 1; counterScore.GetComponent().text = counter.ToString(); } - // Update is called once per frame public void colourupdatefromMove() { counter = 1; @@ -36,4 +32,4 @@ public class ColourSquareCollection : MonoBehaviour } counterScore.GetComponent().text = counter.ToString(); } -} \ No newline at end of file +} diff --git a/Assets/Scripts/UI/ComplexLogicElementUI.cs b/Assets/Scripts/UI/ComplexLogicElementUI.cs index 3b556f5..bcfc51f 100644 --- a/Assets/Scripts/UI/ComplexLogicElementUI.cs +++ b/Assets/Scripts/UI/ComplexLogicElementUI.cs @@ -1,19 +1,9 @@ -using System.Collections; -using System.Collections.Generic; -using UnityEngine; - -public class ComplexLogicElementUI : LogicElementUI +public class ComplexLogicElementUI : LogicElementUI { public CombinedBlock combinedFunction { get { return LogicElement as CombinedBlock; } } - public override void UpdateUI() { base.UpdateUI(); - //transform.localScale += Vector3.right * LogicElement.Size(); } - - - - } diff --git a/Assets/Scripts/UI/Dragable.cs b/Assets/Scripts/UI/Dragable.cs index 6359253..7d32938 100644 --- a/Assets/Scripts/UI/Dragable.cs +++ b/Assets/Scripts/UI/Dragable.cs @@ -68,5 +68,4 @@ public class Dragable : MonoBehaviour, IBeginDragHandler, IDragHandler, IEndDrag } protected virtual void OnDoubleClick() { } - -} \ No newline at end of file +} diff --git a/Assets/Scripts/UI/ILogicElementHolder.cs b/Assets/Scripts/UI/ILogicElementHolder.cs index 7b2aa74..720455b 100644 --- a/Assets/Scripts/UI/ILogicElementHolder.cs +++ b/Assets/Scripts/UI/ILogicElementHolder.cs @@ -1,14 +1,11 @@ -using System.Collections; -using System.Collections.Generic; +using System.Collections.Generic; using UnityEngine; - /// /// Class which component which an LogicElementUI can be dragged into should derive from /// public abstract class LogicElementHolder : MonoBehaviour { - /// /// List of all Holders in scene /// @@ -17,7 +14,6 @@ public abstract class LogicElementHolder : MonoBehaviour [Tooltip("An Element with a higher priority will be used if two object overlap")] public int Priority = 0; - #region Unity Functions protected virtual void OnEnable() { @@ -67,15 +63,12 @@ public abstract class LogicElementHolder : MonoBehaviour /// element which was double clicked public abstract void OnDoubleClick(LogicElementUI element); - /// /// Called to check if this holder can hold the provided element; /// /// element to check if it can hold /// returns true if this can hold the element public virtual bool canHold(LogicBlock element) { return true; } - - #endregion Class Funtions #region Static Functions @@ -97,15 +90,12 @@ public abstract class LogicElementHolder : MonoBehaviour if (rect.Overlaps(holderRect)) retVal.Add(holder); } - return retVal.ToArray(); } - public static void DebugDrawAll(Color color, float duration = 0.0f, bool depthTest = false) { EnabledHolders.ForEach(p => DebugExtensions.DrawRect(p.transform as RectTransform, color,duration, depthTest)); } - #endregion } diff --git a/Assets/Scripts/UI/InventoryCatch.cs b/Assets/Scripts/UI/InventoryCatch.cs index 4cf4489..87b7b2f 100644 --- a/Assets/Scripts/UI/InventoryCatch.cs +++ b/Assets/Scripts/UI/InventoryCatch.cs @@ -1,6 +1,4 @@ -using System.Collections; -using System.Collections.Generic; -using System.Linq; +using System.Linq; using UnityEngine; public class InventoryCatch : LogicElementHolder @@ -8,12 +6,10 @@ public class InventoryCatch : LogicElementHolder [SerializeField] private InventoryUI InventoryUI; - public override void OnAdd(LogicElementUI element) { foreach (LogicBlock block in element.logicElement.GetAllBlocks()) { - BagItem item = InventoryUI.content.FirstOrDefault(p => p.canHold(block)); if (item != default) diff --git a/Assets/Scripts/UI/InventoryUI.cs b/Assets/Scripts/UI/InventoryUI.cs index 350a354..7ad58bb 100644 --- a/Assets/Scripts/UI/InventoryUI.cs +++ b/Assets/Scripts/UI/InventoryUI.cs @@ -1,10 +1,8 @@ -using System.Collections; -using System.Collections.Generic; +using System.Collections.Generic; using UnityEngine; public class InventoryUI : MonoBehaviour { - public Inventory inventory; [SerializeField] @@ -15,7 +13,6 @@ public class InventoryUI : MonoBehaviour public List content { get; private set; } - private void Start() { UpdateUI(); @@ -46,6 +43,4 @@ public class InventoryUI : MonoBehaviour content.Add(item); } } - - } diff --git a/Assets/Scripts/UI/LeadPlayerUI.cs b/Assets/Scripts/UI/LeadPlayerUI.cs index a3a134a..94468ed 100644 --- a/Assets/Scripts/UI/LeadPlayerUI.cs +++ b/Assets/Scripts/UI/LeadPlayerUI.cs @@ -1,6 +1,4 @@ -using System.Collections; -using System.Collections.Generic; -using System.Linq; +using System.Linq; using UnityEngine; using UnityEngine.UI; using Networking.Server; @@ -39,7 +37,4 @@ public class LeadPlayerUI : MonoBehaviour ScoreText.text = lead.Lives.ToString(); ColorImage.color = lead.Color; } - - - } diff --git a/Assets/Scripts/UI/LocalUIManager.cs b/Assets/Scripts/UI/LocalUIManager.cs index 79bf2b1..52383cd 100644 --- a/Assets/Scripts/UI/LocalUIManager.cs +++ b/Assets/Scripts/UI/LocalUIManager.cs @@ -1,10 +1,5 @@ -using System.Collections; -using System.Collections.Generic; -using UnityEngine; - -public class LocalUIManager : PlayerUIManager +public class LocalUIManager : PlayerUIManager { - public BlockInput characterInput; protected override void Awake() diff --git a/Assets/Scripts/UI/LogicElementUI.cs b/Assets/Scripts/UI/LogicElementUI.cs index 0a9843f..a45ab2b 100644 --- a/Assets/Scripts/UI/LogicElementUI.cs +++ b/Assets/Scripts/UI/LogicElementUI.cs @@ -1,5 +1,4 @@ -using System.Collections; -using System.Collections.Generic; +using System.Collections.Generic; using System.Linq; using UnityEngine; using UnityEngine.EventSystems; @@ -40,7 +39,6 @@ public class LogicElementUI : Dragable private List lastHover = new List(); #endregion Private Variables - #region Unity Functions private void Start() { @@ -87,16 +85,13 @@ public class LogicElementUI : Dragable } #endregion Class Implementation - #region Drag Implementation - public override void OnBeginDrag(PointerEventData eventData) { base.OnBeginDrag(eventData); if (currentHolder != null) currentHolder.OnRemove(this); - } public override void OnDrag(PointerEventData data) @@ -130,7 +125,6 @@ public class LogicElementUI : Dragable //Call OnHoverStop to each element we are hovering over lastHover.ForEach(p => p.OnHoverEnd(this)); - //order the UIHolders by priority and get the first which will accept this lastHover = lastHover.OrderByDescending(p => p.Priority).ToList(); @@ -146,7 +140,6 @@ public class LogicElementUI : Dragable } else currentHolder.OnAdd(this); - } protected override void OnDoubleClick() @@ -155,5 +148,4 @@ public class LogicElementUI : Dragable currentHolder.OnDoubleClick(this); } #endregion Drag Implementaion - } diff --git a/Assets/Scripts/UI/LogicTrayUI.cs b/Assets/Scripts/UI/LogicTrayUI.cs index 245a564..97d2257 100644 --- a/Assets/Scripts/UI/LogicTrayUI.cs +++ b/Assets/Scripts/UI/LogicTrayUI.cs @@ -1,14 +1,10 @@ -using System.Collections; -using System.Collections.Generic; +using System.Collections.Generic; using UnityEngine; using TMPro; using UnityEngine.UI; public class LogicTrayUI : LogicElementHolder { - - //[SerializeField] - //protected List list; [SerializeField] protected LogicElementUI Prefab; [SerializeField] @@ -35,12 +31,8 @@ public class LogicTrayUI : LogicElementHolder #region Unity Functions public void Start() { - readerQueue.Add(new QueueData(reader, border.color)); - UpdateDisplay(); - - } protected override void OnEnable() @@ -77,17 +69,10 @@ public class LogicTrayUI : LogicElementHolder QueueData lastData = readerQueue[readerQueue.Count - 1]; readerQueue.RemoveAt(readerQueue.Count - 1); - //lastData.block.blockReader.LogicChain = new List(lastData.reader.LogicChain); - - - border.color = readerQueue[readerQueue.Count - 1].color; - // readerQueue[readerQueue.Count - 1].reader.LogicChain = new List(reader.LogicChain); SetBlockReader(readerQueue[readerQueue.Count - 1].reader); - - - UpdateDisplay(); + UpdateDisplay(); } [ContextMenu("Update Display")] @@ -123,16 +108,11 @@ public class LogicTrayUI : LogicElementHolder elementObject.GetComponentInChildren().text = "X"; elementObject.GetComponentInChildren().color = new Color(1.0f, 0.25f, 0.25f, 0.5f); } - //Set sibling index to where we want it in list + add destroyedCount since technically they are still here elementObject.transform.SetSiblingIndex(destroyedCount + insertIndex); } - playButton.SetActive(readerQueue.Count <= 1); returnButton.SetActive(readerQueue.Count > 1); - - - } #region LogicElementHolder Implementation @@ -225,19 +205,13 @@ public class LogicTrayUI : LogicElementHolder { return readerQueue[0].reader.Length < maxLength; } - #endregion LogicElementHolder Implementation - - #region Helper Functions - public int GetInsertIndex(RectTransform rt, Vector2 offset) { - Rect rect = rt.rect; rect.center += offset; - rect = rt.TransformRect(rect); DebugExtensions.DrawRect(rect, Color.green); @@ -257,7 +231,6 @@ public class LogicTrayUI : LogicElementHolder { return GetInsertIndex(rt, Vector2.zero); } - #endregion Helper Functions [System.Serializable] @@ -272,5 +245,4 @@ public class LogicTrayUI : LogicElementHolder this.reader = reader; } } - } diff --git a/Assets/Scripts/UI/MoveAndFade.cs b/Assets/Scripts/UI/MoveAndFade.cs index 9da3da7..17d5d92 100644 --- a/Assets/Scripts/UI/MoveAndFade.cs +++ b/Assets/Scripts/UI/MoveAndFade.cs @@ -1,12 +1,10 @@ using System.Collections; -using System.Collections.Generic; using UnityEngine; using TMPro; [RequireComponent(typeof(TextMeshPro))] public class MoveAndFade : MonoBehaviour { - [SerializeField] private float AnimationTime; @@ -17,10 +15,8 @@ public class MoveAndFade : MonoBehaviour [SerializeField] private AnimationCurve FadeCurve; - private TextMeshPro text; - private void Start() { text = GetComponent(); @@ -29,7 +25,6 @@ public class MoveAndFade : MonoBehaviour private IEnumerator FadeAndMove() { - Vector3 startPoint = transform.position; Vector3 endPoint = transform.position + EndPoint; float startAlpha = text.color.a; @@ -38,7 +33,6 @@ public class MoveAndFade : MonoBehaviour while(elapsedTime < AnimationTime) { - float ratio = elapsedTime / AnimationTime; float fadeValue = Mathf.Lerp(startAlpha,0.0f, FadeCurve.Evaluate(ratio)); @@ -48,11 +42,7 @@ public class MoveAndFade : MonoBehaviour yield return new WaitForEndOfFrame(); elapsedTime += Time.deltaTime; - - - } - Destroy(gameObject); } } diff --git a/Assets/Scripts/UI/NetworkedUIManager.cs b/Assets/Scripts/UI/NetworkedUIManager.cs index 9030798..19ecdb5 100644 --- a/Assets/Scripts/UI/NetworkedUIManager.cs +++ b/Assets/Scripts/UI/NetworkedUIManager.cs @@ -1,7 +1,4 @@ -using System.Collections; -using System.Collections.Generic; -using UnityEngine; -using UnityEngine.Networking; +using UnityEngine; using Networking; using Networking.Client; using UnityEngine.UI; diff --git a/Assets/Scripts/UI/PlayerUIManager.cs b/Assets/Scripts/UI/PlayerUIManager.cs index 1a403e9..7fa09bb 100644 --- a/Assets/Scripts/UI/PlayerUIManager.cs +++ b/Assets/Scripts/UI/PlayerUIManager.cs @@ -1,10 +1,8 @@ using System.Collections; -using System.Collections.Generic; using UnityEngine; public abstract class PlayerUIManager : MonoBehaviour { - [SerializeField] protected InventoryUI Inventory; @@ -36,7 +34,6 @@ public abstract class PlayerUIManager : MonoBehaviour [ContextMenu("Hide")] public void OnClick_Hide() { - StopAllCoroutines(); StartCoroutine( LerpPosition(inventoryRect, HidePosition, AnimationSpeed)); } @@ -59,7 +56,6 @@ public abstract class PlayerUIManager : MonoBehaviour private IEnumerator LerpPosition(RectTransform rt, Vector3 endPosition, float time) { - float elapsedTime = 0; Vector3 startPos = rt.anchoredPosition; @@ -69,9 +65,6 @@ public abstract class PlayerUIManager : MonoBehaviour elapsedTime += Time.deltaTime; yield return new WaitForEndOfFrame(); } - rt.anchoredPosition = endPosition; } - - } diff --git a/Assets/Scripts/UI/PreFilledText.cs b/Assets/Scripts/UI/PreFilledText.cs index 558cbc1..feadfd3 100644 --- a/Assets/Scripts/UI/PreFilledText.cs +++ b/Assets/Scripts/UI/PreFilledText.cs @@ -1,9 +1,6 @@ -using System.Collections; -using System.Collections.Generic; -using UnityEngine; +using UnityEngine; using TMPro; - public class PreFilledText : MonoBehaviour { [System.Serializable] @@ -22,7 +19,6 @@ public class PreFilledText : MonoBehaviour [SerializeField] private string DefaultValue; - private void Awake() { SetText(); @@ -43,6 +39,4 @@ public class PreFilledText : MonoBehaviour break; } } - - } diff --git a/Assets/Scripts/UI/ScoreBoard.cs b/Assets/Scripts/UI/ScoreBoard.cs index 2d10610..611d1c1 100644 --- a/Assets/Scripts/UI/ScoreBoard.cs +++ b/Assets/Scripts/UI/ScoreBoard.cs @@ -1,9 +1,7 @@ using System.Collections; using System.Collections.Generic; using UnityEngine; -using UnityEngine.Networking; using Networking.Server; -using Networking; using TMPro; using UnityEngine.SceneManagement; diff --git a/Assets/Scripts/UI/levelInfoDisplay.cs b/Assets/Scripts/UI/levelInfoDisplay.cs index 70089f1..39e9b73 100644 --- a/Assets/Scripts/UI/levelInfoDisplay.cs +++ b/Assets/Scripts/UI/levelInfoDisplay.cs @@ -1,5 +1,4 @@ using System.Collections; -using System.Collections.Generic; using UnityEngine; public class levelInfoDisplay : MonoBehaviour @@ -13,10 +12,8 @@ public class levelInfoDisplay : MonoBehaviour infoDisplay.SetActive(false); } - // Start is called before the first frame update public void StartCoroutine() { StartCoroutine(displayforSeconds(5.0f)); } - } diff --git a/Assets/Scripts/animalSelection.cs b/Assets/Scripts/animalSelection.cs index 8fbfb72..1a6b067 100644 --- a/Assets/Scripts/animalSelection.cs +++ b/Assets/Scripts/animalSelection.cs @@ -1,5 +1,4 @@ -using System.Collections; -using System.Collections.Generic; +using System.Collections.Generic; using UnityEngine; using Networking.Client; using UnityEngine.UI; @@ -10,17 +9,6 @@ public class animalSelection : MonoBehaviour public List Animals; public int count; - //private void OnEnable() - //{ - // Clients.OnClientsChange += UpdateAnimals; - //} - // - //private void OnDisable() - //{ - // Clients.OnClientsChange -= UpdateAnimals; - //} - - public void Update() { count = Clients.AllClients.Count; @@ -39,4 +27,4 @@ public class animalSelection : MonoBehaviour } } } -} \ No newline at end of file +} diff --git a/Assets/Scripts/blockSpawn.cs b/Assets/Scripts/blockSpawn.cs index b706a2b..91d5811 100644 --- a/Assets/Scripts/blockSpawn.cs +++ b/Assets/Scripts/blockSpawn.cs @@ -6,10 +6,7 @@ using Networking.Server; public class blockSpawn : MonoBehaviour { [SerializeField] - public Inventory.Data[] StrongLogicList; - public Inventory.Data[] NormalLogicList; - public Inventory.Data[] WeakLogicList; - Inventory.Data[] listtoUse; + public Inventory.Data[] LogicList; List ConnectedClients; public ClientList clientDataList; @@ -77,9 +74,7 @@ public class blockSpawn : MonoBehaviour { goto escape; } - //Debug.Log("spawnNumber " + spawnNumber); } - //Debug.Log("SpawnTries: " + triesCount); } escape: spawnNumber = 2; @@ -125,21 +120,8 @@ public class blockSpawn : MonoBehaviour public void assignLogicBlock(GameObject block, float value) { - if(value > 1) - { - listtoUse = WeakLogicList; - } - else if (value <= 1 && value > (-4)) - { - listtoUse = NormalLogicList; - } - else if (value <= (-5)) - { - listtoUse = StrongLogicList; - } - - int number = Random.Range(0, listtoUse.Length-1); - block.GetComponent().Collectable.element = listtoUse[number].element; + int number = Random.Range(0, LogicList.Length-1); + block.GetComponent().Collectable.element = LogicList[number].element; block.GetComponent().Collectable.Count = 1; } @@ -164,4 +146,4 @@ public class blockSpawn : MonoBehaviour } } } -} \ No newline at end of file +} diff --git a/Assets/Scripts/portalTesting.cs b/Assets/Scripts/portalTesting.cs deleted file mode 100644 index ec99cb6..0000000 --- a/Assets/Scripts/portalTesting.cs +++ /dev/null @@ -1,24 +0,0 @@ -using System.Collections; -using System.Collections.Generic; -using UnityEngine; -using UnityEngine.Networking; -using Networking.Server; -using Networking; - -public class portalTesting : MonoBehaviour -{ - public ClientList clientDataList; - public List ConnectedClients; - public PortalSetup ps; - - void Start(){ - ConnectedClients = clientDataList.ConnectedClients; - } - - // Update is called once per frame - void Update() - { - - - } -} diff --git a/Assets/Scripts/videoToUI.cs b/Assets/Scripts/videoToUI.cs index b930fed..742eeee 100644 --- a/Assets/Scripts/videoToUI.cs +++ b/Assets/Scripts/videoToUI.cs @@ -1,5 +1,4 @@ using System.Collections; -using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; using UnityEngine.Video; @@ -8,11 +7,12 @@ public class videoToUI : MonoBehaviour { public RawImage rawImage; public VideoPlayer videoPlayer; - // Use this for initialization + void Start() { StartCoroutine(PlayVideo()); } + IEnumerator PlayVideo() { videoPlayer.Prepare(); diff --git a/Assets/Scripts/winnerscene.cs b/Assets/Scripts/winnerscene.cs index 7b795c8..6940631 100644 --- a/Assets/Scripts/winnerscene.cs +++ b/Assets/Scripts/winnerscene.cs @@ -13,7 +13,6 @@ public class winnerscene : MonoBehaviour private void Awake() { - //GameObject character = Resources.Load<> GameObject prefab = Resources.Load(GlobalVariables.winneranimal); GameObject character = Instantiate(prefab, characterPosition); character.transform.rotation = Quaternion.Euler(0, 152.775f, 0); diff --git a/Assets/Textures/Icon.png b/Assets/Textures/Icon.png index cf6b402..ed23c1e 100644 --- a/Assets/Textures/Icon.png +++ b/Assets/Textures/Icon.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:c963d84120be6c9dbd55078d72c6872b193294304954c55db22267f0d5317452 -size 7257 +oid sha256:8ec1b9522a2db5ee09f767dae4c4214b97c6055b9025fe3f3da4301617bc3332 +size 52337 diff --git a/Assets/Textures/Icon.png.meta b/Assets/Textures/Icon.png.meta index fd817ed..176e345 100644 --- a/Assets/Textures/Icon.png.meta +++ b/Assets/Textures/Icon.png.meta @@ -6,7 +6,7 @@ TextureImporter: serializedVersion: 9 mipmaps: mipMapMode: 0 - enableMipMap: 1 + enableMipMap: 0 sRGBTexture: 1 linearTexture: 0 fadeOut: 0 @@ -34,13 +34,13 @@ TextureImporter: filterMode: -1 aniso: -1 mipBias: -100 - wrapU: -1 - wrapV: -1 + wrapU: 1 + wrapV: 1 wrapW: -1 - nPOTScale: 1 + nPOTScale: 0 lightmap: 0 compressionQuality: 50 - spriteMode: 0 + spriteMode: 1 spriteExtrude: 1 spriteMeshType: 1 alignment: 0 @@ -49,9 +49,9 @@ TextureImporter: spriteBorder: {x: 0, y: 0, z: 0, w: 0} spriteGenerateFallbackPhysicsShape: 1 alphaUsage: 1 - alphaIsTransparency: 0 + alphaIsTransparency: 1 spriteTessellationDetail: -1 - textureType: 0 + textureType: 8 textureShape: 1 singleChannelComponent: 0 maxTextureSizeSet: 0 @@ -69,6 +69,61 @@ TextureImporter: 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: iPhone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: tvOS + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Android + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Windows Store Apps + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 spriteSheet: serializedVersion: 2 sprites: [] diff --git a/Assets/Third Party Assets/KUBIKOS - World/Prefabs/Items/Canon.prefab b/Assets/Third Party Assets/KUBIKOS - World/Prefabs/Items/Canon.prefab index cf1bb81..297f8ee 100644 --- a/Assets/Third Party Assets/KUBIKOS - World/Prefabs/Items/Canon.prefab +++ b/Assets/Third Party Assets/KUBIKOS - World/Prefabs/Items/Canon.prefab @@ -1,22 +1,12 @@ %YAML 1.1 %TAG !u! tag:unity3d.com,2011: ---- !u!1001 &100100000 -Prefab: - m_ObjectHideFlags: 1 - serializedVersion: 2 - m_Modification: - m_TransformParent: {fileID: 0} - m_Modifications: [] - m_RemovedComponents: [] - m_ParentPrefab: {fileID: 0} - m_RootGameObject: {fileID: 1277699181497372} - m_IsPrefabParent: 1 --- !u!1 &1277699181497372 GameObject: m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - serializedVersion: 5 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 m_Component: - component: {fileID: 4904347317534488} - component: {fileID: 33235018378261012} @@ -30,9 +20,10 @@ GameObject: m_IsActive: 1 --- !u!4 &4904347317534488 Transform: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1277699181497372} m_LocalRotation: {x: 0, y: -0, z: -0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} @@ -41,18 +32,30 @@ Transform: m_Father: {fileID: 0} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!33 &33235018378261012 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1277699181497372} + m_Mesh: {fileID: 4300000, guid: 11fb0b0b08e257f45b2947a4e67e3f39, type: 3} --- !u!23 &23153283585589664 MeshRenderer: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1277699181497372} m_Enabled: 1 m_CastShadows: 1 m_ReceiveShadows: 1 + m_DynamicOccludee: 1 m_MotionVectors: 1 m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 m_Materials: - {fileID: 2100000, guid: 6e87d9ec395110b44a460dd506e7394a, type: 2} m_StaticBatchInfo: @@ -65,6 +68,7 @@ MeshRenderer: m_PreserveUVs: 0 m_IgnoreNormalsForChartDetection: 0 m_ImportantGI: 0 + m_StitchLightmapSeams: 0 m_SelectedEditorRenderState: 3 m_MinimumChartSize: 4 m_AutoUVMaxDistance: 0.5 @@ -73,10 +77,3 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 ---- !u!33 &33235018378261012 -MeshFilter: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 1277699181497372} - m_Mesh: {fileID: 4300000, guid: 11fb0b0b08e257f45b2947a4e67e3f39, type: 3} diff --git a/ProjectSettings/ProjectSettings.asset b/ProjectSettings/ProjectSettings.asset index 6ec3cc0..9145d8d 100644 --- a/ProjectSettings/ProjectSettings.asset +++ b/ProjectSettings/ProjectSettings.asset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:10e0a66072f7571cd5504c1b3fbbcb9214e19f7d90c8737713b00926e1b56bac +oid sha256:14a3ae1e8d542e62e69f3eb680ca69e7105015e4f3855844f646ffd52ff7652f size 20900 diff --git a/ProjectSettings/TagManager.asset b/ProjectSettings/TagManager.asset index c9740c8..8c5457c 100644 --- a/ProjectSettings/TagManager.asset +++ b/ProjectSettings/TagManager.asset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:7317ce4fb5ff3b0aba81dcbe81d92b823ec0f3ee870b5a2b78560baae6c53a91 -size 416 +oid sha256:0687602eedd445d6678fa089619485baa9bf0962aeed2f495e1424b471736cf3 +size 426