private void AddPriority(PatternBase pattern) { float p = currentPriority[pattern]; p += priorityMult * (pattern.GetPriority() / priorityMid); p = Mathf.Clamp(p, 0, pattern.GetPriority()); currentPriority[pattern] = p; }
private void SubtractPriority(PatternBase pattern) { float p = currentPriority[pattern]; p -= priorityMid; p = Mathf.Clamp(p, 0, pattern.GetPriority()); currentPriority[pattern] = p; }