Пример #1
0
 // Use this for initialization
 void Start()
 {
     this.bottle = this.transform.root.gameObject.GetComponent <BottleTest>();
     // this.contr = this.transform.root.gameObject.GetComponent<NewControllertest>();
     this.Player  = this.transform.root.gameObject;
     this.manager = GameManager.GetInstance();
 }
Пример #2
0
    void Awake()
    {
        CanSpawnHurdle = false;
        PrefsManager.ResetCurrentStats();
        this.Tutorial.SetActive(false);
        this.Player            = GameObject.FindGameObjectWithTag("Player");
        this.PlayerController  = this.Player.GetComponent <BottleTest>();
        this.DumpScenePosition = this.Player.transform.position;
        this.controller        = this.Player.GetComponent <BottleTest>();
        this.targetIndicator   = this.Player.GetComponentInChildren <TargetTest>();
        instance       = this;
        this.uiHandler = GameObject.FindObjectOfType(typeof(GameplayUIHandler)) as GameplayUIHandler;
        this.uiHandler.GameOverPanel.SetActive(false);

        if (PrefsManager.TimesPlayed() < 1)
        {
            this.Tutorial.SetActive(true);
            PrefsManager.IncreaseTimesPlayed();
        }
    }