示例#1
0
 /// <summary>
 /// (Cross-Game compatible) Add a Behavior to this
 /// </summary>
 /// <typeparam name="T">The Behavior you want to add</typeparam>
 /// <param name="model"></param>
 /// <param name="behavior"></param>
 public static void AddBehavior <T>(this WeaponModel model, T behavior) where T : WeaponBehaviorModel
 {
     model.behaviors = model.behaviors.AddTo(behavior);
     model.AddChildDependant(behavior);
 }