Exemplo n.º 1
0
    public Sprite GetCharacterUIImage(int charId)
    {
        CharStatsScript charStats = this.characterData[charId];
        Sprite          sprite    = charStats.charSprite;

        return(sprite);
    }
Exemplo n.º 2
0
 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;
     }
 }
Exemplo n.º 3
0
 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;
 }
Exemplo n.º 4
0
 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;
 }