void UpdatePathBlockMoving() { movingBlocks.Activate(); movingBlocks.GetOldest().GetComponent <MovingPlatform>().SetHeight(nextHeight); UpdateNextHeight(); movingBlocks.Cycle(); }
void SpawnRandomBlock() //Spawn Rnadom Blocks according to random spawn rate { if (randomBlockSpawnRate > 1f) { for (int i = 0; i < (int)randomBlockSpawnRate; i++) { buildingBlocks.Activate(); buildingBlocks.GetOldest().transform.position = RandomBlockPos(); SpawnCoinsAndFood(buildingBlocks.GetOldest()); buildingBlocks.Cycle(); } } if (Random.Range(0.0f, 1.0f) < randomBlockSpawnRate % 1) { buildingBlocks.Activate(); buildingBlocks.GetOldest().transform.position = RandomBlockPos(); SpawnCoinsAndFood(buildingBlocks.GetOldest()); buildingBlocks.Cycle(); } }
void UpdatePathBlock() { pathBlocks.Activate(); pathBlocks.GetOldest().transform.position = new Vector2(Random.Range(-2f, 2f), nextHeight); SpawnCoinsAndFood(pathBlocks.GetOldest()); SpawnRandomBlock(); UpdateNextHeight(); pathBlocks.Cycle(); }
void MoveOldest(ObjectContainer container, Vector2 pos) { container.Activate(); container.GetOldest().transform.position = new Vector3(pos.x, pos.y, container.GetOldest().transform.position.z); container.Cycle(); }
public override void Activate(ObjectContainer data) { data.Activate(this, 1); data.Activate(_miscelatura, 1); data.Activate(_miscelatura._silosContent, 1); }
public override void Activate(ObjectContainer data) { data.Activate(this, 1); data.Activate(_tostatura, 1); data.Activate(_tostatura.Approvvigionamento, 2); }