public static CharStats GetPossessor(ItemPossessor possessor) { int converted = GetCharPos(possessor); switch (converted) { case 0: case 1: case 2: case 3: case 4: case 5: CharStats temp = GameManager.Instance.PlayerStats[converted]; if (temp.gameObject.activeInHierarchy) { return(temp); } else { return(null); } default: return(null); } }
public static string GetPossessorName(ItemPossessor possessor) { int converted = GetCharPos(possessor); switch (converted) { case BAG: return(bagPossessor); case 0: case 1: case 2: case 3: case 4: case 5: CharStats temp = GameManager.Instance.PlayerStats[converted]; if (temp.gameObject.activeInHierarchy) { return(temp.CharacterName); } else { return(""); } default: return(""); } }
private static int GetCharPos(ItemPossessor possessor) { switch (possessor) { case ItemPossessor.BAG: return(BAG); case ItemPossessor.P1: return(0); case ItemPossessor.P2: return(1); case ItemPossessor.P3: return(2); case ItemPossessor.P4: return(3); case ItemPossessor.P5: return(4); default: return(NONE); } }