Example #1
0
    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;
    }
Example #2
0
 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);
     }
 }
Example #3
0
 public void AddArmorAbility()
 {
     armorAbility = playerMain.GetArmor().action;
 }
 public void SetupRolls()
 {
     maxInvincRolls         = playerMain.GetArmor().GetMaxRolls(playerMain.GetArmorInst().quality);
     invincRollRechargeTime = playerMain.GetArmor().GetRollRechargeTime(playerMain.GetArtifactInst().quality);
 }