void Start() { musicSelector = GetComponent <MusicSelector>(); weapon = transform.GetChild(0).GetChild(0).GetChild(0); baseFOV = Camera.main.fieldOfView; }
void Awake() { main = this; //Poorly implemented singleton thing, I guess. hud = FindObjectOfType <HUDManager>(); musicPlayer = GetComponentInChildren <MusicSelector>(); VirtualControlManager.SetAllDefaultPlayerControls(); enemyPlacer = GetComponent <EnemyPlacer>(); }
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; } }