private void Start()
 {
     nrOfCreatedCells = 0;
     w = blockPrefab.GetComponent <Renderer>().bounds.size.x; // width of a block
     visitedCellsTable = new Hashtable();
     coinCreator       = coinHolder.GetComponent <CoinCreator>();
     scoreChanger      = GameObject.FindGameObjectWithTag("ScoreMaster").GetComponent <ScoreChanger>();
 }
Beispiel #2
0
 // Start is called before the first frame update
 void Start()
 {
     rigidBody   = GetComponent <Rigidbody2D>();
     animator    = GetComponent <Animator>();
     scoreObject = GameObject.FindGameObjectWithTag("ScoreMaster").GetComponent <ScoreChanger>();
     SpawnEffect();
     // Playing "spawning" sound effects for the player character
     audioSource.PlayOneShot(fireWorks);
     audioSource.PlayOneShot(spawnSound);
 }
Beispiel #3
0
    private void Start()
    {
        fuel           = 100;
        scoreChanger  += UpdateStats;
        healthChanger += ChangeHealthvalue;

        scoreChanger();
        healthChanger();
        thrusterSlider.value = 0;
        StartCoroutine(PlayingTime());
        UpdateFuelAmount(0);
        UpdateThrottle();
    }
Beispiel #4
0
 private void OnEnable()
 {
     _scoreChanger = GetComponent <ScoreChanger>();
     _scoreChanger.ScoreIncreased += ChangeDifficult;
 }
Beispiel #5
0
 private void OnEnable()
 {
     _scoreChanger = GetComponent <ScoreChanger>();
     _scoreChanger.ScoreIncreased += TryChangePurpose;
 }
 // Start is called before the first frame update
 void Start()
 {
     scoreChanger = GameObject.FindGameObjectWithTag("ScoreMaster").GetComponent <ScoreChanger>();
 }