public void InterInitialize(UnitCtrl owner, bool initializeAttackOnly, UnitCtrl seOwner, int unitid) { LoadUnitActionController(unitid); Owner = owner; staticBattleManager = BattleManager.Instance; unitSkillData = MainManager.Instance.UnitRarityDic[unitid].skillData; Initialize(owner, unitid, initializeAttackOnly, seOwner); }
private void loadEffectFromUnitSkillData(UnitSkillData us) { addLoadEffectData(us.colorEffectId); addLoadEffectData(us.activeSkillEffect); loadEffectByBulletPatternIdAndAttackType((us.resourceId == null)?us.id:us.resourceId, us.exeData.type); loadEffectFromSkillEffect(us.skillEffects); }
public override void destroy() { base.destroy(); skillData = null; _unitSkillData = null; uiSlot = null; skillInfo = null; player = null; mon = null; }
bool VerifyModel(UnitSkillData model) { if (this.map.ContainsKey(model.code)) { Debug.LogError(string.Format("UNITSKILL:DUPLICATED_CODE_EXCEPT:CODE:{0},\nMODEL:{1},\nOLD_MODEL:{2}", model.code, model, this.map[model.code])); return(false); } return(true); }
public void SetLearnedSkillsBonusPreview(UnitSkillData learnedSkill, PartyUnit partyUnit) { switch (learnedSkill.unitSkill) { case UnitSkillID.Leadership: // update normal values SetUnitLeadershipInfo(partyUnit); break; case UnitSkillID.Offense: //SetUnitPowerInfo(partyUnit, learnedSkill); SetUnitPowerInfo(partyUnit); break; case UnitSkillID.Defense: SetUnitDefenseInfo(partyUnit); break; case UnitSkillID.Pathfinding: SetUnitMovePointsInfo(partyUnit); break; case UnitSkillID.Scouting: SetUnitScoutingRangeInfo(partyUnit); break; case UnitSkillID.Healing: SetUnitHealthInfo(partyUnit); break; case UnitSkillID.DeathResistance: case UnitSkillID.FireResistance: case UnitSkillID.WaterResistance: case UnitSkillID.MindResistance: SetUnitResistancesInfo(partyUnit); break; case UnitSkillID.ShardAura: break; case UnitSkillID.LifelessContinuation: break; case UnitSkillID.None: break; default: Debug.LogError("Unknown skill: " + learnedSkill.unitSkill); break; } }
public void setData(Monster monster, UnitSkillData sd) { player = null; exeCount = 0; mon = monster; maxCoolTime = sd.coolTime; coolTime = maxCoolTime + sd.coolTimeStartDelay; _unitSkillData = sd; useMp = 0.0f; hasSkillAni = sd.hasSkillAni; sd.exeData.init(AttackData.AttackerType.Unit, AttackData.AttackType.Skill, sd); }
public override void destroy() { base.destroy(); _player = null; _heroMon = null; unitData = null; activeSkillData = null; mon = null; aliveUnitDic.Clear(); aliveUnitDic = null; if (uiUnitSlot != null) { uiUnitSlot.mon = null; } uiUnitSlot = null; infoData = null; }
UnitSkill(UnitSkillData assetModel) { this.assetModel = assetModel; }
public void setData(Monster heroMon, UnitData mud, UIPlayUnitSlot uiSlot = null) { _heroMon = heroMon; unitData = mud; uiUnitSlot = uiSlot; maxCoolTime = unitData.cooltime; #if UNITY_EDITOR if (uiSlot != null) { if (DebugManager.instance.ignoreCoolTime) { maxCoolTime = 0; } } #endif coolTime = maxCoolTime; useSp = unitData.sp; mon = null; canUseOneShotUnitSkill = false; activeSkillState = UIPlayUnitSlot.STATE_ACTIVE_SKILL_COOLTIME; // if(uiUnitSlot != null) uiUnitSlot.activeSkillState = activeSkillState; if (heroMon.isPlayer) { _player = (Player)heroMon; useSp -= (useSp * _player.summonSpPercent(mud)); activeSkillData = null; coolTime.Set(2.0f); // player 들은 기본 쿨타임이 2초다. if (mud.skill != null) { foreach (string skillId in mud.skill) { #if UNITY_EDITOR Debug.Log(mud.id + " " + skillId); #endif if (GameManager.info.unitSkillData[skillId].activeSkillCooltime > -1) { activeSkillData = GameManager.info.unitSkillData[skillId]; break; } } } if (activeSkillData != null) { resetActiveSkillCoolTime(); } } if (heroMon.isPlayerSide) { aliveUnitDic = GameManager.me.characterManager.alivePlayerUnit; } else { aliveUnitDic = GameManager.me.characterManager.aliveMonUnit; } leftNum = 0; if (uiSlot != null) { uiSlot.unitSlot = this; uiSlot.init(unitData, infoData.transcendData, infoData.transcendLevel, _player); } }
public virtual void clear() { mon = null; nowUnitSkillData = null; canUsePassiveSkill = true; }