public bool IsValid() { if (!Info.IsValid()) { return(false); } return(true); }
public override void SetDatas() { MGgDataMapping dataMapping = MCgDataMapping.Get <MGgDataMapping>(); MGgPlayerState myPlayerState = (MGgPlayerState)PlayerState; if (!bPlacedInWorld || !MyInfo.IsValid()) { MyInfo.Copy(myPlayerState.PlayerData.Info); } MyData_Character = dataMapping.LoadData <MGgData_Character>(EGgAssetType.Characters, MyInfo.Character); MyData_CharacterMeshSkin = dataMapping.LoadData <MGgData_CharacterMeshSkin>(EGgAssetType.CharacterMeshSkins, MyInfo.MeshSkin); MyData_CharacterMaterialSkin = dataMapping.LoadData <MGgData_CharacterMaterialSkin>(EGgAssetType.CharacterMaterialSkins, MyInfo.MaterialSkin); Data_Weapons.Clear(); CurrentWeaponCount = 1; //Data_Weapons.Reserve(CurrentWeaponCount); for (int i = 0; i < CurrentWeaponCount; ++i) { MGgData_Weapon data = dataMapping.LoadData <MGgData_Weapon>(EGgAssetType.Weapons, MyInfo.Weapon); Data_Weapons.Add(data); } Data_WeaponMaterialSkins.Clear(); //Data_WeaponMaterialSkins.Reserve(CurrentWeaponCount); for (int i = 0; i < CurrentWeaponCount; ++i) { MGgData_WeaponMaterialSkin data = dataMapping.LoadData <MGgData_WeaponMaterialSkin>(EGgAssetType.WeaponMaterialSkins, MyInfo.WeaponMaterialSkin); Data_WeaponMaterialSkins.Add(data); } }