// Use this for initialization void Start() { if (curWeapon == null) { curWeapon = GetComponent<weaponScript>(); } if (showCurrentWeapon == null) { showCurrentWeapon = GetComponent<WeaponGUI>(); } }
// Use this for initialization void Start() { if (weapons == null) { weapons = GameObject.FindGameObjectWithTag("Player").GetComponent<weaponScript>(); } }
void Awake() { //getting the weapon weapon = GetComponent <weaponScript>(); }
// Use this for initialization void Start() { maxLife = 5 * constitution; life = maxLife; minDamage = strengh / 2; maxDamage = minDamage + 4; if (arm == null) { arm = GetComponent<weaponScript>(); } }