Exemple #1
0
    // Use this for initialization
    void Start()
    {

        Screen.orientation = (ScreenOrientation)PlayerPrefs.GetInt("ScreenOrientation", (int)ScreenOrientation.LandscapeLeft);

        shapeController = GetComponent<ShapeController>();
        swipeController = GetComponent<SwipeController>();
        playerBody = GetComponent<Rigidbody2D>();
        localHighScores = GetComponent<LocalHighScore>();
        levelGenerator = GetComponent<LevelGenerator>();
        levelGenerator.AddAllPrefabsToPooler();
        maxPlayerSpeedSquared = MaxPlayerSpeed * MaxPlayerSpeed;
        //Restart();

        StartCoroutine(MoveTowardsGoalCoroutine());
    }