public void AttachArmor() { if (armorObject != null) { Destroy(armorObject); } GameObject temp = (GameObject)GameObject.Instantiate(playerMain.GetArmor().objectPrefab); temp.GetComponent <SkinnedMeshRenderer> ().rootBone = armatureRoot; temp.GetComponent <SkinnedMeshRenderer> ().bones = baseBodyRenderer.bones; temp.transform.parent = this.transform; temp.transform.localPosition = Vector3.zero; temp.GetComponent <Renderer> ().material.color = playerMain.GetArmorInst().GetHalfQualityColor(); armorObject = 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 AddArmorAbility() { armorAbility = playerMain.GetArmor().action; }
public void SetupRolls() { maxInvincRolls = playerMain.GetArmor().GetMaxRolls(playerMain.GetArmorInst().quality); invincRollRechargeTime = playerMain.GetArmor().GetRollRechargeTime(playerMain.GetArtifactInst().quality); }