public void setWeapon(BaseWeapon newWeapon) { CurWeapon = newWeapon; //Debug.Log (newWeapon); CurWeapon.AttachWeapon(weaponSlot, weaponOffset, Quaternion.Euler(weaponRotatorOffset), this); }
//Setting new weapon if not null try to attach it public void setWeapon(BaseWeapon newWeapon) { CurWeapon = newWeapon; //Debug.Log (newWeapon); if(CurWeapon!=null){ CurWeapon.AttachWeapon(weaponSlot,weaponOffset,Quaternion.Euler (weaponRotatorOffset),this); if(animator!=null){ animator.SetWeaponType(CurWeapon.animType); } } }
public void setWeapon(BaseWeapon newWeapon) { CurWeapon = newWeapon; //Debug.Log (newWeapon); CurWeapon.AttachWeapon(weaponSlot,weaponOffset,Quaternion.Euler (weaponRotatorOffset),this); }