public void AddBehavior(BehaviorDef behavior) { List <BehaviorDef> newBehaviors = new List <BehaviorDef>(behaviors); newBehaviors.Add(behavior); behaviors = newBehaviors.ToArray(); }
public _ InitMany(short objTypeMin, short objTypeMax, BehaviorDef b) { int count = objTypeMax - objTypeMin; for (int i = 0; i <= count; i++) { Behaviors.Add((short)(objTypeMin + i), b); } return(this); }
public _ Init(short objType, BehaviorDef b) { try { Behaviors.Add(objType, b); return(this); } catch { Console.WriteLine("Behavior Error" + objType); } return(this); }
public _ Init(short objType, BehaviorDef b) { try { Behaviors.Add(objType, b); return this; } catch { Logger.Error($"Behavior error for \"0x{objType:x4}\""); } return this; }
public _ Init(short objType, BehaviorDef b) { try { Behaviors.Add(objType, b); return this; } catch { Console.WriteLine("Behavior Error" + objType.ToString()); } return this; }
public _ Init(short objType, BehaviorDef b) { Behaviors.Add(objType, b); return(this); }
public _ Init(short objType, BehaviorDef b) { Behaviors.Add(objType, b); return this; }
public void AddBehavior(BehaviorDef behavior) { List<BehaviorDef> newBehaviors = new List<BehaviorDef>(behaviors); newBehaviors.Add(behavior); behaviors = newBehaviors.ToArray(); }