Skip to content

Commit

Permalink
Merge pull request #398 from eesast/dev
Browse files Browse the repository at this point in the history
v1.2.3
  • Loading branch information
hhzzff authored May 23, 2024
2 parents 73d63d0 + 9f65260 commit 0923161
Showing 1 changed file with 1 addition and 14 deletions.
15 changes: 1 addition & 14 deletions logic/GameClass/GameObj/Map/Map.cs
Original file line number Diff line number Diff line change
Expand Up @@ -81,22 +81,9 @@ public IOutOfBound GetOutOfBound(XY pos)
{
return (Ship?)GameObjDict[GameObjType.Ship].Find(gameObj => (teamID == ((Ship)gameObj).TeamID) && playerID == ((Ship)gameObj).PlayerID);
}

public static bool WormholeInteract(Wormhole gameObj, XY Pos)
{
foreach (WormholeCell cell in gameObj.Cells)
{
if (GameData.ApproachToInteract(cell.Position, Pos))
return true;
}
return false;
}
public GameObj? OneForInteract(XY Pos, GameObjType gameObjType)
{
return (GameObj?)GameObjDict[gameObjType].Find(gameObj =>
((GameData.ApproachToInteract(gameObj.Position, Pos)) ||
(gameObjType == GameObjType.Wormhole && WormholeInteract((Wormhole)gameObj, Pos)))
);
return (GameObj?)GameObjDict[gameObjType].Find(gameObj => GameData.ApproachToInteract(gameObj.Position, Pos));
}
public GameObj? OneInTheSameCell(XY Pos, GameObjType gameObjType)
{
Expand Down

0 comments on commit 0923161

Please sign in to comment.