//Function called internally to update the sprite bases using the current list indexes
    public void UpdateSpriteBase()
    {
        //Creating a new sprite package to pass to the sprite base
        CharSpritePackage newSprites = new CharSpritePackage();

        //Setting the character's sprite base
        newSprites.spriteBase = this.spriteBasePrefab;

        //Setting the character's hair
        newSprites.hairSprites = this.hairSprites[this.hairIndex];
        //Setting the character's facial hair
        newSprites.facialHairSprites = this.facialHairSprites[this.faceHairIndex];
        //Setting the character's head
        newSprites.headSprites = this.headSprites[this.headIndex];
        //Setting the character's eyes
        newSprites.eyeSprite = this.eyeSprites[this.eyeIndex];
        //Setting the character's arms
        newSprites.rightArmSprites = this.armSprites[this.armIndex];
        newSprites.leftArmSprites  = this.armSprites[this.armIndex];
        //Setting the character's body
        newSprites.bodySprites = this.bodySprites[this.bodyIndex];
        //Setting the character's legs
        newSprites.legSprites = this.legSprites[this.legIndex];

        //Setting the character's hair color
        newSprites.hairColor = this.hairColorGradient.Evaluate(this.hairColorSlider.value);
        newSprites.hairColor = new Color(newSprites.hairColor.r * this.hairDarknessSlider.value,
                                         newSprites.hairColor.g * this.hairDarknessSlider.value,
                                         newSprites.hairColor.b * this.hairDarknessSlider.value,
                                         1);
        this.hairColorExampleImage.color = newSprites.hairColor;

        //Setting the character's facial hair color
        newSprites.facialHairColor = this.facialHairColorGradient.Evaluate(this.facialHairColorSlider.value);
        newSprites.facialHairColor = new Color(newSprites.facialHairColor.r * this.facialHairDarknessSlider.value,
                                               newSprites.facialHairColor.g * this.facialHairDarknessSlider.value,
                                               newSprites.facialHairColor.b * this.facialHairDarknessSlider.value,
                                               1);
        this.facialHairColorExampleImage.color = newSprites.facialHairColor;

        //Setting the character's skin color
        newSprites.skinColor = this.skinColorGradient.Evaluate(this.skinColorSlider.value);
        newSprites.skinColor = new Color(newSprites.skinColor.r * this.skinDarknessSlider.value,
                                         newSprites.skinColor.g * this.skinDarknessSlider.value,
                                         newSprites.skinColor.b * this.skinDarknessSlider.value,
                                         1);
        this.skinColorExampleImage.color = newSprites.skinColor;

        //Setting our sprite package
        this.spritePackage = newSprites;

        //Sending the new sprites to the base
        this.charBaseToCustomizeSide.SetSpriteImages(newSprites, null);
    }
