public void SetLoadout(Dictionary<string, Equipment> equipment, List<Equipment> nohp) { foreach (var k in equipment.Keys) { var hp = GetHardpoint(k); Children.Add(new GameObject(equipment[k], hp, this)); } foreach (var eq in nohp) { if (eq is AnimationEquipment) { var anm = (AnimationEquipment)eq; if(anm.Animation != null) AnimationComponent?.StartAnimation(anm.Animation); } } }
public void SetLoadout(Dictionary <string, Equipment> equipment, List <Equipment> nohp) { foreach (var k in equipment.Keys) { EquipmentObjectManager.InstantiateEquipment(this, Resources, RenderComponent != null, k, equipment[k]); } foreach (var eq in nohp) { if (eq is AnimationEquipment) { var anm = (AnimationEquipment)eq; if (anm.Animation != null) { AnimationComponent?.StartAnimation(anm.Animation); } } } }