Beispiel #1
0
    void Start()
    {
        musicSelector = GetComponent <MusicSelector>();
        weapon        = transform.GetChild(0).GetChild(0).GetChild(0);

        baseFOV = Camera.main.fieldOfView;
    }
Beispiel #2
0
 void Awake()
 {
     main        = this;  //Poorly implemented singleton thing, I guess.
     hud         = FindObjectOfType <HUDManager>();
     musicPlayer = GetComponentInChildren <MusicSelector>();
     VirtualControlManager.SetAllDefaultPlayerControls();
     enemyPlacer = GetComponent <EnemyPlacer>();
 }
Beispiel #3
0
 public void Die()
 {
     if (!loop)
     {
         loop = true;
         MusicSelector musicSelector = GameObject.Find("MusicSelector").GetComponent <MusicSelector>();
         musicSelector.startMemeMusic();
         animator.SetBool("IsDead", true);
         Destroy(this.GetComponent <Rigidbody2D>());
         Destroy(this.GetComponent <CapsuleCollider2D>());
         deathTime = Time.time;
     }
 }