Esempio n. 2
0
    //Constructor for this class
    public CharacterSaveData(Character characterToSave_)
    {
        //Setting variables from Character.cs
        this.firstName = characterToSave_.firstName;
        this.lastName  = characterToSave_.lastName;
        this.sex       = characterToSave_.sex;

        //Setting variables from RaceTypes.cs
        this.race        = characterToSave_.charRaceTypes.race;
        this.subtypeList = characterToSave_.charRaceTypes.subtypeList;

        //Setting variables from Skills.cs
        this.unarmed       = characterToSave_.charSkills.GetSkillLevelValue(SkillList.Unarmed);
        this.daggers       = characterToSave_.charSkills.GetSkillLevelValue(SkillList.Daggers);
        this.swords        = characterToSave_.charSkills.GetSkillLevelValue(SkillList.Swords);
        this.mauls         = characterToSave_.charSkills.GetSkillLevelValue(SkillList.Mauls);
        this.poles         = characterToSave_.charSkills.GetSkillLevelValue(SkillList.Poles);
        this.bows          = characterToSave_.charSkills.GetSkillLevelValue(SkillList.Bows);
        this.shields       = characterToSave_.charSkills.GetSkillLevelValue(SkillList.Shields);
        this.arcaneMagic   = characterToSave_.charSkills.GetSkillLevelValue(SkillList.ArcaneMagic);
        this.holyMagic     = characterToSave_.charSkills.GetSkillLevelValue(SkillList.HolyMagic);
        this.darkMagic     = characterToSave_.charSkills.GetSkillLevelValue(SkillList.DarkMagic);
        this.fireMagic     = characterToSave_.charSkills.GetSkillLevelValue(SkillList.FireMagic);
        this.waterMagic    = characterToSave_.charSkills.GetSkillLevelValue(SkillList.WaterMagic);
        this.windMagic     = characterToSave_.charSkills.GetSkillLevelValue(SkillList.WindMagic);
        this.electricMagic = characterToSave_.charSkills.GetSkillLevelValue(SkillList.ElectricMagic);
        this.stoneMagic    = characterToSave_.charSkills.GetSkillLevelValue(SkillList.StoneMagic);
        this.survivalist   = characterToSave_.charSkills.GetSkillLevelValue(SkillList.Survivalist);
        this.social        = characterToSave_.charSkills.GetSkillLevelValue(SkillList.Social);

        //Setting variables from PhysicalState.cs
        this.maxHP               = characterToSave_.charPhysState.maxHealth;
        this.currentHP           = characterToSave_.charPhysState.currentHealth;
        this.maxFood             = characterToSave_.charPhysState.maxFood;
        this.currentFood         = characterToSave_.charPhysState.currentFood;
        this.maxWater            = characterToSave_.charPhysState.maxWater;
        this.currentWater        = characterToSave_.charPhysState.currentWater;
        this.maxSleep            = characterToSave_.charPhysState.maxSleep;
        this.currentSleep        = characterToSave_.charPhysState.currentSleep;
        this.requireFood         = characterToSave_.charPhysState.requiresFood;
        this.requireWater        = characterToSave_.charPhysState.requiresWater;
        this.requireSleep        = characterToSave_.charPhysState.requiresSleep;
        this.startingHealthCurve = characterToSave_.charPhysState.startingHealthCurve;
        this.healthCurveLevels   = characterToSave_.charPhysState.healthCurveLevels;

        this.highestHealthPercent = characterToSave_.charPhysState.highestHealthPercent;
        this.highestFoodPercent   = characterToSave_.charPhysState.highestFoodPercent;
        this.highestWaterPercent  = characterToSave_.charPhysState.highestWaterPercent;
        this.highestSleepPercent  = characterToSave_.charPhysState.highestSleepPercent;

        this.trackingHealthPercents = characterToSave_.charPhysState.trackingHealthPercents;
        this.trackingFoodPercents   = characterToSave_.charPhysState.trackingFoodPercents;
        this.trackingWaterPercents  = characterToSave_.charPhysState.trackingWaterPercents;
        this.trackingSleepPercents  = characterToSave_.charPhysState.trackingSleepPercents;

        //Setting variables from CombatStats.cs
        this.currentInitiativeSpeed = characterToSave_.charCombatStats.currentInitiativeSpeed;
        this.startingCol            = characterToSave_.charCombatStats.startingPositionCol;
        this.startingRow            = characterToSave_.charCombatStats.startingPositionRow;
        this.accuracy = characterToSave_.charCombatStats.accuracy;
        this.evasion  = characterToSave_.charCombatStats.evasion;

        this.combatEffects = new List <string>();
        for (int ce = 0; ce < characterToSave_.charCombatStats.combatEffects.Count; ++ce)
        {
            this.combatEffects.Add(JsonUtility.ToJson(characterToSave_.charCombatStats.combatEffects[ce]));
        }

        //Setting variables from ActionList.cs
        this.defaultActions = new List <string>();
        for (int da = 0; da < characterToSave_.charActionList.defaultActions.Count; ++da)
        {
            PrefabIDTagData actionIDData = new PrefabIDTagData(characterToSave_.charActionList.defaultActions[da].GetComponent <IDTag>());
            this.defaultActions.Add(JsonUtility.ToJson(actionIDData));
        }

        this.rechargingSpells = new List <string>();
        for (int rs = 0; rs < characterToSave_.charActionList.rechargingSpells.Count; ++rs)
        {
            this.rechargingSpells.Add(JsonUtility.ToJson(characterToSave_.charActionList.rechargingSpells[rs]));
        }

        //Setting variables from CharacterSprites.cs
        this.ourSprites = characterToSave_.charSprites.allSprites;

        //Setting all of the equipped object references
        if (characterToSave_.charInventory.helm != null)
        {
            this.helmObj = JsonUtility.ToJson(new PrefabIDTagData(characterToSave_.charInventory.helm.GetComponent <IDTag>()));
        }
        if (characterToSave_.charInventory.chestPiece != null)
        {
            this.chestObj = JsonUtility.ToJson(new PrefabIDTagData(characterToSave_.charInventory.chestPiece.GetComponent <IDTag>()));
        }
        if (characterToSave_.charInventory.leggings != null)
        {
            this.legObj = JsonUtility.ToJson(new PrefabIDTagData(characterToSave_.charInventory.leggings.GetComponent <IDTag>()));
        }
        if (characterToSave_.charInventory.gloves != null)
        {
            this.gloveObj = JsonUtility.ToJson(new PrefabIDTagData(characterToSave_.charInventory.gloves.GetComponent <IDTag>()));
        }
        if (characterToSave_.charInventory.shoes != null)
        {
            this.shoeObj = JsonUtility.ToJson(new PrefabIDTagData(characterToSave_.charInventory.shoes.GetComponent <IDTag>()));
        }
        if (characterToSave_.charInventory.cloak != null)
        {
            this.cloakObj = JsonUtility.ToJson(new PrefabIDTagData(characterToSave_.charInventory.cloak.GetComponent <IDTag>()));
        }
        if (characterToSave_.charInventory.necklace != null)
        {
            this.necklaceObj = JsonUtility.ToJson(new PrefabIDTagData(characterToSave_.charInventory.necklace.GetComponent <IDTag>()));
        }
        if (characterToSave_.charInventory.ring != null)
        {
            this.ringObj = JsonUtility.ToJson(new PrefabIDTagData(characterToSave_.charInventory.ring.GetComponent <IDTag>()));
        }

        if (characterToSave_.charInventory.leftHand != null)
        {
            this.leftHandObj = JsonUtility.ToJson(new PrefabIDTagData(characterToSave_.charInventory.leftHand.GetComponent <IDTag>()));
        }
        if (characterToSave_.charInventory.rightHand != null)
        {
            this.rightHandObj = JsonUtility.ToJson(new PrefabIDTagData(characterToSave_.charInventory.rightHand.GetComponent <IDTag>()));
        }

        //Looping through all of the character inventory items to save their object references
        this.inventorySlots = new List <string>();
        this.stackedItems   = new List <string>();
        for (int i = 0; i < characterToSave_.charInventory.itemSlots.Count; ++i)
        {
            //Making sure the current inventory object isn't null
            if (characterToSave_.charInventory.itemSlots[i] != null)
            {
                //Reference to the item's IDTag component
                IDTag itemTag = characterToSave_.charInventory.itemSlots[i].GetComponent <IDTag>();

                //Saving the IDTag info
                this.inventorySlots.Add(JsonUtility.ToJson(new PrefabIDTagData(itemTag)));

                //If the current item is a stack
                if (characterToSave_.charInventory.itemSlots[i].currentStackSize > 1)
                {
                    //Creating a new InventoryItemStackData class to store the item stack
                    InventoryItemStackData stack = new InventoryItemStackData(i, itemTag, characterToSave_.charInventory.itemSlots[i].currentStackSize);
                    //Adding a serialized version of the stack data to our list of stacked items
                    this.stackedItems.Add(JsonUtility.ToJson(stack));
                }
            }
            //If the current item is null, we set a null slot to keep the empty space
            else
            {
                this.inventorySlots.Add("");
            }
        }

        //Looping through all of the character perks to save their object references
        this.perkNames = new List <string>();
        for (int p = 0; p < characterToSave_.charPerks.allPerks.Count; ++p)
        {
            //Making sure the current perk isn't null
            if (characterToSave_.charPerks.allPerks[p] != null)
            {
                //Saving this perk's ID tag info
                this.perkNames.Add(JsonUtility.ToJson(new PrefabIDTagData(characterToSave_.charPerks.allPerks[p].GetComponent <IDTag>())));
            }
        }
    }
    //Function called externally to set all of the sprite images for a character
    public void SetSpriteImages(CharSpritePackage cSprites_, Inventory characterInventory_)
    {
        //Setting the forward sprites
        this.forwardHair.sprite       = cSprites_.hairSprites.front;
        this.forwardFacialHair.sprite = cSprites_.facialHairSprites.front;
        this.forwardHead.sprite       = cSprites_.headSprites.front;
        this.forwardLeftEye.sprite    = cSprites_.eyeSprite;
        this.forwardRightEye.sprite   = cSprites_.eyeSprite;
        this.forwardBody.sprite       = cSprites_.bodySprites.front;
        this.forwardRightArm.sprite   = cSprites_.rightArmSprites.front;
        this.forwardLeftArm.sprite    = cSprites_.leftArmSprites.front;
        this.forwardLegs.sprite       = cSprites_.legSprites.front;

        //Setting the right side sprites
        this.rightSideHair.sprite       = cSprites_.hairSprites.side;
        this.rightSideFacialHair.sprite = cSprites_.facialHairSprites.side;
        this.rightSideHead.sprite       = cSprites_.headSprites.side;
        this.rightSideEye.sprite        = cSprites_.eyeSprite;
        this.rightSideBody.sprite       = cSprites_.bodySprites.side;
        this.rightSideRightArm.sprite   = cSprites_.rightArmSprites.side;
        this.rightSideLeftArm.sprite    = cSprites_.leftArmSprites.side;
        this.rightSideLegs.sprite       = cSprites_.legSprites.side;

        //Setting the left side sprites
        this.leftSideHair.sprite       = cSprites_.hairSprites.side;
        this.leftSideFacialHair.sprite = cSprites_.facialHairSprites.side;
        this.leftSideHead.sprite       = cSprites_.headSprites.side;
        this.leftSideEye.sprite        = cSprites_.eyeSprite;
        this.leftSideBody.sprite       = cSprites_.bodySprites.side;
        this.leftSideRightArm.sprite   = cSprites_.rightArmSprites.side;
        this.leftSideLeftArm.sprite    = cSprites_.leftArmSprites.side;
        this.leftSideLegs.sprite       = cSprites_.legSprites.side;

        //Setting the back sprites
        this.backHair.sprite     = cSprites_.hairSprites.back;
        this.backHead.sprite     = cSprites_.headSprites.back;
        this.backBody.sprite     = cSprites_.bodySprites.back;
        this.backRightArm.sprite = cSprites_.rightArmSprites.side;
        this.backLeftArm.sprite  = cSprites_.leftArmSprites.side;
        this.backLegs.sprite     = cSprites_.legSprites.back;

        //Setting the hair color
        this.forwardHair.color   = cSprites_.hairColor;
        this.leftSideHair.color  = cSprites_.hairColor;
        this.rightSideHair.color = cSprites_.hairColor;
        this.backHair.color      = cSprites_.hairColor;

        //Setting the facial hair color
        this.forwardFacialHair.color   = cSprites_.facialHairColor;
        this.leftSideFacialHair.color  = cSprites_.facialHairColor;
        this.rightSideFacialHair.color = cSprites_.facialHairColor;

        //Setting the forward sprite color
        this.forwardHead.color     = cSprites_.skinColor;
        this.forwardBody.color     = cSprites_.skinColor;
        this.forwardRightArm.color = cSprites_.skinColor;
        this.forwardLeftArm.color  = cSprites_.skinColor;
        this.forwardLegs.color     = cSprites_.skinColor;

        //Setting the back sprite color
        this.backHead.color     = cSprites_.skinColor;
        this.backBody.color     = cSprites_.skinColor;
        this.backRightArm.color = cSprites_.skinColor;
        this.backLeftArm.color  = cSprites_.skinColor;
        this.backLegs.color     = cSprites_.skinColor;

        //Setting the left side sprite color
        this.leftSideHead.color     = cSprites_.skinColor;
        this.leftSideBody.color     = cSprites_.skinColor;
        this.leftSideLeftArm.color  = cSprites_.skinColor;
        this.leftSideRightArm.color = cSprites_.skinColor;
        this.leftSideLegs.color     = cSprites_.skinColor;

        //Setting the right side sprite color
        this.rightSideHead.color     = cSprites_.skinColor;
        this.rightSideBody.color     = cSprites_.skinColor;
        this.rightSideRightArm.color = cSprites_.skinColor;
        this.rightSideLeftArm.color  = cSprites_.skinColor;
        this.rightSideLegs.color     = cSprites_.skinColor;


        //If the character inventory given isn't null, we set all of the character armor and weapon sprites
        if (characterInventory_ != null)
        {
            //Setting the helm sprites if a helm is equipped
            if (characterInventory_.helm != null)
            {
                this.forwardHelm.sprite   = characterInventory_.helm.armorSpriteViews[0].front;
                this.backHelm.sprite      = characterInventory_.helm.armorSpriteViews[0].back;
                this.rightSideHelm.sprite = characterInventory_.helm.armorSpriteViews[0].side;
                this.leftSideHelm.sprite  = characterInventory_.helm.armorSpriteViews[0].side;

                //If this helm covers up the character's hair, we set the hair sprite to empty
                if (characterInventory_.helm.replaceCharacterSprite)
                {
                    this.forwardHair.sprite   = this.emptySprite;
                    this.backHair.sprite      = this.emptySprite;
                    this.rightSideHair.sprite = this.emptySprite;
                    this.leftSideHair.sprite  = this.emptySprite;
                }
            }
            //If there is no helm, we set them to empty
            else
            {
                this.forwardHelm.sprite   = this.emptySprite;
                this.backHelm.sprite      = this.emptySprite;
                this.rightSideHelm.sprite = this.emptySprite;
                this.leftSideHelm.sprite  = this.emptySprite;
            }

            //Setting the chestpiece sprites if a chestpiece is equipped
            if (characterInventory_.chestPiece != null)
            {
                //Looping through to find the correct sprite view to match our character's body type
                SpriteViews bodySpriteView = null;
                foreach (SpriteViews sv in characterInventory_.chestPiece.armorSpriteViews)
                {
                    //If we find the correct sprite view for our body type
                    if (sv.bodyType == cSprites_.bodySprites.bodyType)
                    {
                        //We set the sprite view and break the loop
                        bodySpriteView = sv;
                        break;
                    }
                }

                //If we found a correct sprite view
                if (bodySpriteView != null)
                {
                    this.forwardChestpiece.sprite   = bodySpriteView.front;
                    this.backChestpiece.sprite      = bodySpriteView.back;
                    this.rightSideChestpiece.sprite = bodySpriteView.side;
                    this.leftSideChestpiece.sprite  = bodySpriteView.side;

                    //If this chestpiece covers up the character's torso, we hide them
                    if (characterInventory_.chestPiece.replaceCharacterSprite)
                    {
                        this.forwardBody.sprite   = this.emptySprite;
                        this.backBody.sprite      = this.emptySprite;
                        this.rightSideBody.sprite = this.emptySprite;
                        this.leftSideBody.sprite  = this.emptySprite;
                    }
                }
                //If we didn't find the correct sprite view
                else
                {
                    Debug.LogError("ERROR! CharacterSpriteBase.SetSpriteImages, No valid body type for chestpiece");
                    //throw new System.Exception("ERROR! CharacterSpriteBase.SetSpriteImages, No valid body type for chestpiece");
                }
            }
            //If there's no chestpiece, we set them to empty
            else
            {
                this.forwardChestpiece.sprite   = this.emptySprite;
                this.backChestpiece.sprite      = this.emptySprite;
                this.rightSideChestpiece.sprite = this.emptySprite;
                this.leftSideChestpiece.sprite  = this.emptySprite;
            }

            //Setting the leggings sprites if leggings are equipped
            if (characterInventory_.leggings != null)
            {
                //Looping through to find the correct sprite view to match our character's body type
                SpriteViews legSpriteView = null;
                foreach (SpriteViews sv in characterInventory_.leggings.armorSpriteViews)
                {
                    //If we find the correct sprite view for our body type
                    if (sv.bodyType == cSprites_.legSprites.bodyType)
                    {
                        //We set the sprite view and break the loop
                        legSpriteView = sv;
                        break;
                    }
                }

                //If we found a correct sprite view
                if (legSpriteView != null)
                {
                    this.forwardLeggings.sprite   = legSpriteView.front;
                    this.backLeggings.sprite      = legSpriteView.back;
                    this.rightSideLeggings.sprite = legSpriteView.side;
                    this.leftSideLeggings.sprite  = legSpriteView.side;
                }
                //If we didn't find the correct sprite view
                else
                {
                    throw new System.Exception("ERROR! CharacterSpriteBase.SetSpriteImages, No valid body type for leggings");
                }
            }
            //If there's no leggings, we set them to empty
            else
            {
                this.forwardLeggings.sprite   = this.emptySprite;
                this.backLeggings.sprite      = this.emptySprite;
                this.rightSideLeggings.sprite = this.emptySprite;
                this.leftSideLeggings.sprite  = this.emptySprite;
            }

            //Setting the shoe sprites if shoes are equipped
            if (characterInventory_.shoes != null)
            {
                //Looping through to find the correct sprite view to match our character's body type
                SpriteViews feetSpriteView = null;
                foreach (SpriteViews sv in characterInventory_.shoes.armorSpriteViews)
                {
                    //If we find the correct sprite view for our body type
                    if (sv.bodyType == cSprites_.legSprites.bodyType)
                    {
                        //We set the sprite view and break the loop
                        feetSpriteView = sv;
                        break;
                    }
                }

                //If we found a correct sprite view
                if (feetSpriteView != null)
                {
                    this.forwardShoes.sprite   = feetSpriteView.front;
                    this.backShoes.sprite      = feetSpriteView.back;
                    this.rightSideShoes.sprite = feetSpriteView.side;
                    this.leftSideShoes.sprite  = feetSpriteView.side;
                }
                //If we didn't find the correct sprite view
                else
                {
                    throw new System.Exception("ERROR! CharacterSpriteBase.SetSpriteImages, No valid body type for shoes");
                }
            }
            //If there's no shoes, we set them to empty
            else
            {
                this.forwardShoes.sprite   = this.emptySprite;
                this.backShoes.sprite      = this.emptySprite;
                this.rightSideShoes.sprite = this.emptySprite;
                this.leftSideShoes.sprite  = this.emptySprite;
            }

            //Setting the glove sprites if gloves are equipped
            if (characterInventory_.gloves != null)
            {
                this.forwardRightGlove.sprite   = characterInventory_.gloves.armorSpriteViews[0].front;
                this.backRightGlove.sprite      = characterInventory_.gloves.armorSpriteViews[0].back;
                this.rightSideRightGlove.sprite = characterInventory_.gloves.armorSpriteViews[0].side;
                this.leftSideRightGlove.sprite  = characterInventory_.gloves.armorSpriteViews[0].side;

                this.forwardLeftGlove.sprite   = characterInventory_.gloves.armorSpriteViews[0].front;
                this.backLeftGlove.sprite      = characterInventory_.gloves.armorSpriteViews[0].back;
                this.rightSideLeftGlove.sprite = characterInventory_.gloves.armorSpriteViews[0].side;
                this.leftSideLeftGlove.sprite  = characterInventory_.gloves.armorSpriteViews[0].side;

                //If these gloves cover up the character's hands, we set the hand sprites to empty
                if (characterInventory_.gloves.replaceCharacterSprite)
                {
                    this.forwardRightArm.sprite   = this.emptySprite;
                    this.backRightArm.sprite      = this.emptySprite;
                    this.rightSideRightArm.sprite = this.emptySprite;
                    this.leftSideRightArm.sprite  = this.emptySprite;

                    this.forwardLeftArm.sprite   = this.emptySprite;
                    this.backLeftArm.sprite      = this.emptySprite;
                    this.rightSideLeftArm.sprite = this.emptySprite;
                    this.leftSideLeftArm.sprite  = this.emptySprite;
                }
            }
            //If there are no gloves, we set them to empty
            else
            {
                this.forwardRightGlove.sprite   = this.emptySprite;
                this.backRightGlove.sprite      = this.emptySprite;
                this.rightSideRightGlove.sprite = this.emptySprite;
                this.leftSideRightGlove.sprite  = this.emptySprite;

                this.forwardLeftGlove.sprite   = this.emptySprite;
                this.backLeftGlove.sprite      = this.emptySprite;
                this.rightSideLeftGlove.sprite = this.emptySprite;
                this.leftSideLeftGlove.sprite  = this.emptySprite;
            }

            //Setting the cloak sprites if a cloak is equipped
            if (characterInventory_.cloak != null)
            {
                this.forwardCloak.sprite   = characterInventory_.cloak.armorSpriteViews[0].front;
                this.backCloak.sprite      = characterInventory_.cloak.armorSpriteViews[0].back;
                this.rightSideCloak.sprite = characterInventory_.cloak.armorSpriteViews[0].side;
                this.leftSideCloak.sprite  = characterInventory_.cloak.armorSpriteViews[0].side;
            }
            //If there is no cloak, we set them to empty
            else
            {
                this.forwardCloak.sprite   = this.emptySprite;
                this.backCloak.sprite      = this.emptySprite;
                this.rightSideCloak.sprite = this.emptySprite;
                this.leftSideCloak.sprite  = this.emptySprite;
            }

            //Setting the right hand weapon sprites if there's a weapon equipped in that hand
            if (characterInventory_.rightHand != null)
            {
                //If the weapon sprite overlaps the character's hand (like if it's a shield or wrist claw)
                if (characterInventory_.rightHand.overlapCharacterHand)
                {
                    this.forwardRightWeapon.sprite          = this.emptySprite;
                    this.backRightWeapon.sprite             = characterInventory_.rightHand.weaponSpriteViews.back;
                    this.rightSideRightWeapon.sprite        = this.emptySprite;
                    this.leftSideRightWeapon.sprite         = characterInventory_.rightHand.weaponSpriteViews.side;
                    this.forwardRightWeaponOverlap.sprite   = characterInventory_.rightHand.weaponSpriteViews.front;
                    this.rightSideRightWeaponOverlap.sprite = characterInventory_.rightHand.weaponSpriteViews.side;

                    //If the weapon has a reverse view
                    if (characterInventory_.rightHand.reverseView != null)
                    {
                        this.leftSideRightWeapon.sprite = characterInventory_.rightHand.reverseView;
                    }
                }
                //If the weapon doesn't overlap the character hand
                else
                {
                    this.forwardRightWeapon.sprite          = characterInventory_.rightHand.weaponSpriteViews.front;
                    this.backRightWeapon.sprite             = characterInventory_.rightHand.weaponSpriteViews.back;
                    this.rightSideRightWeapon.sprite        = characterInventory_.rightHand.weaponSpriteViews.side;
                    this.leftSideRightWeapon.sprite         = characterInventory_.rightHand.weaponSpriteViews.side;
                    this.forwardRightWeaponOverlap.sprite   = this.emptySprite;
                    this.rightSideRightWeaponOverlap.sprite = this.emptySprite;

                    //If the weapon has a reverse view
                    if (characterInventory_.rightHand.reverseView != null)
                    {
                        this.leftSideRightWeapon.sprite = characterInventory_.rightHand.reverseView;
                    }
                }
            }
            //If there is no weapon, we set them to empty
            else
            {
                this.forwardRightWeapon.sprite          = this.emptySprite;
                this.backRightWeapon.sprite             = this.emptySprite;
                this.rightSideRightWeapon.sprite        = this.emptySprite;
                this.leftSideRightWeapon.sprite         = this.emptySprite;
                this.forwardRightWeaponOverlap.sprite   = this.emptySprite;
                this.rightSideRightWeaponOverlap.sprite = this.emptySprite;
            }

            //Setting the left hand weapon sprites if there's a weapon equipped in that hand
            if (characterInventory_.leftHand != null)
            {
                //If the weapon sprite overlaps the character's hand (like if it's a shield or wrist claw)
                if (characterInventory_.leftHand.overlapCharacterHand)
                {
                    this.forwardLeftWeapon.sprite         = this.emptySprite;
                    this.backLeftWeapon.sprite            = characterInventory_.leftHand.weaponSpriteViews.back;
                    this.rightSideLeftWeapon.sprite       = characterInventory_.leftHand.weaponSpriteViews.side;
                    this.leftSideLeftWeapon.sprite        = this.emptySprite;
                    this.forwardLeftWeaponOverlap.sprite  = characterInventory_.leftHand.weaponSpriteViews.front;
                    this.leftSideLeftWeaponOverlap.sprite = characterInventory_.leftHand.weaponSpriteViews.side;

                    //If the weapon has a reverse view
                    if (characterInventory_.leftHand.reverseView != null)
                    {
                        this.rightSideLeftWeapon.sprite = characterInventory_.leftHand.reverseView;
                    }
                }
                //If the weapon doesn't overlap the character hand
                else
                {
                    this.forwardLeftWeapon.sprite         = characterInventory_.leftHand.weaponSpriteViews.front;
                    this.backLeftWeapon.sprite            = characterInventory_.leftHand.weaponSpriteViews.back;
                    this.rightSideLeftWeapon.sprite       = characterInventory_.leftHand.weaponSpriteViews.side;
                    this.leftSideLeftWeapon.sprite        = characterInventory_.leftHand.weaponSpriteViews.side;
                    this.forwardLeftWeaponOverlap.sprite  = this.emptySprite;
                    this.leftSideLeftWeaponOverlap.sprite = this.emptySprite;

                    //If the weapon has a reverse view
                    if (characterInventory_.leftHand.reverseView != null)
                    {
                        this.rightSideLeftWeapon.sprite = characterInventory_.leftHand.reverseView;
                    }
                }
            }
            //If there is no weapon, we set them to empty
            else
            {
                this.forwardLeftWeapon.sprite         = this.emptySprite;
                this.backLeftWeapon.sprite            = this.emptySprite;
                this.rightSideLeftWeapon.sprite       = this.emptySprite;
                this.leftSideLeftWeapon.sprite        = this.emptySprite;
                this.forwardLeftWeaponOverlap.sprite  = this.emptySprite;
                this.leftSideLeftWeaponOverlap.sprite = this.emptySprite;
            }
        }
        //If there's no character inventory given, all of the armor sprites are empty
        else
        {
            //Setting the helms
            this.forwardHelm.sprite   = this.emptySprite;
            this.backHelm.sprite      = this.emptySprite;
            this.rightSideHelm.sprite = this.emptySprite;
            this.leftSideHelm.sprite  = this.emptySprite;

            //Setting the chestpieces
            this.forwardChestpiece.sprite   = this.emptySprite;
            this.backChestpiece.sprite      = this.emptySprite;
            this.rightSideChestpiece.sprite = this.emptySprite;
            this.leftSideChestpiece.sprite  = this.emptySprite;

            //Setting the leggings
            this.forwardLeggings.sprite   = this.emptySprite;
            this.backLeggings.sprite      = this.emptySprite;
            this.rightSideLeggings.sprite = this.emptySprite;
            this.leftSideLeggings.sprite  = this.emptySprite;

            //Setting the shoes
            this.forwardShoes.sprite   = this.emptySprite;
            this.backShoes.sprite      = this.emptySprite;
            this.rightSideShoes.sprite = this.emptySprite;
            this.leftSideShoes.sprite  = this.emptySprite;

            //Setting the right gloves
            this.forwardRightGlove.sprite   = this.emptySprite;
            this.backRightGlove.sprite      = this.emptySprite;
            this.rightSideRightGlove.sprite = this.emptySprite;
            this.leftSideRightGlove.sprite  = this.emptySprite;

            //Setting the left gloves
            this.forwardLeftGlove.sprite   = this.emptySprite;
            this.backLeftGlove.sprite      = this.emptySprite;
            this.rightSideLeftGlove.sprite = this.emptySprite;
            this.leftSideLeftGlove.sprite  = this.emptySprite;

            //Setting the cloaks
            this.forwardCloak.sprite   = this.emptySprite;
            this.backCloak.sprite      = this.emptySprite;
            this.rightSideCloak.sprite = this.emptySprite;
            this.leftSideCloak.sprite  = this.emptySprite;

            //Setting the right hand weapons
            this.forwardRightWeapon.sprite          = this.emptySprite;
            this.backRightWeapon.sprite             = this.emptySprite;
            this.rightSideRightWeapon.sprite        = this.emptySprite;
            this.leftSideRightWeapon.sprite         = this.emptySprite;
            this.forwardRightWeaponOverlap.sprite   = this.emptySprite;
            this.rightSideRightWeaponOverlap.sprite = this.emptySprite;

            //Setting the left hand weapons
            this.forwardLeftWeapon.sprite         = this.emptySprite;
            this.backLeftWeapon.sprite            = this.emptySprite;
            this.rightSideLeftWeapon.sprite       = this.emptySprite;
            this.leftSideLeftWeapon.sprite        = this.emptySprite;
            this.forwardLeftWeaponOverlap.sprite  = this.emptySprite;
            this.leftSideLeftWeaponOverlap.sprite = this.emptySprite;
        }
    }