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