From 726859573fca242b37320656581d51a912fa2c70 Mon Sep 17 00:00:00 2001 From: Claire Peta Date: Thu, 17 Oct 2019 18:24:40 +1100 Subject: [PATCH] Chicken Wing --- Assets/Data/Inventory/BaseInventory.asset | 4 ++-- Assets/Data/Logic Blocks/Missile.asset | 4 ++-- Assets/Data/Logic Blocks/Move x2.asset | 2 +- Assets/Data/Logic Blocks/Rotate R.asset | 4 ++-- .../Map Sections/Width 5/Backbelt 5-2.prefab.meta | 2 +- Assets/Resources/Logic Block.prefab | 3 ++- Assets/Scenes/Levels/RaceTrack Beta.unity | 4 ++-- Assets/Scripts/Character.cs | 2 +- Assets/Scripts/LevelBlocks/Block.cs | 2 -- Assets/Scripts/Networking/Server/ClientList.cs | 6 +++++- Assets/Scripts/Projectiles/Hookshot.cs | 5 +++++ Assets/Scripts/blockSpawn.cs | 11 ----------- 12 files changed, 23 insertions(+), 26 deletions(-) diff --git a/Assets/Data/Inventory/BaseInventory.asset b/Assets/Data/Inventory/BaseInventory.asset index ef65854..34ff737 100644 --- a/Assets/Data/Inventory/BaseInventory.asset +++ b/Assets/Data/Inventory/BaseInventory.asset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:3fb94665e70a106a7e0a4ca21efd8c70634b208c2c9bcc75a6601c8a846c559b -size 1186 +oid sha256:78ae471f15115791ca45bbfb08426eee099b2279851a3178a457837c0032e2ec +size 1313 diff --git a/Assets/Data/Logic Blocks/Missile.asset b/Assets/Data/Logic Blocks/Missile.asset index 0dcbf75..6b5648a 100644 --- a/Assets/Data/Logic Blocks/Missile.asset +++ b/Assets/Data/Logic Blocks/Missile.asset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:1407c67c7a52ce8f47e9373bd2c3663187ab8993f107ef768d5db368c59bc873 -size 573 +oid sha256:dee86c4c1ae6c1d17728507226c604655958d6ddbc22576fe9125f081716b168 +size 571 diff --git a/Assets/Data/Logic Blocks/Move x2.asset b/Assets/Data/Logic Blocks/Move x2.asset index 9982083..5a884fe 100644 --- a/Assets/Data/Logic Blocks/Move x2.asset +++ b/Assets/Data/Logic Blocks/Move x2.asset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:cf1896bd1ad950c5c2fee7f7eeb876eff9e417c4c2eb98d306ff0b934bbc58a2 +oid sha256:f3ced4981cb779fcc1d14ec75124a6386403773c4110fa07797a0ee99694f621 size 553 diff --git a/Assets/Data/Logic Blocks/Rotate R.asset b/Assets/Data/Logic Blocks/Rotate R.asset index 5e254ae..70850ab 100644 --- a/Assets/Data/Logic Blocks/Rotate R.asset +++ b/Assets/Data/Logic Blocks/Rotate R.asset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:3ea01fc0d3ad9bf270994843c6d532111ce194ac30849cc9a7336f94cb11da44 -size 571 +oid sha256:3d50147c331d60f87678d7850961f1df367a04fc2e100ff1eabb9a54c9b96302 +size 567 diff --git a/Assets/Prefabs/Map Sections/Width 5/Backbelt 5-2.prefab.meta b/Assets/Prefabs/Map Sections/Width 5/Backbelt 5-2.prefab.meta index 4287057..46e3f0d 100644 --- a/Assets/Prefabs/Map Sections/Width 5/Backbelt 5-2.prefab.meta +++ b/Assets/Prefabs/Map Sections/Width 5/Backbelt 5-2.prefab.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: a97e14fa63785b94d9e936d5b71b2155 +guid: ca72b86487a73ad42a6f5b3c89844d43 PrefabImporter: externalObjects: {} userData: diff --git a/Assets/Resources/Logic Block.prefab b/Assets/Resources/Logic Block.prefab index a70bd4a..61dbcb8 100644 --- a/Assets/Resources/Logic Block.prefab +++ b/Assets/Resources/Logic Block.prefab @@ -90,7 +90,7 @@ BoxCollider: m_IsTrigger: 1 m_Enabled: 1 serializedVersion: 2 - m_Size: {x: 1, y: 1, z: 1} + m_Size: {x: 1.5, y: 5, z: 1.5} m_Center: {x: 0, y: 0, z: 0} --- !u!114 &6594707672895095347 MonoBehaviour: @@ -107,4 +107,5 @@ MonoBehaviour: Collectable: element: {fileID: 0} Count: 0 + minCount: 0 isInfinit: 0 diff --git a/Assets/Scenes/Levels/RaceTrack Beta.unity b/Assets/Scenes/Levels/RaceTrack Beta.unity index 20ba74b..b3d0ace 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:9b3466a08e64206f4cd8bfd28202d1c8249dfa16454f0f020ec44634b894b76f -size 30788 +oid sha256:14354be5b52a9bfeb748f01bc7aaa0d11fdcfc67482cac90cbb7e0e71ca36b7a +size 36108 diff --git a/Assets/Scripts/Character.cs b/Assets/Scripts/Character.cs index 39da8c6..32d26e9 100644 --- a/Assets/Scripts/Character.cs +++ b/Assets/Scripts/Character.cs @@ -23,7 +23,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(-50, 0, 0); + Vector3 death = new Vector3(Mathf.Infinity, 0, 0); #region Inspector Fields [SerializeField] diff --git a/Assets/Scripts/LevelBlocks/Block.cs b/Assets/Scripts/LevelBlocks/Block.cs index 5f7ed92..73c8feb 100644 --- a/Assets/Scripts/LevelBlocks/Block.cs +++ b/Assets/Scripts/LevelBlocks/Block.cs @@ -285,10 +285,8 @@ public class Block : MonoBehaviour { return false; } - return true; } #endregion - } diff --git a/Assets/Scripts/Networking/Server/ClientList.cs b/Assets/Scripts/Networking/Server/ClientList.cs index 1ea433f..cb2e6de 100644 --- a/Assets/Scripts/Networking/Server/ClientList.cs +++ b/Assets/Scripts/Networking/Server/ClientList.cs @@ -103,8 +103,12 @@ namespace Networking.Server } ClientData client = ConnectedClients.FirstOrDefault(p => p.ID == msg.conn.Hash()); + client.Lives = 0; - client.playerCharacter.lives = 0; + if (client.playerCharacter != null) + { + client.playerCharacter.lives = 0; + } ConnectedClients.Remove(client); DisconnectedClients.Add(client); diff --git a/Assets/Scripts/Projectiles/Hookshot.cs b/Assets/Scripts/Projectiles/Hookshot.cs index 118df8b..9eed5ea 100644 --- a/Assets/Scripts/Projectiles/Hookshot.cs +++ b/Assets/Scripts/Projectiles/Hookshot.cs @@ -20,7 +20,12 @@ public class Hookshot : Projectile Block hitBlock = GetEndBlock(player.CurrentBlock, direction, ~player.Ignore); if (hitBlock == player.CurrentBlock) + { + //fire something out then back in here + 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)); diff --git a/Assets/Scripts/blockSpawn.cs b/Assets/Scripts/blockSpawn.cs index 504a601..d18ae2b 100644 --- a/Assets/Scripts/blockSpawn.cs +++ b/Assets/Scripts/blockSpawn.cs @@ -29,7 +29,6 @@ public class blockSpawn : MonoBehaviour { SpawnBlocks.Clear(); SpawnBlocks = FindObjectsOfType().Where(p => p.isCollectableSpawnable).ToList(); - Debug.Log("Count after wakeup function " + SpawnBlocks.Count); } public void Spawn() @@ -44,29 +43,20 @@ public class blockSpawn : MonoBehaviour min_x = (int)ConnectedClients[ConnectedClients.Count - 1].playerCharacter.transform.position.x; max_x = (int)ConnectedClients[0].playerCharacter.transform.position.x + 4; - Debug.Log("count before update " + SpawnBlocks.Count); updatePlayerPositions(); - Debug.Log("count mid update " + SpawnBlocks.Count); updatePositions(min_x - 1); - Debug.Log("count after update " + SpawnBlocks.Count); //Check points within the bounds of players possibleSpawnLocations.Clear(); foreach (Block point in SpawnBlocks) { - //Debug.Log("Position: " + point.transform.position.x + " and " + point.transform.position.z); if(point.transform.position.x >= min_x && point.transform.position.x <= max_x) { possibleSpawnLocations.Add(point); } } - //pick a random value from those available, checks the location - //then removes it to remove the possibility of duplicates - Debug.Log("possibleSpawnLocations count " + possibleSpawnLocations.Count); - int triesCount = 0; - if(possibleSpawnLocations.Count > 0) { while (spawnNumber > 0 && triesCount < 25) @@ -164,7 +154,6 @@ public class blockSpawn : MonoBehaviour { for(int i = SpawnBlocks.Count -1; i>=0; i--) { - //Debug.Log(SpawnBlocks[i].transform.position.x); if(SpawnBlocks[i].transform.position.x < min) { SpawnBlocks.Remove(SpawnBlocks[i]);