Exemple #1
0
    void UpdatePathBlockMoving()
    {
        movingBlocks.Activate();
        movingBlocks.GetOldest().GetComponent <MovingPlatform>().SetHeight(nextHeight);

        UpdateNextHeight();

        movingBlocks.Cycle();
    }
Exemple #2
0
    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();
        }
    }
Exemple #3
0
    void UpdatePathBlock()
    {
        pathBlocks.Activate();
        pathBlocks.GetOldest().transform.position = new Vector2(Random.Range(-2f, 2f), nextHeight);

        SpawnCoinsAndFood(pathBlocks.GetOldest());

        SpawnRandomBlock();

        UpdateNextHeight();

        pathBlocks.Cycle();
    }
Exemple #4
0
 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);
 }