private void Equip(Equipable equipable, Transform transform) { equipable.transform.parent = transform; equipable.transform.localPosition = Vector3.zero; equipable.transform.localRotation = Quaternion.identity; equipable.OnEquip(this); }
public void Equip(Equipable equip, int skillIndex) { if (skillIndex > 4 || skillIndex < 0) { return; } //unequip previous skill if there was one if (skillSlots[skillIndex] != null) { skillSlots[skillIndex].OnUnequip(game, this); } //equip new skill skillSlots[skillIndex] = equip; equip.OnEquip(game, this); }
private void Equip(Equipable equipable, Vector3 positionOffset, Quaternion rotationOffset) { equipable.transform.localPosition = positionOffset; equipable.transform.localRotation = rotationOffset; equipable.OnEquip(this); }