public Sprite GetCharacterUIImage(int charId) { CharStatsScript charStats = this.characterData[charId]; Sprite sprite = charStats.charSprite; return(sprite); }
public void Init() { if (stats == null) { Debug.Log("Stats NULL! GETTING COMPONENT"); stats = this.GetComponent <CharStatsScript>(); } if (stats.charSprite == null) { //get reference to the character's sprite stats.charSprite = this.GetComponent <SpriteRenderer>().sprite; } }
public void StatsAsScript(ref CharStatsScript statsScript) { statsScript.Status = this.Status; statsScript.HP = this.HP; statsScript.MaxHP = this.MaxHP; statsScript.AP = this.AP; statsScript.Strength = this.Strength; statsScript.Stamina = this.Stamina; statsScript.WillPower = this.WillPower; statsScript.Intelligence = this.Intelligence; statsScript.Speed = this.Speed; statsScript.CombatAbilities = this.CombatAbilities; statsScript.CharName = this.CharName; statsScript.ID = this.ID; statsScript.DialogMgr = this.DialogMgr; statsScript.charSprite = this.charSprite; statsScript.FocusType = this.FocusType; statsScript.BehaviorType = this.BehaviorType; statsScript.AnimatorType = this.AnimatorType; }
public void Copy(CharStatsScript StatsToCopy) { this.Status = StatsToCopy.Status; this.HP = StatsToCopy.HP; this.MaxHP = StatsToCopy.MaxHP; this.AP = StatsToCopy.AP; this.Strength = StatsToCopy.Strength; this.Stamina = StatsToCopy.Stamina; this.WillPower = StatsToCopy.WillPower; this.Intelligence = StatsToCopy.Intelligence; this.Speed = StatsToCopy.Speed; this.CombatAbilities = StatsToCopy.CombatAbilities; this.ID = StatsToCopy.ID; this.CharName = StatsToCopy.CharName; this.DialogMgr = StatsToCopy.DialogMgr; this.charSprite = StatsToCopy.charSprite; this.XP = StatsToCopy.XP; this.FocusType = StatsToCopy.FocusType; this.BehaviorType = StatsToCopy.BehaviorType; this.AnimatorType = StatsToCopy.AnimatorType; }