Exemplo n.º 1
0
    void Awake()
    {
        if (gemsPrefabs == null || gemsPrefabs.Count < 5)
        {
            Debug.Log("Warning not enough prefabs set");
        }


        if (SceneManager.GetActiveScene().name == "FacebookGameScene" || SceneManager.GetActiveScene().name == "FreeplayGameScene")
        {
            gemClick = GemClicked;
            gemDeath = CreateNewGem;
            gameVars = gameObject.GetComponent <GameVariables>();
        }

        doUpdateStuff = null;
    }
Exemplo n.º 2
0
    void Start()
    {
        gemClick       = WaitClick;
        gemDeath       = GemDied;
        doUpdateStuff += WaitForStart;

        levelText = levelTextContainer.GetComponent <TextMesh>();
        goalsText = goalsTextContainer.GetComponent <TextMesh>();
        scoreText = movesTextContainer.GetComponent <TextMesh>();
        InitStars();
        InitMoves();
        Stars = startingStars;
        Moves = 0;
        UpdateLevelText("");

        StartCoroutine("CheckHighestCube");
        PauseGame();
        //ShowLevelGoal();
    }