-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #22 from kbatbouta/development-settings
Added new settings for fog of war, sprinting and groups.
- Loading branch information
Showing
14 changed files
with
446 additions
and
42 deletions.
There are no files selected for viewing
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -101,7 +101,6 @@ public void Flood(IntVec3 center, Action<Node> action, Func<IntVec3, float> cost | |
} | ||
} | ||
} | ||
// } | ||
} | ||
} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,215 @@ | ||
using System; | ||
using System.Runtime.CompilerServices; | ||
using System.Security.Policy; | ||
|
||
namespace CombatAI | ||
{ | ||
public struct Tuple<A1, A2> : IEquatable<Tuple<A1, A2>> | ||
{ | ||
public A1 val1; | ||
public A2 val2; | ||
|
||
public Tuple(A1 val1, A2 val2) | ||
{ | ||
this.val1 = val1; | ||
this.val2 = val2; | ||
} | ||
|
||
public Tuple(Tuple<A1, A2> other) | ||
{ | ||
this.val1 = other.val1; | ||
this.val2 = other.val2; | ||
} | ||
|
||
public override bool Equals(object obj) | ||
{ | ||
return obj is Tuple<A1, A2> other && this.Equals(other); | ||
} | ||
|
||
[MethodImpl(MethodImplOptions.AggressiveInlining)] | ||
public bool Equals(Tuple<A1, A2> other) | ||
{ | ||
return val1.Equals(other.val1) && val2.Equals(other.val2); | ||
} | ||
|
||
[MethodImpl(MethodImplOptions.AggressiveInlining)] | ||
public override int GetHashCode() | ||
{ | ||
int hash = 36469; | ||
unchecked | ||
{ | ||
hash = hash * 17 + val1.GetHashCode(); | ||
hash = hash * 17 + val2.GetHashCode(); | ||
} | ||
return hash; | ||
} | ||
|
||
public override string ToString() | ||
{ | ||
return $"({this.val1.ToString()}, {this.val2.ToString()})"; | ||
} | ||
} | ||
|
||
public struct Tuple<A1, A2, A3> : IEquatable<Tuple<A1, A2, A3>> | ||
{ | ||
public A1 val1; | ||
public A2 val2; | ||
public A3 val3; | ||
|
||
public Tuple(A1 val1, A2 val2, A3 val3) | ||
{ | ||
this.val1 = val1; | ||
this.val2 = val2; | ||
this.val3 = val3; | ||
} | ||
|
||
public Tuple(Tuple<A1, A2, A3> other) | ||
{ | ||
this.val1 = other.val1; | ||
this.val2 = other.val2; | ||
this.val3 = other.val3; | ||
} | ||
|
||
public override bool Equals(object obj) | ||
{ | ||
return obj is Tuple<A1, A2, A3> other && this.Equals(other); | ||
} | ||
|
||
[MethodImpl(MethodImplOptions.AggressiveInlining)] | ||
public bool Equals(Tuple<A1, A2, A3> other) | ||
{ | ||
return val1.Equals(other.val1) && val2.Equals(other.val2) && val3.Equals(other.val3); | ||
} | ||
|
||
[MethodImpl(MethodImplOptions.AggressiveInlining)] | ||
public override int GetHashCode() | ||
{ | ||
int hash = 36469; | ||
unchecked | ||
{ | ||
hash = hash * 17 + val1.GetHashCode(); | ||
hash = hash * 17 + val2.GetHashCode(); | ||
hash = hash * 17 + val3.GetHashCode(); | ||
} | ||
return hash; | ||
} | ||
|
||
public override string ToString() | ||
{ | ||
return $"({this.val1.ToString()}, {this.val2.ToString()}, {this.val3.ToString()})"; | ||
} | ||
} | ||
|
||
public struct Tuple<A1, A2, A3, A4> : IEquatable<Tuple<A1, A2, A3, A4>> | ||
{ | ||
public A1 val1; | ||
public A2 val2; | ||
public A3 val3; | ||
public A4 val4; | ||
|
||
public Tuple(A1 val1, A2 val2, A3 val3, A4 val4) | ||
{ | ||
this.val1 = val1; | ||
this.val2 = val2; | ||
this.val3 = val3; | ||
this.val4 = val4; | ||
} | ||
|
||
public Tuple(Tuple<A1, A2, A3, A4> other) | ||
{ | ||
this.val1 = other.val1; | ||
this.val2 = other.val2; | ||
this.val3 = other.val3; | ||
this.val4 = other.val4; | ||
} | ||
|
||
public override bool Equals(object obj) | ||
{ | ||
return obj is Tuple<A1, A2, A3, A4> other && this.Equals(other); | ||
} | ||
|
||
[MethodImpl(MethodImplOptions.AggressiveInlining)] | ||
public bool Equals(Tuple<A1, A2, A3, A4> other) | ||
{ | ||
return val1.Equals(other.val1) && val2.Equals(other.val2) && val3.Equals(other.val3) && val4.Equals(other.val4); | ||
} | ||
|
||
[MethodImpl(MethodImplOptions.AggressiveInlining)] | ||
public override int GetHashCode() | ||
{ | ||
int hash = 36469; | ||
unchecked | ||
{ | ||
hash = hash * 17 + val1.GetHashCode(); | ||
hash = hash * 17 + val2.GetHashCode(); | ||
hash = hash * 17 + val3.GetHashCode(); | ||
hash = hash * 17 + val4.GetHashCode(); | ||
} | ||
return hash; | ||
} | ||
|
||
public override string ToString() | ||
{ | ||
return $"({this.val1.ToString()}, {this.val2.ToString()}, {this.val3.ToString()}, {this.val4.ToString()})"; | ||
} | ||
} | ||
|
||
public struct Tuple<A1, A2, A3, A4, A5> : IEquatable<Tuple<A1, A2, A3, A4, A5>> | ||
{ | ||
public A1 val1; | ||
public A2 val2; | ||
public A3 val3; | ||
public A4 val4; | ||
public A5 val5; | ||
|
||
public Tuple(A1 val1, A2 val2, A3 val3, A4 val4, A5 val5) | ||
{ | ||
this.val1 = val1; | ||
this.val2 = val2; | ||
this.val3 = val3; | ||
this.val4 = val4; | ||
this.val5 = val5; | ||
} | ||
|
||
public Tuple(Tuple<A1, A2, A3, A4, A5> other) | ||
{ | ||
this.val1 = other.val1; | ||
this.val2 = other.val2; | ||
this.val3 = other.val3; | ||
this.val4 = other.val4; | ||
this.val5 = other.val5; | ||
} | ||
|
||
public override bool Equals(object obj) | ||
{ | ||
return obj is Tuple<A1, A2, A3, A4, A5> other && this.Equals(other); | ||
} | ||
|
||
[MethodImpl(MethodImplOptions.AggressiveInlining)] | ||
public bool Equals(Tuple<A1, A2, A3, A4, A5> other) | ||
{ | ||
return val1.Equals(other.val1) && val2.Equals(other.val2) && val3.Equals(other.val3) && val4.Equals(other.val4) && val5.Equals(other.val5); | ||
} | ||
|
||
[MethodImpl(MethodImplOptions.AggressiveInlining)] | ||
public override int GetHashCode() | ||
{ | ||
int hash = 36469; | ||
unchecked | ||
{ | ||
hash = hash * 17 + val1.GetHashCode(); | ||
hash = hash * 17 + val2.GetHashCode(); | ||
hash = hash * 17 + val3.GetHashCode(); | ||
hash = hash * 17 + val4.GetHashCode(); | ||
hash = hash * 17 + val5.GetHashCode(); | ||
} | ||
return hash; | ||
} | ||
|
||
public override string ToString() | ||
{ | ||
return $"({this.val1.ToString()}, {this.val2.ToString()}, {this.val3.ToString()}, {this.val4.ToString()}, {this.val5.ToString()})"; | ||
} | ||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.