|
|
@ -26,6 +26,7 @@ public class blockSpawn : MonoBehaviour |
|
|
|
} |
|
|
|
public void wakeup() |
|
|
|
{ |
|
|
|
SpawnBlocks.ToList().Clear(); |
|
|
|
SpawnBlocks = FindObjectsOfType<Block>().Where(p => p.isCollectableSpawnable).ToArray(); |
|
|
|
} |
|
|
|
|
|
|
@ -103,20 +104,24 @@ public class blockSpawn : MonoBehaviour |
|
|
|
|
|
|
|
public void assignLogicBlock(GameObject block, float value) |
|
|
|
{ |
|
|
|
if(value > 0) |
|
|
|
if(value > 1) |
|
|
|
{ |
|
|
|
listtoUse = WeakLogicList; |
|
|
|
} |
|
|
|
else if (value < 0 && value > (-10)) |
|
|
|
else if (value <= 1 && value > (-4)) |
|
|
|
{ |
|
|
|
listtoUse = NormalLogicList; |
|
|
|
} |
|
|
|
else if (value <= (-10)) |
|
|
|
else if (value <= (-5)) |
|
|
|
{ |
|
|
|
listtoUse = StrongLogicList; |
|
|
|
} |
|
|
|
//max behind camera is -6/-7
|
|
|
|
//max lives = 3
|
|
|
|
// ~ anyone ahead of the average will have a minimum of 4(full lives) or 2(with 1 life left)
|
|
|
|
// ~ anyone behind the average will have a minimum of -3-4(full lives) or -5/-6 (with one life left)
|
|
|
|
|
|
|
|
int number = (int)Random.Range(0, listtoUse.Length-1); |
|
|
|
int number = Random.Range(0, listtoUse.Length-1); |
|
|
|
block.GetComponent<LogicCollectable_Multiplayer>().Collectable.element = listtoUse[number].element; |
|
|
|
block.GetComponent<LogicCollectable_Multiplayer>().Collectable.Count = listtoUse[number].Count; |
|
|
|
} |