Beispiel #1
0
//----------------------------------------START()----------------------------------------\\
        void Start()
        {
            mainCamera     = GameObject.Find("Main Camera").GetComponent <Camera>();
            centerOfScreen = GetWorld2DPosition(mainCamera.ViewportToScreenPoint(new Vector3(0.5f, 0.5f, 0)));

            // Setting the colors
            colorSchema                = new ColorSchema(PRE_DEFINED_SCHEMA, colorcodeLines);
            Level_Number_Text.color    = colorSchema.Font;
            Level_Text_Text.color      = colorSchema.Font;
            mainCamera.backgroundColor = colorSchema.Background;

            // Setting up the game:
            level = 0;
            game  = new GameManager(Level_Number_Text, darkCircle, lightCircle, lineMaterial, colorSchema);

            game.NextLevel(centerOfScreen);
            heldWithMouse    = false;
            levelIsWon       = false;
            animationcounter = -1;
            timerAnimator    = GameObject.Find("timer").GetComponent <Animator>();
        }