private void GiveWeapon(string weaponCode) { GameObject gameObject = GameObject.Find("Me"); if (null != gameObject) { LocalController component = gameObject.GetComponent <LocalController>(); if (null != component) { component.PickupFromTemplate(weaponCode); if (weaponCode != "waf") { TutorHelpDialog tutorHelpDialog = (TutorHelpDialog)DialogManager.Instance.Popup(DialogManager.DIALOG_INDEX.TUTORHELP, exclusive: true); if (tutorHelpDialog != null) { tutorHelpDialog.OpenNext((!(GlobalVars.Instance.preWeaponCode == weaponCode)) ? true : false); GlobalVars.Instance.preWeaponCode = weaponCode; } } } } }