using UnityEngine;
using System.Collections;
using ORKFramework;
using ORKFramework.Behaviours;
public class getequipmenticons : MonoBehaviour {
public Texture2D icon1;
public Texture2D icon2;
// Use this for initialization
void Start () {
}
// Update is called once per frame
void Update () {
CombatantComponent combatantComponent = gameObject.
GetComponent<CombatantComponent> ();
if (combatantComponent != null) {
Combatant combatant = combatantComponent.combatant;
icon1 = combatant.Equipment[0]getequipmenticons();
}
}
}
It looks like you're new here. If you want to get involved, click one of these buttons!
if(combatant.Equipment[0].Equipped && combatant.Equipment[0].Equipment != null)
To get the item, use this function:
Texture2D icon = combatant.Equipment[0].Equipment.GetIcon();
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
if(combatant.Equipment[4].Equipped && combatant.Equipment[4].Equipment != null)
so after i check to make sure something is equipped the other code snip will pull the icon off the equipped item?
icon = combatant.Equipment[4].Equipment.GetIcon();
just making sure im understanding this correctly.
Follow the game Development on Twitter https://twitter.com/Fore_Lore_Games
or check out the face book page here https://www.facebook.com/ForeLoreGames
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
Follow the game Development on Twitter https://twitter.com/Fore_Lore_Games
or check out the face book page here https://www.facebook.com/ForeLoreGames
Follow the game Development on Twitter https://twitter.com/Fore_Lore_Games
or check out the face book page here https://www.facebook.com/ForeLoreGames