Example #1
0
    private void Start() {
        pcg = GameObject.FindObjectOfType<PcgGenerator>();
        level = GameObject.FindObjectOfType<TimerLevel>();
		levelSummary = GameObject.Find("LevelInt").GetComponent<Text>();
		scoreSummary = GameObject.Find("ScoreInt").GetComponent<Text>();
		highScoreSummary = GameObject.Find("HighScoreInt").GetComponent<Text>();
    }
 // Use this for initialization
 void Start()
 {
     ftime           = 120f;
     timeText        = GameObject.Find("Time").GetComponent <Text>();
     isLevelComplete = false;
     level_number    = 1;
     level           = GameObject.Find("Level").GetComponent <Text>();
     level.text      = level_number.ToString();
     generator       = GameObject.FindObjectOfType <PcgGenerator>();
     levelManager    = GameObject.FindObjectOfType <LevelManager>();
 }
Example #3
0
 // Use this for initialization
 void Start()
 {
     anim              = GetComponent <Animator>();
     sound             = GetComponent <AudioSource>();
     generator         = GetComponent <PcgGenerator>();
     animalCountText   = GameObject.Find("AnimalCount").GetComponent <Text>();
     appleCounter      = GameObject.Find("AppleCountText").GetComponent <Text>();
     levelManager      = GameObject.FindObjectOfType <LevelManager>();
     shoot             = GameObject.Find("Shoot");
     npc               = GameObject.FindObjectOfType <NonPlayableEntities>();
     sound.volume      = PlayerPrefsManager.GetMasterVolume();
     projectileCounter = 0;
     isFacingLeft      = true;
     isMovingLeft      = true;
     isMovingRight     = true;
     isMovingUp        = true;
     isMovingDown      = true;
 }