Browse Source

Chicken Wing

master
Claire Peta 5 years ago
parent
commit
726859573f
12 changed files with 23 additions and 26 deletions
  1. +2
    -2
      Assets/Data/Inventory/BaseInventory.asset
  2. +2
    -2
      Assets/Data/Logic Blocks/Missile.asset
  3. +1
    -1
      Assets/Data/Logic Blocks/Move x2.asset
  4. +2
    -2
      Assets/Data/Logic Blocks/Rotate R.asset
  5. +1
    -1
      Assets/Prefabs/Map Sections/Width 5/Backbelt 5-2.prefab.meta
  6. +2
    -1
      Assets/Resources/Logic Block.prefab
  7. +2
    -2
      Assets/Scenes/Levels/RaceTrack Beta.unity
  8. +1
    -1
      Assets/Scripts/Character.cs
  9. +0
    -2
      Assets/Scripts/LevelBlocks/Block.cs
  10. +5
    -1
      Assets/Scripts/Networking/Server/ClientList.cs
  11. +5
    -0
      Assets/Scripts/Projectiles/Hookshot.cs
  12. +0
    -11
      Assets/Scripts/blockSpawn.cs

+ 2
- 2
Assets/Data/Inventory/BaseInventory.asset View File

@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:3fb94665e70a106a7e0a4ca21efd8c70634b208c2c9bcc75a6601c8a846c559b
size 1186
oid sha256:78ae471f15115791ca45bbfb08426eee099b2279851a3178a457837c0032e2ec
size 1313

+ 2
- 2
Assets/Data/Logic Blocks/Missile.asset View File

@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:1407c67c7a52ce8f47e9373bd2c3663187ab8993f107ef768d5db368c59bc873
size 573
oid sha256:dee86c4c1ae6c1d17728507226c604655958d6ddbc22576fe9125f081716b168
size 571

+ 1
- 1
Assets/Data/Logic Blocks/Move x2.asset View File

@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:cf1896bd1ad950c5c2fee7f7eeb876eff9e417c4c2eb98d306ff0b934bbc58a2
oid sha256:f3ced4981cb779fcc1d14ec75124a6386403773c4110fa07797a0ee99694f621
size 553

+ 2
- 2
Assets/Data/Logic Blocks/Rotate R.asset View File

@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:3ea01fc0d3ad9bf270994843c6d532111ce194ac30849cc9a7336f94cb11da44
size 571
oid sha256:3d50147c331d60f87678d7850961f1df367a04fc2e100ff1eabb9a54c9b96302
size 567

+ 1
- 1
Assets/Prefabs/Map Sections/Width 5/Backbelt 5-2.prefab.meta View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: a97e14fa63785b94d9e936d5b71b2155
guid: ca72b86487a73ad42a6f5b3c89844d43
PrefabImporter:
externalObjects: {}
userData:

+ 2
- 1
Assets/Resources/Logic Block.prefab View File

@ -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

+ 2
- 2
Assets/Scenes/Levels/RaceTrack Beta.unity View File

@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:9b3466a08e64206f4cd8bfd28202d1c8249dfa16454f0f020ec44634b894b76f
size 30788
oid sha256:14354be5b52a9bfeb748f01bc7aaa0d11fdcfc67482cac90cbb7e0e71ca36b7a
size 36108

+ 1
- 1
Assets/Scripts/Character.cs View File

@ -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]

+ 0
- 2
Assets/Scripts/LevelBlocks/Block.cs View File

@ -285,10 +285,8 @@ public class Block : MonoBehaviour
{
return false;
}
return true;
}
#endregion
}

+ 5
- 1
Assets/Scripts/Networking/Server/ClientList.cs View File

@ -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);

+ 5
- 0
Assets/Scripts/Projectiles/Hookshot.cs View File

@ -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));

+ 0
- 11
Assets/Scripts/blockSpawn.cs View File

@ -29,7 +29,6 @@ public class blockSpawn : MonoBehaviour
{
SpawnBlocks.Clear();
SpawnBlocks = FindObjectsOfType<Block>().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]);

Loading…
Cancel
Save