public void AddAirshipCharacterExp(int airshipSlotNum, int exp) { if (airshipSlotNum < this.dataObject.charInAirshipSlotToInventory.Length) { CharacterSerialized cp = this.dataObject.characterInventory[this.dataObject.charInAirshipSlotToInventory[airshipSlotNum]]; cp.roleExp[(int)cp.curRole] += exp; } }
public void SetAirshipCharacterCurMp(int airshipSlotNum, int mp) { if (airshipSlotNum < this.dataObject.charInAirshipSlotToInventory.Length) { CharacterSerialized cp = this.dataObject.characterInventory[this.dataObject.charInAirshipSlotToInventory[airshipSlotNum]]; cp.curMp = mp; } }
public GameEnum.CharacterName GetInventoryCharacterName(int inventoryNum) { if (inventoryNum < this.dataObject.characterInventory.Count) { CharacterSerialized cp = this.dataObject.characterInventory[inventoryNum]; return(cp.charName); } Debug.Log("cannot find character name"); return(GameEnum.CharacterName.EMPTY); }
public int GetInventoryCharacterCurMp(int inventoryNum) { if (inventoryNum < this.dataObject.characterInventory.Count) { CharacterSerialized cp = this.dataObject.characterInventory[inventoryNum]; return(cp.curMp); } Debug.Log("cannot find character cur mp"); return(0); }
public GameEnum.AbilityName GetInventoryCharacterAbilityName(int inventoryNum) { if (inventoryNum < this.dataObject.characterInventory.Count) { CharacterSerialized cp = this.dataObject.characterInventory[inventoryNum]; return(cp.ability); } Debug.Log("cannot find character ability name"); return(GameEnum.AbilityName.NONE); }
public int[] GetInventoryCharacterRoleExp(int inventoryNum) { if (inventoryNum < this.dataObject.characterInventory.Count) { CharacterSerialized cp = this.dataObject.characterInventory[inventoryNum]; return(cp.roleExp); } Debug.Log("cannot find character exp"); return(null); }
public GameEnum.RoleName GetInventoryCharacterCurRole(int inventoryNum) { if (inventoryNum < this.dataObject.characterInventory.Count) { CharacterSerialized cp = this.dataObject.characterInventory[inventoryNum]; return(cp.curRole); } Debug.Log("cannot find character exp"); return(GameEnum.RoleName.WANDERER); }
// Get string name of character from binary. public string GetInventoryCharacterDescription(int inventoryNum) { if (inventoryNum < this.dataObject.characterInventory.Count) { CharacterSerialized cp = this.dataObject.characterInventory[inventoryNum]; return(cp.desc); } Debug.Log("cannot find character description"); return(""); }
// Get string name of character from binary. public string GetInventoryCharacterStringName(int inventoryNum) { if (inventoryNum < this.dataObject.characterInventory.Count) { CharacterSerialized cp = this.dataObject.characterInventory[inventoryNum]; return(cp.name); } Debug.Log("cannot find character string name"); return(""); }
/*public void SetAbility (GameEnum.AbilityName abilityName, A_Ability ability){ * this.abilitiesDict.Add (abilityName, ability); * }*/ // Get character data from binary, find matching icon in scriptable. public Sprite GetInventoryCharacterSpriteIcon(int inventoryNum) { if (inventoryNum < this.dataObject.characterInventory.Count) { // Get character data from binary. CharacterSerialized cp = this.dataObject.characterInventory[inventoryNum]; // Get int mapped from character name enum. int charNum = (int)cp.charName; // Find character in scriptable, get matching icon. if (charNum < this.characterScriptables.characters.Length) { return(this.characterScriptables.characters[charNum].icon); } } Debug.Log("cannot find character icon"); return(null); }