MovementArrow functionality; StarFog implemented; Refactoring
This commit is contained in:
+6
-8
@@ -14,23 +14,17 @@ struct FHexVector
|
||||
FORCEINLINE explicit FHexVector(AHexTile* InHex);
|
||||
FORCEINLINE explicit FHexVector(AHexTile* InHexA, AHexTile* InHexB);
|
||||
|
||||
|
||||
UPROPERTY(BlueprintReadWrite)
|
||||
int32 Q;
|
||||
|
||||
UPROPERTY(BlueprintReadWrite)
|
||||
int32 R;
|
||||
|
||||
UPROPERTY(BlueprintReadWrite)
|
||||
int32 S;
|
||||
|
||||
UPROPERTY(BlueprintReadWrite)
|
||||
bool bIsDiagonal;
|
||||
|
||||
UPROPERTY(BlueprintReadWrite)
|
||||
bool bUnit;
|
||||
|
||||
TArray<FHexVector> Related;
|
||||
};
|
||||
|
||||
FORCEINLINE FHexVector::FHexVector()
|
||||
@@ -44,15 +38,19 @@ FORCEINLINE FHexVector::FHexVector(AHexTile* InHex)
|
||||
FORCEINLINE FHexVector::FHexVector(AHexTile* InHexA, AHexTile* InHexB)
|
||||
: Q(InHexA->Q - InHexB->Q), R(InHexA->R - InHexB->R) {}
|
||||
|
||||
|
||||
FORCEINLINE bool operator==(const FHexVector& A, const FHexVector& B)
|
||||
{
|
||||
if (A.Q == B.Q && A.R == B.R) { return true; }
|
||||
else { return false; }
|
||||
}
|
||||
|
||||
FORCEINLINE bool operator!=(const FHexVector& A, const FHexVector& B)
|
||||
{
|
||||
if (A.Q == B.Q && A.R == B.R) { return false; }
|
||||
else { return true; }
|
||||
}
|
||||
|
||||
FORCEINLINE uint32 GetTypeHash(const FHexVector& Thing)
|
||||
{
|
||||
uint32 Hash = FCrc::MemCrc32(&Thing, sizeof(FHexVector));
|
||||
return Hash;
|
||||
}
|
||||
Reference in New Issue
Block a user