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

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