private void Awake() { _persistant = FindObjectOfType <Persistant>(); _audioPlayer = _persistant.GetComponent <AudioSource>(); if (_audioPlayer.clip == _soundtrack) { return; } _audioPlayer.clip = _soundtrack; _audioPlayer.GetComponent <AudioSource>().Play(); }
private void Awake() { if (persistant == null) { DontDestroyOnLoad(gameObject); persistant = this; scoreThreshold = scorePerExtraLife; } else if (persistant != this) { Destroy(gameObject); } }
public Runtime(Runtime copy) : base(copy) { this.lvl = copy.lvl; this.mdl = copy.mdl; this.rootNode = copy.rootNode; this.nodeCurrent = copy.nodeCurrent; this._zbuf = copy._zbuf; this.persistant = copy.persistant; #if !NO_GEO_MAT this.material = copy.material; #endif #if DEBUG this.counter = copy.counter; this.log = copy.log; #endif }