Board.Awake C# (CSharp) Method

Awake() public method

public Awake ( ) : void
return void
    void Awake()
    {
        anchors = Camera.mainCamera.GetComponent<CamAnchors>();
        transform.position = anchors.lowerLeft;
        //UpdateMesh ();
    }

Usage Example

コード例 #1
0
    public void UpdateGoals()
    { // mettre à jour les texts affichant les buts à atteindre
        int goalsCompleted = 0;

        for (int i = 0; i < levelGoals.Length; i++)
        {
            currentGoals[i].thisText.text = levelGoals[i].numberCollected + "/" + levelGoals[i].numberNeeded;
            if (levelGoals[i].numberCollected >= levelGoals[i].numberNeeded)
            {
                goalsCompleted++;
                currentGoals[i].thisText.text = levelGoals[i].numberNeeded + "/" + levelGoals[i].numberNeeded;
            }
        }
        if (goalsCompleted >= levelGoals.Length)
        {
            if (endGame != null)
            {
                endGame.WinGame();
                //Debug.Log("Partie gagnée");

                board.level++;
                if (board.level < board.world.levels.Length)
                {
                    board.Awake();
                }
            }
        }
    }
Board