protected virtual void Start() { //Set layer to player gameObject.layer = 10; Physics2D.IgnoreLayerCollision(8, 10); playerVariable.CurrentScore = 0; pickUpSound = pickUpSound.Initialize(gameObject); }
protected override void Awake() { base.Awake(); rb = GetComponent <Rigidbody2D> (); if (explosionSound) { explosionSound = explosionSound.Initialize(gameObject); } }
private void Awake() { Instance = this; IsGameRunning = true; roundTimer = levelFightTime; BGM = BGM.Initialize(gameObject); BGM.Play(); //levels = levels.RandomizeList(); }
protected override void Awake() { base.Awake(); projRB = GetComponent <Rigidbody2D> (); shakeCam = FindObjectOfType <CameraShake> (); if (explosionSound) { explosionSound = explosionSound.Initialize(gameObject); } }
private void Awake() { instance = this; mainMenuMusic = mainMenuMusic.Initialize(gameObject); mainMenuMusic.Play(); buttonPress = buttonPress.Initialize(gameObject); beeping = beeping.Initialize(gameObject); //timer.gameObject.SetActive(false); }
protected override void Awake() { base.Awake(); rb = GetComponent <Rigidbody2D> (); velocity = transform.right * FireForce; transform.rotation = Quaternion.Euler(Vector3.zero); if (explosionSound) { explosionSound = explosionSound.Initialize(gameObject); } }
protected virtual void Awake() { //set projectile to bullet layer //than ignore the gun layer //so bullet doesnt blow up on gun gameObject.layer = 9; Physics2D.IgnoreLayerCollision(8, 9); Physics2D.IgnoreLayerCollision(9, 11); if (fireSound) { fireSound = fireSound.Initialize(gameObject); } }