private bool AddGunModifier(GunModifier m) { if (current_modifiers < modifiers.Length) { modifiers[current_modifiers] = m; Component mod = gameObject.AddComponent(m.GetType().ToString()); //EditorUtility.CopySerialized(m, mod); ((GunModifier)(mod)).Equip(this); current_modifiers++; return(true); } return(false); }
private bool AddGunModifier(GunModifier m) { if (current_modifiers < modifiers.Length) { modifiers[current_modifiers] = m; Component mod = gameObject.AddComponent(m.GetType().ToString()); //EditorUtility.CopySerialized(m, mod); ((GunModifier)(mod)).Equip(this); current_modifiers++; return true; } return false; }