void Start()
 {
     _rb2d       = GetComponent <Rigidbody2D>();
     _shootAudio = GetComponent <AudioSource>();
     _invincible = new System.Diagnostics.Stopwatch();
     _lifebar    = LifebarPlayer.Instance;
 }
Example #2
0
 private void Awake()
 {
     if (instance != null && instance != this)
     {
         Destroy(this.gameObject);
         return;
     }
     else
     {
         instance = this;
     }
 }