Exemplo n.º 1
0
 // Use this for initialization
 void Start()
 {
     backgroundStartPoint    = BackgroundGenerator.position;
     platformStartPoint      = platformGenerator.position;
     playerStartPoint        = thePlayer.transform.position;
     scoreManager            = FindObjectOfType <ScoreManager>();
     platformGeneratorObject = GameObject.Find("PlatformGenerator").GetComponent <Platform_Generator>();
 }
Exemplo n.º 2
0
    void Start()
    {
        Game_Controller    = GameObject.Find("Game_Controller");
        platform_Generator = Game_Controller.GetComponent <Platform_Generator>();

        // Set distance to destroy the platforms out of screen
        if (Game_Controller != null)
        {
            Destroy_Distance = Game_Controller.GetComponent <Game_Controller>().Get_DestroyDistance();
        }

        if (TryGetComponent(out animator))
        {
            animator.keepAnimatorControllerStateOnDisable = true;
        }
        //animator = GetComponent<Animator>();
    }
 // Use this for initialization
 void Start()
 {
     platformGeneratorScript = platformGenerator.GetComponent <Platform_Generator>();
 }