public BaseStat(CharacterStatId statId, float originValue) { StatId = statId; this.originValue = originValue; this.activeValue = originValue; this.buffValue = 1f; }
public BaseStat GetStat(CharacterStatId id) { if (Stats != null) { for (int i = 0; i < Stats.Count; i++) { if (Stats[i].StatId == id) { return(Stats[i]); } } } return(null); }
protected virtual float GetCharacterStat(CharacterStatId characterStatId) { var statHashSet = _gameContext.GetEntitiesWithCharacterCharacterStats(_entity.characterCharacterMetaData.id); if (statHashSet != null) { var statEntity = statHashSet.FirstOrDefault(); if (statEntity != null) { var attackRange = statEntity.characterCharacterStats.GetStat(characterStatId); if (attackRange != null) { return(attackRange.ActiveValue); } } } return(0f); }
protected StatFunction(CharacterStatId stat, int order) { Stat = stat; Order = order; }