public void EquipWeapon(WeaponBase weapon) { if (this.Weapon != null) { ThrowWeapon(this.Weapon); } this.Weapon = weapon; OnWeaponChanged?.Invoke(); OnWeaponDurabilityChanged?.Invoke(); if (weapon == null) { ItemBase createdItem = ItemFactory.Instance.Create("Basic_Weapon"); createdItem.Use(ActorContainer.Instance.LocalCharacter); return; } this.Weapon.transform.SetParent(_weaponParent.transform, false); this.Weapon.transform.localPosition = Vector2.zero; AppSound.instance.SE_itembox_open.Play(); }
public void WeaponDurabilityChnaged() { OnWeaponDurabilityChanged?.Invoke(); }