Example #1
0
 public void SetWeaponData(WeaponGameObjectData weapon)
 {
     for (var i = 0; i < (int)WeaponPartLocation.EndOfTheWorld; ++i)
     {
         _attachments[i].SetWeapon(weapon);
     }
 }
Example #2
0
 private void WeaponAssetLoadSuccess(UnityObject weapon, int correctId)
 {
     WeaponId = correctId;
     RemoveWeapon();
     Weapon = new WeaponGameObjectData {
         Obj = weapon
     };
     Attachment.SetWeaponData(Weapon);
     MountWeapon();
     ChangeWeaponShader();
 }
Example #3
0
        public void SetWeapon(WeaponGameObjectData weapon)
        {
            Weapon = weapon;

            if (AttachmentId <= 0)
            {
                RemoveAttachment();
            }
            else
            {
                LoadResource();
            }
        }