示例#1
0
 private void Start()
 {
     moveDir   = spawner.MoveDir.Z;
     z_spawner = GameObject.Find("spawner_z").GetComponent <spawner>();
     x_spawner = GameObject.Find("spawner_x").GetComponent <spawner>();
     GameObject.Find("start").GetComponent <Renderer>().material.color = gradient.Instance.currentColor;
 }
示例#2
0
    protected void placeBlock()
    {
        if (movingCube.currentCube != null)
        {
            movingCube.currentCube.placeCube();
        }

        if (moveDir == spawner.MoveDir.Z)
        {
            z_spawner.spawnCube();
            moveDir = spawner.MoveDir.X;
        }
        else
        {
            x_spawner.spawnCube();
            moveDir = spawner.MoveDir.Z;
        }

        movingCube.currentCube.GetComponent <Renderer>().material.color = gradient.Instance.lerpColor();
    }