public void UnEquipItem(ItemData item) { item._equip_unit = null; _unit_data = GameData.Instance._playerData._unit[_data_index]; if (item._class == 0)//무기 { _unit_data._weapon = -1; GameData.Instance._playerData._unit[_data_index] = _unit_data; _weapon = null; OnAtk(); } else if (item._class == 1)//방어구 { _unit_data._armor = -1; GameData.Instance._playerData._unit[_data_index] = _unit_data; _armor = null; OnDef(); } if (_team > -1) { GameData.Instance._expeditionMN._team_data[_team].OnUpdateInfo(); } }
public void OnEquipItem(ItemData item) { item._equip_unit = this; _unit_data = GameData.Instance._playerData._unit[_data_index]; if (item._class == 0)//무기 { if (_weapon != null) { _weapon._equip_unit = null; } _unit_data._weapon = item._data_index; _weapon = item; OnAtk(); } else if (item._class == 1)//방어구 { if (_armor != null) { _armor._equip_unit = null; } _unit_data._armor = item._data_index; _armor = item; OnDef(); } GameData.Instance._playerData._unit[_data_index] = _unit_data; if (_team > -1) { GameData.Instance._expeditionMN._team_data[_team].OnUpdateInfo(); } }
public void OnLevelUp() { _unit_data = GameData.Instance._playerData._unit[_data_index]; _unit_data._lev += 1; GameData.Instance._playerData._unit[_data_index] = _unit_data; _lev = GameData.Instance._playerData._unit[_data_index]._lev; OnHp(); OnAtk(); OnCri(); if (_unit_obj != null) { _unit_obj.OnLevelUp(); } if (_team > -1) { GameData.Instance._expeditionMN._team_data[_team].OnUpdateInfo(); } }
public void OnDel()//직원 해고 { if (_team > -1) { TeamData _team_data = GameData.Instance._expeditionMN._team_data[_team]; _team_data.OnTeamOut(_team_slot, this); _team_data.OnUpdateInfo(); } if (_weapon != null) { _weapon._equip_unit = null; //무기를 착용하고 있으면 자동 해제 } if (_armor != null) { _armor._equip_unit = null; //방어구를 착용하고 있으면 자동 해제 } _unit_data = GameData.Instance._playerData._unit[_data_index]; _unit_data._lev = 0; GameData.Instance._playerData._unit[_data_index] = _unit_data; }