Exemple #1
0
    // Use this for initialization
    void Start()
    {
        block = GetComponent <Block>();

        GameObject game = GameObject.Find("Game");

        if (game != null)
        {
            blockManager = game.GetComponent <BlockManager>();
            grid         = game.GetComponent <Grid>();
            blockRaiser  = game.GetComponent <BlockRaiser>();
        }
    }
Exemple #2
0
    // Use this for initialization
    void Start()
    {
        slider = GameObject.Find("Game").GetComponent <BlockSlider>();
        raiser = GameObject.Find("Game").GetComponent <BlockRaiser>();

        colors[0] = new Color(0.73f, 0.0f, 0.73f);
        colors[1] = new Color(0.2f, 0.2f, 0.8f);
        colors[2] = new Color(0.0f, 0.6f, 0.05f);
        colors[3] = new Color(0.85f, 0.85f, 0.0f);
        colors[4] = new Color(1.0f, 0.4f, 0.0f);

        newColors[0] = new Color(0.25f * 0.73f, 0.25f * 0.0f, 0.25f * 0.73f);
        newColors[1] = new Color(0.25f * 0.2f, 0.25f * 0.2f, 0.25f * 0.8f);
        newColors[2] = new Color(0.25f * 0.0f, 0.25f * 0.6f, 0.25f * 0.05f);
        newColors[3] = new Color(0.25f * 0.85f, 0.25f * 0.85f, 0.25f * 0.0f);
        newColors[4] = new Color(0.25f * 1.0f, 0.25f * 0.4f, 0.25f * 0.0f);
    }