public static void RegisterConflict(EntController contA, EntController contB, EntUtils.ColliderType typeA, EntUtils.ColliderType typeB) { if (Logging) { Debug.LogFormat("[CONFLICT] Attempt to register\n{0}{1}{2} ({3}{4}{5}) - {6}{7}{8} ({9}{10}{11})", LOG_CONTROLLER_PREFIX, contA.name, LOG_CONTROLLER_SUFFIX, LOG_BEHAVIOUR_PREFIX, typeA, LOG_BEHAVIOUR_SUFFIX, LOG_CONTROLLER_PREFIX, contB.name, LOG_CONTROLLER_SUFFIX, LOG_BEHAVIOUR_PREFIX, typeB, LOG_BEHAVIOUR_SUFFIX ); } BattleConflict conflict = new BattleConflict(contA, contB, typeA, typeB); if (!CollectionUtils.Contains(_Conflicts, conflict)) { _Conflicts.Add(new BattleConflict(contA, contB, typeA, typeB)); if (Logging) { Debug.Log("[CONFLICT] accepted count now " + _Conflicts.Count); } } else if (Logging) { Debug.Log("[CONFLICT] rejected"); } }
public static bool Equal(BattleConflict bc1, BattleConflict bc2) { return bc1.Equals(bc2); }
public bool Equals(BattleConflict other) { return (this._Pair.First == other._Pair.First && this._Pair.Second == other._Pair.Second) || (this._Pair.First == other._Pair.Second && this._Pair.Second == other._Pair.First); }
public BattleConflictResolution(BattleConflictAgitator agitator, Result result, BattleConflict conflict) { _Agitator = agitator; _Result = result; _Conflict = conflict; }