public void InitPvP(BattleGroup _battleGroup, HeroData data) { heroData = data; if (_battleGroup != null) { heroData.battleGroupID = _battleGroup.battleType.ToString(); } else { heroData.battleGroupID = string.Empty; } SetBattleGroup(_battleGroup); buffController.owner = this; stats.Init(); heroData.RecalculateStats(true, power); defaultMoveBehavior = new HeroMoveBehaviorRun(); defaultMoveBehavior.owner = this; currentMoveBehavior = defaultMoveBehavior; curHP = maxHP; transform.localScale = originalScale; UpdateActiveState(); shakeAmount = 0f; }
/// <summary> (영웅세팅)해당 클래스에서 가장 처름 시작되야 하는 곳</summary> public void Init(BattleGroup _battleGroup, HeroData data, BattleUnit.Team team = Team.Red) { heroData = data; if (_battleGroup != null) { heroData.battleGroupID = _battleGroup.battleType.ToString(); } else { heroData.battleGroupID = string.Empty; } SetBattleGroup(_battleGroup); buffController.owner = this; if (team != Team.Red) { data.level = battleGroup.stage; } //heroDataID = data.id; if (team == Team.Red && !isSummonded) { //ModifiableStat statHPRegen = stats.CreateOrGetStat<ModifiableStat>(StatType.HPRegen); //statHPRegen.baseValue = 5; //statHPRegen.UpdateModifiers(); } stats.Init(); heroData.RecalculateStats(team == Team.Red, power); //RecalculateBaseParams(); defaultMoveBehavior = new HeroMoveBehaviorRun(); defaultMoveBehavior.owner = this; currentMoveBehavior = defaultMoveBehavior; curHP = maxHP; transform.localScale = originalScale; //보스 사이즈 보정 orderController.bossModify = isBoss ? 1.3f : 1f; UpdateActiveState(); shakeAmount = 0f; }