Ejemplo n.º 1
0
    public BaseCharacter GetWaveCharacter(WaveCharacterInfoClass character)
    {
        BaseCharacter res;

        res = WaveCharcters.Where(r => r.CharInfo.CharacterID == character.CharacterName && !r.IsOnField && ((r.CharInfo.BaseCharacterType == BaseCharType.MinionType_Script && !r.gameObject.activeInHierarchy) ||
                                                                                                             (r.CharInfo.BaseCharacterType != BaseCharType.MinionType_Script))).FirstOrDefault();
        if (res == null)
        {
            res = CreateChar(character.CharacterName);
        }
        else
        {
            res.gameObject.SetActive(true);
        }
        res.gameObject.SetActive(true);
        res.CharInfo.HealthStats.Base               = Random.Range(character.Health.x, character.Health.y);
        res.CharInfo.HealthStats.Regeneration       = Random.Range(character.HealthRegeneration.x, character.HealthRegeneration.y);
        res.CharInfo.StaminaStats.Base              = Random.Range(character.Stamina.x, character.Stamina.y);
        res.CharInfo.StaminaStats.Regeneration      = Random.Range(character.StaminaRegeneration.x, character.StaminaRegeneration.y);
        res.CharInfo.SpeedStats.BaseSpeed           = Random.Range(character.BaseSpeed.x, character.BaseSpeed.y);
        res.CharInfo.SpeedStats.AttackSpeedRatio    = Random.Range(character.AttackSpeedRatio.x, character.AttackSpeedRatio.y);
        res.CharInfo.DamageStats.BaseDamage         = Random.Range(character.BaseDamage.x, character.BaseDamage.y);
        res.CharInfo.RapidAttack.DamageMultiplier   = character.RapidAttackMultiplier;
        res.CharInfo.PowerfulAttac.DamageMultiplier = character.PowerfulAttackMultiplier;
        res.CharInfo.Health = res.CharInfo.HealthStats.Base;
        res.CharInfo.SpeedStats.MovementSpeed = Random.Range(character.MovementSpeed.x, character.MovementSpeed.y);
        res.CharInfo.MovementTimer            = character.MovementTimer;


        res.CharInfo.HealthStats.B_Base               = res.CharInfo.HealthStats.Base;
        res.CharInfo.HealthStats.B_Regeneration       = res.CharInfo.HealthStats.Regeneration;
        res.CharInfo.StaminaStats.B_Base              = res.CharInfo.StaminaStats.Base;
        res.CharInfo.StaminaStats.B_Regeneration      = res.CharInfo.StaminaStats.Regeneration;
        res.CharInfo.SpeedStats.B_BaseSpeed           = res.CharInfo.SpeedStats.BaseSpeed;
        res.CharInfo.SpeedStats.B_AttackSpeedRatio    = res.CharInfo.SpeedStats.AttackSpeedRatio;
        res.CharInfo.DamageStats.B_BaseDamage         = res.CharInfo.DamageStats.BaseDamage;
        res.CharInfo.RapidAttack.B_DamageMultiplier   = res.CharInfo.RapidAttack.DamageMultiplier;
        res.CharInfo.PowerfulAttac.B_DamageMultiplier = res.CharInfo.PowerfulAttac.DamageMultiplier;
        res.CharInfo.SpeedStats.B_MovementSpeed       = res.CharInfo.SpeedStats.MovementSpeed;
        res.CharInfo.B_MovementTimer = res.CharInfo.MovementTimer;


        ((MinionType_Script)res).UpDownPerc = character.UpDownPerc;
        return(res);
    }
Ejemplo n.º 2
0
 public StartingCharactersForWaveClass(bool inRandomPos, List <Vector2Int> pos, WaveCharacterInfoClass typeOfCharacter)
 {
     InRandomPos     = inRandomPos;
     Pos             = pos;
     TypeOfCharacter = typeOfCharacter;
 }