コード例 #1
0
 private void Awake()
 {
     _persistant  = FindObjectOfType <Persistant>();
     _audioPlayer = _persistant.GetComponent <AudioSource>();
     if (_audioPlayer.clip == _soundtrack)
     {
         return;
     }
     _audioPlayer.clip = _soundtrack;
     _audioPlayer.GetComponent <AudioSource>().Play();
 }
コード例 #2
0
 private void Awake()
 {
     if (persistant == null)
     {
         DontDestroyOnLoad(gameObject);
         persistant     = this;
         scoreThreshold = scorePerExtraLife;
     }
     else if (persistant != this)
     {
         Destroy(gameObject);
     }
 }
コード例 #3
0
ファイル: GeoScripts.cs プロジェクト: bblpny/Quad64
            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
            }