void OnTriggerEnter(Collider other) { ThrowLogic throwLogic = other.GetComponentInChildren <ThrowLogic>(); if (throwLogic) { throwLogic.AddSnow(m_SnowQuantity); Destroy(gameObject); } }
// -------------------------------------------------------------- private void Awake() { m_CharacterController = GetComponent <CharacterController>(); m_AnimationController = GetComponent <Animator>(); m_ThrowScript = GetComponent <ThrowLogic>(); bool allReferencesSetCorrectly = false; CheckReferencesForNull(out allReferencesSetCorrectly); if (!allReferencesSetCorrectly) { Debug.LogError("FATAL ERROR: Not all references have been set correctly!"); } }