public void SetWeaponData(WeaponGameObjectData weapon) { for (var i = 0; i < (int)WeaponPartLocation.EndOfTheWorld; ++i) { _attachments[i].SetWeapon(weapon); } }
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(); } }