public void AttachArtifact() { if (artifactObject != null) { Destroy(artifactObject); } GameObject temp = (GameObject)GameObject.Instantiate(playerMain.GetArtifact().ojectAndAttachment.objectPrefab); temp.GetComponent <Renderer> ().material.color = playerMain.GetArtifactInst().GetHalfQualityColor(); foreach (Transform t in attachmentPoints) { if (string.Equals(t.name, "_" + playerMain.GetArtifact().ojectAndAttachment.attachmentNameHold)) { temp.transform.parent = t; } } temp.transform.localPosition = Vector3.zero; temp.transform.localRotation = Quaternion.Euler(0, 0, 90); artifactObject = temp; }
public void UpdateAbilityIconFromItem(ItemType itemType) { if (itemType == ItemType.weapon) { abilityIcons[0].UpdateIcon(playerMain.GetWeapon().action); } if (itemType == ItemType.armor) { abilityIcons[1].UpdateIcon(playerMain.GetArmor().action); } if (itemType == ItemType.artifact) { abilityIcons[2].UpdateIcon(playerMain.GetArtifact().action); } }
public void AddArtifactAbility() { artifactAbility = playerMain.GetArtifact().action; }