Exemplo n.º 1
0
    void UpdatePathBlockMoving()
    {
        movingBlocks.Activate();
        movingBlocks.GetOldest().GetComponent <MovingPlatform>().SetHeight(nextHeight);

        UpdateNextHeight();

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

        SpawnCoinsAndFood(pathBlocks.GetOldest());

        SpawnRandomBlock();

        UpdateNextHeight();

        pathBlocks.Cycle();
    }
Exemplo n.º 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();
 }
Exemplo n.º 5
0
 public override void Activate(ObjectContainer data)
 {
     data.Activate(this, 1);
     data.Activate(_miscelatura, 1);
     data.Activate(_miscelatura._silosContent, 1);
 }
Exemplo n.º 6
0
 public override void Activate(ObjectContainer data)
 {
     data.Activate(this, 1);
     data.Activate(_tostatura, 1);
     data.Activate(_tostatura.Approvvigionamento, 2);
 }